KDevelop API Documentation

kde30x_markinterfaceextension.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2000-2001 F@lk Brettschneider <falkbr@kdevelop.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
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., 59 Temple Place - Suite 330,
00017    Boston, MA 02111-1307, USA.
00018 */
00019 #ifndef __KDE30X_MARKINTERFACEEXTENSION_H__
00020 #define __KDE30X_MARKINTERFACEEXTENSION_H__
00021 
00022 #include <ktexteditor/markinterface.h>
00023 #include <kdeversion.h>
00024 
00025 #if !(KDE_VERSION > 305)
00026 
00027 #include <ktexteditor/document.h>
00028 
00029 //----begin-of-copy-of-KDE-3.1-----------------------------------
00030 /* This file is part of the KDE project
00031    Copyright (C) 2002 Joseph Wenninger <jowenn@kde.org>
00032 
00033    This library is free software; you can redistribute it and/or
00034    modify it under the terms of the GNU Library General Public
00035    License as published by the Free Software Foundation; either
00036    version 2 of the License, or (at your option) any later version.
00037 
00038    This library is distributed in the hope that it will be useful,
00039    but WITHOUT ANY WARRANTY; without even the implied warranty of
00040    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00041    Library General Public License for more details.
00042 
00043    You should have received a copy of the GNU Library General Public License
00044    along with this library; see the file COPYING.LIB.  If not, write to
00045    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00046    Boston, MA 02111-1307, USA.
00047 */
00048 
00049 #include <qptrlist.h>
00050 #include <qpixmap.h>
00051 #include <qstring.h>
00052 
00053 class QCString;
00054 
00055 namespace KTextEditor
00056 {
00057 
00058 
00059 /*
00060 *  This is an interface for the KTextEditor::Document class !!!
00061 *  It allows to set pixmaps for marks and allows the developer to set, which
00062 *  marks be settable by the user. In kate eg in the sidebar's popup menu
00063 */
00064 class MarkInterfaceExtension
00065 {
00066   friend class PrivateMarkInterfaceExtension;
00067 
00068   public:
00069     MarkInterfaceExtension ();
00070     virtual ~MarkInterfaceExtension ();
00071 
00072     unsigned int markInterfaceExtensionNumber () const;
00073 
00074   protected:
00075     void setMarkInterfaceExtensionDCOPSuffix (const QCString &suffix);
00076 
00077   public:
00078     virtual void setPixmap(MarkInterface::MarkTypes, const QPixmap &)=0;
00079     virtual void setDescription(MarkInterface::MarkTypes, const QString &)=0;
00080     virtual void setMarksUserChangable(uint markMask)=0;
00081 
00082     enum MarkChangeAction {
00083         MarkAdded=0,
00084         MarkRemoved=1
00085     };
00086   //
00087   // slots !!!
00088   //
00089   public:
00090 
00091   //
00092   // signals !!!
00093   //
00094   public:
00095     virtual void markChanged (KTextEditor::Mark mark,
00096                               KTextEditor::MarkInterfaceExtension::MarkChangeAction action) = 0;
00097 
00098   private:
00099     class PrivateMarkInterfaceExtension *d;
00100     static unsigned int globalMarkInterfaceExtensionNumber;
00101     unsigned int myMarkInterfaceExtensionNumber;
00102 };
00103 
00104 MarkInterfaceExtension *markInterfaceExtension (Document *doc);
00105 
00106 }; // KTextEditor namespace
00107 
00108 //----end-of-copy-of-KDE-3.1-----------------------------------
00109 
00110 #endif // !(KDE_VERSION > 305)
00111 
00112 #endif // __KDE30X_MARKINTERFACEEXTENSION_H__
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Feb 22 09:22:35 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003