• Skip to content
  • Skip to link menu
KDE 4.1 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 <QtCore/QList>
00031 
00036 #define KATEPART_VERSION "3.1"
00037 
00038 class KateCmd;
00039 class KateModeManager;
00040 class KateSchemaManager;
00041 class KateDocumentConfig;
00042 class KateViewConfig;
00043 class KateRendererConfig;
00044 class KateDocument;
00045 class KateRenderer;
00046 class KateView;
00047 class KateScriptManager;
00048 class KDirWatch;
00049 class KateHlManager;
00050 class KateCmd;
00051 class KatePartPluginManager;
00052 
00053 namespace Kate {
00054   class Command;
00055 }
00056 
00064 class KateGlobal : public KTextEditor::Editor, public KTextEditor::CommandInterface
00065 {
00066   Q_OBJECT
00067   Q_INTERFACES(KTextEditor::CommandInterface)
00068 
00069   private:
00073     KateGlobal ();
00074 
00075   public:
00079     ~KateGlobal ();
00080 
00086     KTextEditor::Document *createDocument ( QObject *parent );
00087 
00092     const QList<KTextEditor::Document*> &documents ();
00093 
00097   public:
00102     const KAboutData* aboutData() const { return &m_aboutData; }
00103 
00107   public:
00112     void readConfig (KConfig *config = 0);
00113 
00118     void writeConfig (KConfig *config = 0);
00119 
00124     bool configDialogSupported () const;
00125 
00131     void configDialog (QWidget *parent);
00132 
00139     int configPages () const;
00140 
00146     KTextEditor::ConfigPage *configPage (int number, QWidget *parent);
00147 
00148     QString configPageName (int number) const;
00149 
00150     QString configPageFullName (int number) const;
00151 
00152     KIcon configPageIcon (int number) const;
00153 
00157   public:
00162     static KateGlobal *self ();
00163 
00167     static void incRef () { ++s_ref; }
00168 
00172     static void decRef () { if (s_ref > 0) --s_ref; if (s_ref == 0) { delete s_self; s_self = 0L; } }
00173 
00178     const KComponentData &componentData() { return m_componentData; }
00179 
00185     void registerDocument ( KateDocument *doc );
00186 
00191     void deregisterDocument ( KateDocument *doc );
00192 
00198     void registerView ( KateView *view );
00199 
00204     void deregisterView ( KateView *view );
00205 
00210     QList<KateDocument*> &kateDocuments () { return m_documents; }
00211 
00216     QList<KateView*> &views () { return m_views; }
00217 
00222     KatePartPluginManager *pluginManager () { return m_pluginManager; }
00223 
00228     KDirWatch *dirWatch () { return m_dirWatch; }
00229 
00235     KateModeManager *modeManager () { return m_modeManager; }
00236 
00241     KateSchemaManager *schemaManager () { return m_schemaManager; }
00242 
00247     KateDocumentConfig *documentConfig () { return m_documentConfig; }
00248 
00253     KateViewConfig *viewConfig () { return m_viewConfig; }
00254 
00259     KateRendererConfig *rendererConfig () { return m_rendererConfig; }
00260 
00264     KateScriptManager *scriptManager () { return m_scriptManager; }
00265 
00270     KateHlManager *hlManager () { return m_hlManager; }
00271 
00276     KateCmd *cmdManager () { return m_cmdManager; }
00277 
00284     bool registerCommand (KTextEditor::Command *cmd);
00285 
00292     bool unregisterCommand (KTextEditor::Command *cmd);
00293 
00299     KTextEditor::Command *queryCommand (const QString &cmd) const;
00300 
00305     QList<KTextEditor::Command*> commands() const;
00306 
00311     QStringList commandList() const;
00312 
00313   private:
00317     static KateGlobal *s_self;
00318 
00322     static int s_ref;
00323 
00327     KAboutData m_aboutData;
00328 
00332     KComponentData m_componentData;
00333 
00337     QList<KateDocument*> m_documents;
00338 
00342     QList<KateView*> m_views;
00343 
00347     KDirWatch *m_dirWatch;
00348 
00352     KateModeManager *m_modeManager;
00353 
00357     KateSchemaManager *m_schemaManager;
00358 
00362     KatePartPluginManager *m_pluginManager;
00363 
00367     KateDocumentConfig *m_documentConfig;
00368 
00372     KateViewConfig *m_viewConfig;
00373 
00377     KateRendererConfig *m_rendererConfig;
00378 
00382     QList<KTextEditor::Command *> m_cmds;
00383 
00387     KateScriptManager *m_scriptManager;
00388 
00392     KateHlManager *m_hlManager;
00393 
00397     KateCmd *m_cmdManager;
00398 
00399     QList<KTextEditor::Document*> m_docs;
00400 };
00401 
00402 #endif
00403 
00404 // 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
  • 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