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

KTextEditor

editor.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002    Copyright (C) 2005 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 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_EDITOR_H
00021 #define KDELIBS_KTEXTEDITOR_EDITOR_H
00022 
00023 #include <ktexteditor/ktexteditor_export.h>
00024 // our main baseclass of the KTextEditor::Editor
00025 #include <QtCore/QObject>
00026 
00027 #include <kicon.h>
00028 
00029 class KAboutData;
00030 class KConfig;
00031 
00032 namespace KTextEditor
00033 {
00034 
00035 class Document;
00036 class ConfigPage;
00037 
00102 class KTEXTEDITOR_EXPORT Editor : public QObject
00103 {
00104   Q_OBJECT
00105 
00106   public:
00113     Editor ( QObject *parent );
00114 
00118     virtual ~Editor ();
00119 
00123   public:
00131     void setSimpleMode (bool on);
00132 
00138     bool simpleMode () const;
00139 
00140   /*
00141    * Methods to create and manage the documents.
00142    */
00143   public:
00150     virtual Document *createDocument ( QObject *parent ) = 0;
00151 
00157     virtual const QList<Document*> &documents () = 0;
00158 
00159   /*
00160    * General Information about this editor.
00161    */
00162   public:
00167     virtual const KAboutData *aboutData () const = 0;
00168 
00169   /*
00170    * Configuration management.
00171    */
00172   public:
00182     virtual void readConfig (KConfig *config = 0) = 0;
00183 
00193     virtual void writeConfig (KConfig *config = 0) = 0;
00194 
00201     virtual bool configDialogSupported () const = 0;
00202 
00214     virtual void configDialog (QWidget *parent) = 0;
00215 
00223     virtual int configPages () const = 0;
00224 
00233     virtual ConfigPage *configPage (int number, QWidget *parent) = 0;
00234 
00242     virtual QString configPageName (int number) const = 0;
00243 
00255     virtual QString configPageFullName (int number) const = 0;
00256 
00263     virtual KIcon configPageIcon (int number) const = 0;
00264 
00265   Q_SIGNALS:
00273     void documentCreated (KTextEditor::Editor *editor,
00274                           KTextEditor::Document *document);
00275 
00276   private:
00277     class EditorPrivate* const d;
00278 };
00279 
00280 
00289 KTEXTEDITOR_EXPORT Editor *editor ( const char *libname );
00290 
00291 }
00292 
00293 #endif
00294 
00295 // 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
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
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