• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

KTextEditor

  • kde-4.14
  • applications
  • kate
  • ktexteditor
annotationinterface.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2  * Copyright 2008 Andreas Pakulat <apaku@gmx.de>
3  * Copyright 2008 Dominik Haumann <dhaumann kde org>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA
19  */
20 
21 #ifndef KDELIBS_KTEXTEDITOR_ANNOTATIONINTERFACE_H
22 #define KDELIBS_KTEXTEDITOR_ANNOTATIONINTERFACE_H
23 
24 #include <ktexteditor/ktexteditor_export.h>
25 
26 #include <QtCore/QObject>
27 
28 class QMenu;
29 
30 namespace KTextEditor
31 {
32 
33 class View;
34 
53 class KTEXTEDITOR_EXPORT AnnotationModel : public QObject
54 {
55  Q_OBJECT
56  public:
57 
58  virtual ~AnnotationModel() {}
59 
60  enum {
61  GroupIdentifierRole = Qt::UserRole
62  };
63 
83  virtual QVariant data( int line, Qt::ItemDataRole role ) const = 0;
84 
85  Q_SIGNALS:
96  void reset();
97 
105  void lineChanged( int line );
106 };
107 
108 
157 class KTEXTEDITOR_EXPORT AnnotationInterface
158 {
159  public:
160  virtual ~AnnotationInterface() {}
161 
168  virtual void setAnnotationModel( AnnotationModel* model ) = 0;
169 
175  virtual AnnotationModel* annotationModel() const = 0;
176 
177 };
178 
179 
217 class KTEXTEDITOR_EXPORT AnnotationViewInterface : public AnnotationInterface
218 {
219  public:
220  virtual ~AnnotationViewInterface() {}
221 
228  virtual void setAnnotationBorderVisible( bool visible ) = 0;
229 
233  virtual bool isAnnotationBorderVisible() const = 0;
234 
235  //
236  // SIGNALS!!!
237  //
238  public:
250  virtual void annotationContextMenuAboutToShow( KTextEditor::View* view, QMenu* menu, int line ) = 0;
251 
260  virtual void annotationActivated( KTextEditor::View* view, int line ) = 0;
261 
268  virtual void annotationBorderVisibilityChanged( KTextEditor::View* view, bool visible ) = 0;
269 
270 };
271 
272 }
273 
274 Q_DECLARE_INTERFACE(KTextEditor::AnnotationInterface, "org.kde.KTextEditor.AnnotationInterface")
275 Q_DECLARE_INTERFACE(KTextEditor::AnnotationViewInterface, "org.kde.KTextEditor.AnnotationViewInterface")
276 
277 #endif
278 
279 // kate: space-indent on; indent-width 2; replace-tabs on;
KTextEditor::AnnotationModel::~AnnotationModel
virtual ~AnnotationModel()
Definition: annotationinterface.h:58
KTextEditor::AnnotationViewInterface::~AnnotationViewInterface
virtual ~AnnotationViewInterface()
Definition: annotationinterface.h:220
ktexteditor_export.h
QObject
KTEXTEDITOR_EXPORT
#define KTEXTEDITOR_EXPORT
Definition: ktexteditor_export.h:35
KTextEditor::AnnotationModel
An model for providing line annotation information.
Definition: annotationinterface.h:53
KTextEditor::AnnotationInterface::~AnnotationInterface
virtual ~AnnotationInterface()
Definition: annotationinterface.h:160
QMenu
KTextEditor::AnnotationViewInterface
Annotation interface for the View.
Definition: annotationinterface.h:217
KTextEditor::View
A text widget with KXMLGUIClient that represents a Document.
Definition: view.h:145
QVariant
KTextEditor::AnnotationInterface
A Document extension interface for handling Annotations.
Definition: annotationinterface.h:157
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:47 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KTextEditor

Skip menu "KTextEditor"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal