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

KTextEditor

markinterface.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2001 Christoph Cullmann (cullmann@kde.org)
00003    Copyright (C) 2005 Dominik Haumann (dhdev@gmx.de) (documentation)
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 as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018    Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef KDELIBS_KTEXTEDITOR_MARKINTERFACE_H
00022 #define KDELIBS_KTEXTEDITOR_MARKINTERFACE_H
00023 
00024 #include <ktexteditor/ktexteditor_export.h>
00025 
00026 #include <QtCore/QHash>
00027 #include <QtCore/QObject>
00028 
00029 class QPixmap;
00030 
00031 namespace KTextEditor
00032 {
00033 
00034 class Document;
00035 
00049 class Mark
00050 {
00051   public:
00053     int line;
00054 
00056     uint type;
00057 };
00058 
00116 class KTEXTEDITOR_EXPORT MarkInterface
00117 {
00118   public:
00119     MarkInterface ();
00120 
00124     virtual ~MarkInterface ();
00125 
00126   //
00127   // slots !!!
00128   //
00129   public:
00137     virtual uint mark (int line) = 0;
00138 
00152     virtual void setMark (int line, uint markType) = 0;
00153 
00159     virtual void clearMark (int line) = 0;
00160 
00169     virtual void addMark (int line, uint markType) = 0;
00170 
00177     virtual void removeMark (int line, uint markType) = 0;
00178 
00184     virtual const QHash<int, KTextEditor::Mark*> &marks () = 0;
00185 
00190 
00191     virtual void clearMarks () = 0;
00192 
00199     static int reservedMarkersCount() { return 7; }
00200 
00207     enum MarkTypes
00208     {
00210       markType01= 0x1,
00212       markType02= 0x2,
00214       markType03= 0x4,
00216       markType04= 0x8,
00218       markType05= 0x10,
00220       markType06= 0x20,
00222       markType07= 0x40,
00223 
00224       markType08= 0x80,
00225       markType09= 0x100,
00226       markType10= 0x200,
00227       markType11= 0x400,
00228       markType12= 0x800,
00229       markType13= 0x1000,
00230       markType14= 0x2000,
00231       markType15= 0x4000,
00232       markType16= 0x8000,
00233       markType17= 0x10000,
00234       markType18= 0x20000,
00235       markType19= 0x40000,
00236       markType20= 0x80000,
00237       markType21= 0x100000,
00238       markType22= 0x200000,
00239       markType23= 0x400000,
00240       markType24= 0x800000,
00241       markType25= 0x1000000,
00242       markType26= 0x2000000,
00243       markType27= 0x4000000,
00244       markType28= 0x8000000,
00245       markType29= 0x10000000,
00246       markType30= 0x20000000,
00247       markType31= 0x40000000,
00248       markType32= 0x80000000,
00249       /* reserved marks */
00250       Bookmark = markType01,
00251       BreakpointActive = markType02,
00252       BreakpointReached = markType03,
00253       BreakpointDisabled = markType04,
00254       Execution = markType05,
00255       Warning = markType06,
00256       Error = markType07
00257     };
00258 
00259   //
00260   // signals !!!
00261   //
00262   public:
00268     virtual void marksChanged (KTextEditor::Document* document) = 0;
00269 
00270     /*
00271      * Methods to modify mark properties.
00272      */
00273   public:
00280     virtual void setMarkPixmap( MarkTypes mark, const QPixmap &pixmap ) = 0;
00281 
00288     virtual QPixmap markPixmap( MarkTypes mark ) const = 0;
00289 
00296     virtual void setMarkDescription( MarkTypes mark, const QString &text ) = 0;
00297 
00305     virtual QString markDescription( MarkTypes mark ) const = 0;
00306 
00326     virtual void setEditableMarks( uint markMask ) = 0;
00327 
00335     virtual uint editableMarks() const = 0;
00336 
00341     enum MarkChangeAction {
00342       MarkAdded=0,    
00343       MarkRemoved=1   
00344     };
00345 
00346   //
00347   // signals !!!
00348   //
00349   public:
00357     virtual void markChanged ( KTextEditor::Document* document, KTextEditor::Mark mark,
00358                                KTextEditor::MarkInterface::MarkChangeAction action) = 0;
00359 
00360   private:
00361     class MarkInterfacePrivate* const d;
00362 };
00363 
00364 }
00365 
00366 Q_DECLARE_INTERFACE(KTextEditor::MarkInterface, "org.kde.KTextEditor.MarkInterface")
00367 
00368 #endif
00369 
00370 // 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
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
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