• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • 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 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 #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 
00174     const QString &defaultEncoding () const;
00175 
00176   protected:
00183     void setDefaultEncoding (const QString &defaultEncoding);
00184 
00185   /*
00186    * Configuration management.
00187    */
00188   public:
00198     virtual void readConfig (KConfig *config = 0) = 0;
00199 
00209     virtual void writeConfig (KConfig *config = 0) = 0;
00210 
00217     virtual bool configDialogSupported () const = 0;
00218 
00230     virtual void configDialog (QWidget *parent) = 0;
00231 
00239     virtual int configPages () const = 0;
00240 
00249     virtual ConfigPage *configPage (int number, QWidget *parent) = 0;
00250 
00258     virtual QString configPageName (int number) const = 0;
00259 
00271     virtual QString configPageFullName (int number) const = 0;
00272 
00279     virtual KIcon configPageIcon (int number) const = 0;
00280 
00281   Q_SIGNALS:
00289     void documentCreated (KTextEditor::Editor *editor,
00290                           KTextEditor::Document *document);
00291 
00292   private:
00293     class EditorPrivate* const d;
00294 };
00295 
00296 
00305 KTEXTEDITOR_EXPORT Editor *editor ( const char *libname );
00306 
00307 }
00308 
00309 #endif
00310 
00311 // 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
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
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