• Skip to content
  • Skip to link menu
KDE 4.3 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 KateViGlobal;
00047 class KateWordCompletionModel;
00048 
00049 namespace Kate {
00050   class Command;
00051 }
00052 
00060 class KateGlobal : public KTextEditor::Editor, public KTextEditor::CommandInterface, public KTextEditor::ContainerInterface
00061 {
00062   Q_OBJECT
00063   Q_INTERFACES(KTextEditor::CommandInterface)
00064   Q_INTERFACES(KTextEditor::ContainerInterface)
00065 
00066   private:
00070     KateGlobal ();
00071 
00072   public:
00076     ~KateGlobal ();
00077 
00083     KTextEditor::Document *createDocument ( QObject *parent );
00084 
00089     const QList<KTextEditor::Document*> &documents ();
00090 
00094   public:
00099     const KAboutData* aboutData() const { return &m_aboutData; }
00100 
00104   public:
00109     void readConfig (KConfig *config = 0);
00110 
00115     void writeConfig (KConfig *config = 0);
00116 
00121     bool configDialogSupported () const;
00122 
00128     void configDialog (QWidget *parent);
00129 
00136     int configPages () const;
00137 
00143     KTextEditor::ConfigPage *configPage (int number, QWidget *parent);
00144 
00145     QString configPageName (int number) const;
00146 
00147     QString configPageFullName (int number) const;
00148 
00149     KIcon configPageIcon (int number) const;
00150 
00154   public:
00159     static KateGlobal *self ();
00160 
00164     static void incRef () { ++s_ref; }
00165 
00169     static void decRef () { if (s_ref > 0) --s_ref; if (s_ref == 0) { delete s_self; s_self = 0L; } }
00170 
00175     static QString katePartVersion();
00176 
00181     const KComponentData &componentData() { return m_componentData; }
00182 
00188     void registerDocument ( KateDocument *doc );
00189 
00194     void deregisterDocument ( KateDocument *doc );
00195 
00201     void registerView ( KateView *view );
00202 
00207     void deregisterView ( KateView *view );
00208 
00213     QList<KateDocument*> &kateDocuments () { return m_documents; }
00214 
00219     QList<KateView*> &views () { return m_views; }
00220 
00225     KatePartPluginManager *pluginManager () { return m_pluginManager; }
00226 
00231     KDirWatch *dirWatch () { return m_dirWatch; }
00232 
00238     KateModeManager *modeManager () { return m_modeManager; }
00239 
00244     KateSchemaManager *schemaManager () { return m_schemaManager; }
00245 
00250     KateDocumentConfig *documentConfig () { return m_documentConfig; }
00251 
00256     KateViewConfig *viewConfig () { return m_viewConfig; }
00257 
00262     KateRendererConfig *rendererConfig () { return m_rendererConfig; }
00263 
00267     KateScriptManager *scriptManager () { return m_scriptManager; }
00268 
00273     KateHlManager *hlManager () { return m_hlManager; }
00274 
00279     KateCmd *cmdManager () { return m_cmdManager; }
00280 
00285     KateViGlobal *viInputModeGlobal () { return m_viInputModeGlobal; }
00286 
00291     KateWordCompletionModel *wordCompletionModel () { return m_wordCompletionModel; }
00292 
00299     bool registerCommand (KTextEditor::Command *cmd);
00300 
00307     bool unregisterCommand (KTextEditor::Command *cmd);
00308 
00314     KTextEditor::Command *queryCommand (const QString &cmd) const;
00315 
00320     QList<KTextEditor::Command*> commands() const;
00321 
00326     QStringList commandList() const;
00327 
00328 
00333     QObject * container();
00334 
00338     void setContainer( QObject * container );
00339 
00340   private:
00344     static KateGlobal *s_self;
00345 
00349     static int s_ref;
00350 
00354     KAboutData m_aboutData;
00355 
00359     KComponentData m_componentData;
00360 
00364     QList<KateDocument*> m_documents;
00365 
00369     QList<KateView*> m_views;
00370 
00374     KDirWatch *m_dirWatch;
00375 
00379     KateModeManager *m_modeManager;
00380 
00384     KateSchemaManager *m_schemaManager;
00385 
00389     KatePartPluginManager *m_pluginManager;
00390 
00394     KateDocumentConfig *m_documentConfig;
00395 
00399     KateViewConfig *m_viewConfig;
00400 
00404     KateRendererConfig *m_rendererConfig;
00405 
00409     QList<KTextEditor::Command *> m_cmds;
00410 
00414     KateScriptManager *m_scriptManager;
00415 
00419     KateHlManager *m_hlManager;
00420 
00424     KateCmd *m_cmdManager;
00425 
00429     KateViGlobal *m_viInputModeGlobal;
00430 
00431     QList<KTextEditor::Document*> m_docs;
00432 
00436     QPointer<QObject> m_container;
00437     
00441     KateWordCompletionModel *m_wordCompletionModel;
00442 };
00443 
00444 #endif
00445 
00446 // 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
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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