KTextEditor
annotationinterface.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KDELIBS_KTEXTEDITOR_ANNOTATIONINTERFACE_H
00021 #define KDELIBS_KTEXTEDITOR_ANNOTATIONINTERFACE_H
00022
00023 #include <ktexteditor/ktexteditor_export.h>
00024
00025 #include <QtCore/QObject>
00026
00027 class QMenu;
00028
00029 namespace KTextEditor
00030 {
00031
00032 class View;
00033
00052 class KTEXTEDITOR_EXPORT AnnotationModel : public QObject
00053 {
00054 Q_OBJECT
00055 public:
00056
00057 virtual ~AnnotationModel() {}
00058
00075 virtual QVariant data( int line, Qt::ItemDataRole role ) const = 0;
00076
00077 Q_SIGNALS:
00088 void reset();
00089
00097 void lineChanged( int line );
00098 };
00099
00100
00149 class KTEXTEDITOR_EXPORT AnnotationInterface
00150 {
00151 public:
00152 virtual ~AnnotationInterface() {}
00153
00160 virtual void setAnnotationModel( AnnotationModel* model ) = 0;
00161
00167 virtual AnnotationModel* annotationModel() const = 0;
00168
00169 };
00170
00171
00209 class KTEXTEDITOR_EXPORT AnnotationViewInterface : public AnnotationInterface
00210 {
00211 public:
00212 virtual ~AnnotationViewInterface() {}
00213
00220 virtual void setAnnotationBorderVisible( bool visible ) = 0;
00221
00225 virtual bool isAnnotationBorderVisible() const = 0;
00226
00227
00228
00229
00230 public:
00244 virtual void annotationContextMenuAboutToShow( KTextEditor::View* view, QMenu* menu, int line ) = 0;
00245
00254 virtual void annotationActivated( KTextEditor::View* view, int line ) = 0;
00255
00262 virtual void annotationBorderVisibilityChanged( KTextEditor::View* view, bool visible ) = 0;
00263
00264 };
00265
00266 }
00267
00268 Q_DECLARE_INTERFACE(KTextEditor::AnnotationInterface, "org.kde.KTextEditor.AnnotationInterface")
00269 Q_DECLARE_INTERFACE(KTextEditor::AnnotationViewInterface, "org.kde.KTextEditor.AnnotationViewInterface")
00270
00271 #endif
00272
00273