• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KTextEditor

annotationinterface.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002    Copyright 2008 Andreas Pakulat <apaku@gmx.de>
00003    Copyright 2008 Dominik Haumann <dhaumann kde org>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License version 2 as published by the Free Software Foundation.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017    Boston, MA 02110-1301, USA.
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   // SIGNALS!!!
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 // kate: space-indent on; indent-width 2; replace-tabs on;

KTextEditor

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal