• Skip to content
  • Skip to link menu
KDE 4.2 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 
00048 namespace Kate {
00049   class Command;
00050 }
00051 
00059 class KateGlobal : public KTextEditor::Editor, public KTextEditor::CommandInterface, public KTextEditor::ContainerInterface
00060 {
00061   Q_OBJECT
00062   Q_INTERFACES(KTextEditor::CommandInterface)
00063   Q_INTERFACES(KTextEditor::ContainerInterface)
00064 
00065   private:
00069     KateGlobal ();
00070 
00071   public:
00075     ~KateGlobal ();
00076 
00082     KTextEditor::Document *createDocument ( QObject *parent );
00083 
00088     const QList<KTextEditor::Document*> &documents ();
00089 
00093   public:
00098     const KAboutData* aboutData() const { return &m_aboutData; }
00099 
00103   public:
00108     void readConfig (KConfig *config = 0);
00109 
00114     void writeConfig (KConfig *config = 0);
00115 
00120     bool configDialogSupported () const;
00121 
00127     void configDialog (QWidget *parent);
00128 
00135     int configPages () const;
00136 
00142     KTextEditor::ConfigPage *configPage (int number, QWidget *parent);
00143 
00144     QString configPageName (int number) const;
00145 
00146     QString configPageFullName (int number) const;
00147 
00148     KIcon configPageIcon (int number) const;
00149 
00153   public:
00158     static KateGlobal *self ();
00159 
00163     static void incRef () { ++s_ref; }
00164 
00168     static void decRef () { if (s_ref > 0) --s_ref; if (s_ref == 0) { delete s_self; s_self = 0L; } }
00169 
00174     static QString katePartVersion();
00175 
00180     const KComponentData &componentData() { return m_componentData; }
00181 
00187     void registerDocument ( KateDocument *doc );
00188 
00193     void deregisterDocument ( KateDocument *doc );
00194 
00200     void registerView ( KateView *view );
00201 
00206     void deregisterView ( KateView *view );
00207 
00212     QList<KateDocument*> &kateDocuments () { return m_documents; }
00213 
00218     QList<KateView*> &views () { return m_views; }
00219 
00224     KatePartPluginManager *pluginManager () { return m_pluginManager; }
00225 
00230     KDirWatch *dirWatch () { return m_dirWatch; }
00231 
00237     KateModeManager *modeManager () { return m_modeManager; }
00238 
00243     KateSchemaManager *schemaManager () { return m_schemaManager; }
00244 
00249     KateDocumentConfig *documentConfig () { return m_documentConfig; }
00250 
00255     KateViewConfig *viewConfig () { return m_viewConfig; }
00256 
00261     KateRendererConfig *rendererConfig () { return m_rendererConfig; }
00262 
00266     KateScriptManager *scriptManager () { return m_scriptManager; }
00267 
00272     KateHlManager *hlManager () { return m_hlManager; }
00273 
00278     KateCmd *cmdManager () { return m_cmdManager; }
00279 
00284     KateViGlobal *viInputModeGlobal () { return m_viInputModeGlobal; }
00285 
00292     bool registerCommand (KTextEditor::Command *cmd);
00293 
00300     bool unregisterCommand (KTextEditor::Command *cmd);
00301 
00307     KTextEditor::Command *queryCommand (const QString &cmd) const;
00308 
00313     QList<KTextEditor::Command*> commands() const;
00314 
00319     QStringList commandList() const;
00320 
00321 
00326     QObject * container();
00327 
00331     void setContainer( QObject * container );
00332 
00333   private:
00337     static KateGlobal *s_self;
00338 
00342     static int s_ref;
00343 
00347     KAboutData m_aboutData;
00348 
00352     KComponentData m_componentData;
00353 
00357     QList<KateDocument*> m_documents;
00358 
00362     QList<KateView*> m_views;
00363 
00367     KDirWatch *m_dirWatch;
00368 
00372     KateModeManager *m_modeManager;
00373 
00377     KateSchemaManager *m_schemaManager;
00378 
00382     KatePartPluginManager *m_pluginManager;
00383 
00387     KateDocumentConfig *m_documentConfig;
00388 
00392     KateViewConfig *m_viewConfig;
00393 
00397     KateRendererConfig *m_rendererConfig;
00398 
00402     QList<KTextEditor::Command *> m_cmds;
00403 
00407     KateScriptManager *m_scriptManager;
00408 
00412     KateHlManager *m_hlManager;
00413 
00417     KateCmd *m_cmdManager;
00418 
00422     KateViGlobal *m_viInputModeGlobal;
00423 
00424     QList<KTextEditor::Document*> m_docs;
00425 
00429     QPointer<QObject> m_container;
00430 };
00431 
00432 #endif
00433 
00434 // 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
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
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