KTextEditor::AnnotationViewInterfaceV2
#include <annotationinterface.h>

Public Member Functions | |
virtual KTextEditor::AbstractAnnotationItemDelegate * | annotationItemDelegate () const =0 |
virtual void | setAnnotationItemDelegate (KTextEditor::AbstractAnnotationItemDelegate *delegate)=0 |
virtual void | setAnnotationUniformItemSizes (bool uniformItemSizes)=0 |
virtual bool | uniformAnnotationItemSizes () const =0 |
![]() | |
virtual void | annotationActivated (KTextEditor::View *view, int line)=0 |
virtual void | annotationBorderVisibilityChanged (KTextEditor::View *view, bool visible)=0 |
virtual void | annotationContextMenuAboutToShow (KTextEditor::View *view, QMenu *menu, int line)=0 |
virtual bool | isAnnotationBorderVisible () const =0 |
virtual void | setAnnotationBorderVisible (bool visible)=0 |
![]() | |
virtual AnnotationModel * | annotationModel () const =0 |
virtual void | setAnnotationModel (AnnotationModel *model)=0 |
Detailed Description
Annotation interface for the View, version 2.
Introduction
The AnnotationViewInterfaceV2 allows to do the same as AnnotationViewInterface and additionally
- (1) set a custom AbstractAnnotationItemDelegate for the View.
For a more detailed explanation about whether you want to set a custom delegate for rendering the annotations, read the detailed documentation about the AbstractAnnotationItemDelegate.
Accessing the AnnotationViewInterface
The AnnotationViewInterfaceV2 is an extension interface for a View, i.e. the View inherits the interface provided that the used KTextEditor library implements the interface. Use qobject_cast to access the interface:
- Since
- 5.53
Definition at line 302 of file annotationinterface.h.
Member Function Documentation
◆ annotationItemDelegate()
|
pure virtual |
Returns the currently used AbstractAnnotationItemDelegate.
- Returns
- the current AbstractAnnotationItemDelegate
◆ setAnnotationItemDelegate()
|
pure virtual |
Sets the AbstractAnnotationItemDelegate for this view and the model to provide custom rendering of annotation information for each line.
Ownership is not transferred.
- Parameters
-
delegate the new AbstractAnnotationItemDelegate, or nullptr
to reset to the default delegate
◆ setAnnotationUniformItemSizes()
|
pure virtual |
This function can be used to declare whether it is known that the annotation items rendered by the set delegate all have the same size.
This enables the view to do some optimizations for performance purposes.
By default the value of this property is false
.
- Parameters
-
uniformItemSizes if true
the annotation items are considered to all have the same size
◆ uniformAnnotationItemSizes()
|
pure virtual |
Checks whether the annotation items all have the same size.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Sep 27 2023 03:48:57 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.