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

Kate

kateglobal.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002    Copyright (C) 2001-2005 Christoph Cullmann <cullmann@kde.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 version 2 as published by the Free Software Foundation.
00007 
00008    This library is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011    Library General Public License for more details.
00012 
00013    You should have received a copy of the GNU Library General Public License
00014    along with this library; see the file COPYING.LIB.  If not, write to
00015    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016    Boston, MA 02110-1301, USA.
00017 */
00018 
00019 #ifndef __KATE_GLOBAL_H__
00020 #define __KATE_GLOBAL_H__
00021 
00022 #include "katescript.h"
00023 
00024 #include <ktexteditor/editor.h>
00025 
00026 #include <kservice.h>
00027 #include <kcomponentdata.h>
00028 #include <kaboutdata.h>
00029 #include <ktexteditor/commandinterface.h>
00030 #include <ktexteditor/containerinterface.h>
00031 #include <QtCore/QList>
00032 
00033 class KateCmd;
00034 class KateModeManager;
00035 class KateSchemaManager;
00036 class KateDocumentConfig;
00037 class KateViewConfig;
00038 class KateRendererConfig;
00039 class KateDocument;
00040 class KateRenderer;
00041 class KateView;
00042 class KateScriptManager;
00043 class KDirWatch;
00044 class KateHlManager;
00045 class KatePartPluginManager;
00046 class KateSpellCheckManager;
00047 class KateViGlobal;
00048 class KateWordCompletionModel;
00049 
00050 namespace Kate {
00051   class Command;
00052 }
00053 
00061 class KateGlobal : public KTextEditor::Editor, public KTextEditor::CommandInterface, public KTextEditor::ContainerInterface
00062 {
00063   Q_OBJECT
00064   Q_INTERFACES(KTextEditor::CommandInterface)
00065   Q_INTERFACES(KTextEditor::ContainerInterface)
00066 
00067   private:
00071     KateGlobal ();
00072 
00073   public:
00077     ~KateGlobal ();
00078 
00084     KTextEditor::Document *createDocument ( QObject *parent );
00085 
00090     const QList<KTextEditor::Document*> &documents ();
00091 
00095   public:
00100     const KAboutData* aboutData() const { return &m_aboutData; }
00101 
00105   public:
00110     void readConfig (KConfig *config = 0);
00111 
00116     void writeConfig (KConfig *config = 0);
00117 
00122     bool configDialogSupported () const;
00123 
00129     void configDialog (QWidget *parent);
00130 
00137     int configPages () const;
00138 
00144     KTextEditor::ConfigPage *configPage (int number, QWidget *parent);
00145 
00146     QString configPageName (int number) const;
00147 
00148     QString configPageFullName (int number) const;
00149 
00150     KIcon configPageIcon (int number) const;
00151 
00155   public:
00160     static KateGlobal *self ();
00161 
00165     static void incRef () { ++s_ref; }
00166 
00170     static void decRef () { if (s_ref > 0) --s_ref; if (s_ref == 0) { delete s_self; s_self = 0L; } }
00171 
00176     static QString katePartVersion();
00177 
00182     const KComponentData &componentData() { return m_componentData; }
00183 
00189     void registerDocument ( KateDocument *doc );
00190 
00195     void deregisterDocument ( KateDocument *doc );
00196 
00202     void registerView ( KateView *view );
00203 
00208     void deregisterView ( KateView *view );
00209 
00214     QList<KateDocument*> &kateDocuments () { return m_documents; }
00215 
00220     QList<KateView*> &views () { return m_views; }
00221 
00226     KatePartPluginManager *pluginManager () { return m_pluginManager; }
00227 
00232     KDirWatch *dirWatch () { return m_dirWatch; }
00233 
00239     KateModeManager *modeManager () { return m_modeManager; }
00240 
00245     KateSchemaManager *schemaManager () { return m_schemaManager; }
00246 
00251     KateDocumentConfig *documentConfig () { return m_documentConfig; }
00252 
00257     KateViewConfig *viewConfig () { return m_viewConfig; }
00258 
00263     KateRendererConfig *rendererConfig () { return m_rendererConfig; }
00264 
00268     KateScriptManager *scriptManager () { return m_scriptManager; }
00269 
00274     KateHlManager *hlManager () { return m_hlManager; }
00275 
00280     KateCmd *cmdManager () { return m_cmdManager; }
00281 
00286     KateViGlobal *viInputModeGlobal () { return m_viInputModeGlobal; }
00287 
00292     KateSpellCheckManager *spellCheckManager () { return m_spellCheckManager; }
00293 
00298     KateWordCompletionModel *wordCompletionModel () { return m_wordCompletionModel; }
00299 
00306     bool registerCommand (KTextEditor::Command *cmd);
00307 
00314     bool unregisterCommand (KTextEditor::Command *cmd);
00315 
00321     KTextEditor::Command *queryCommand (const QString &cmd) const;
00322 
00327     QList<KTextEditor::Command*> commands() const;
00328 
00333     QStringList commandList() const;
00334 
00335 
00340     QObject * container();
00341 
00345     void setContainer( QObject * container );
00346 
00347   private:
00351     static KateGlobal *s_self;
00352 
00356     static int s_ref;
00357 
00361     KAboutData m_aboutData;
00362 
00366     KComponentData m_componentData;
00367 
00371     QList<KateDocument*> m_documents;
00372 
00376     QList<KateView*> m_views;
00377 
00381     KDirWatch *m_dirWatch;
00382 
00386     KateModeManager *m_modeManager;
00387 
00391     KateSchemaManager *m_schemaManager;
00392 
00396     KatePartPluginManager *m_pluginManager;
00397 
00401     KateDocumentConfig *m_documentConfig;
00402 
00406     KateViewConfig *m_viewConfig;
00407 
00411     KateRendererConfig *m_rendererConfig;
00412 
00416     QList<KTextEditor::Command *> m_cmds;
00417 
00421     KateScriptManager *m_scriptManager;
00422 
00426     KateHlManager *m_hlManager;
00427 
00431     KateCmd *m_cmdManager;
00432 
00436     KateViGlobal *m_viInputModeGlobal;
00437 
00441     KateSpellCheckManager *m_spellCheckManager;
00442 
00443     QList<KTextEditor::Document*> m_docs;
00444 
00448     QPointer<QObject> m_container;
00449     
00453     KateWordCompletionModel *m_wordCompletionModel;
00454 };
00455 
00456 #endif
00457 
00458 // kate: space-indent on; indent-width 2; replace-tabs on;

Kate

Skip menu "Kate"
  • Main Page
  • 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
  • KUtils
  • Nepomuk
  • Plasma
  •     Sodep
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.9-20090814
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