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

Kate

katepartpluginmanager.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002    Copyright 2001 Christoph Cullmann <cullmann@kde.org>
00003    Copyright 2001 Joseph Wenninger <jowenn@kde.org>
00004    Copyright 2001 Anders Lund <anders.lund@lund.tdcadsl.dk>
00005    Copyright 2007 Dominik Haumann <dhaumann kde org>
00006 
00007    Taken from kdesdk/kate/app/katepluginmanager.cpp/h and adapted
00008 
00009    This library is free software; you can redistribute it and/or
00010    modify it under the terms of the GNU Library General Public
00011    License version 2 as published by the Free Software Foundation.
00012 
00013    This library is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016    Library General Public License for more details.
00017 
00018    You should have received a copy of the GNU Library General Public License
00019    along with this library; see the file COPYING.LIB.  If not, write to
00020    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00021    Boston, MA 02110-1301, USA.
00022 */
00023 
00024 #ifndef KATEPARTPLUGINMANAGER_H
00025 #define KATEPARTPLUGINMANAGER_H
00026 
00027 #include <kservice.h>
00028 
00029 #include <QObject>
00030 #include <QList>
00031 
00032 namespace KTextEditor {
00033   class Plugin;
00034   class Document;
00035   class View;
00036 }
00037 
00038 class KatePartPluginInfo
00039 {
00040   public:
00041     mutable bool load;
00042     KService::Ptr service;
00043     KTextEditor::Plugin *plugin;
00044     QString saveName() const;
00045 };
00046 
00047 typedef QList<KatePartPluginInfo> KatePartPluginList;
00048 
00049 class KatePartPluginManager : public QObject
00050 {
00051     Q_OBJECT
00052 
00053   public:
00054     KatePartPluginManager();
00055     ~KatePartPluginManager();
00056 
00057     static KatePartPluginManager *self();
00058 
00059     void loadConfig ();
00060     void writeConfig ();
00061 
00062     void addDocument(KTextEditor::Document *doc);
00063     void removeDocument(KTextEditor::Document *doc);
00064 
00065     void addView(KTextEditor::View *view);
00066     void removeView(KTextEditor::View *view);
00067 
00068     void loadAllPlugins ();
00069     void unloadAllPlugins ();
00070 
00071     void loadPlugin (KatePartPluginInfo &item);
00072     void unloadPlugin (KatePartPluginInfo &item);
00073 
00074     void enablePlugin (KatePartPluginInfo &item);
00075     void disablePlugin (KatePartPluginInfo &item);
00076 
00077     inline KatePartPluginList & pluginList ()
00078     {
00079       return m_pluginList;
00080     }
00081 
00082   private:
00083     void setupPluginList ();
00084 
00085     KConfig *m_config;
00086     KatePartPluginList m_pluginList;
00087 };
00088 
00089 #endif // KATEPARTPLUGINMANAGER_H
00090 
00091 // 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