• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • KDevelop Platform Libraries
  • Sitemap
  • Contact Us
 

interfaces

iplugin.h

00001 /* This file is part of the KDE project
00002    Copyright 1999-2001 Bernd Gehrmann <bernd@kdevelop.org>
00003    Copyright 2004,2007 Alexander Dymo <adymo@kdevelop.org>
00004    Copyright 2006 Adam Treat <treat@kde.org>
00005    Copyright 2007 Andreas Pakulat <apaku@gmx.de>
00006 
00007    This library is free software; you can redistribute it and/or
00008    modify it under the terms of the GNU Library General Public
00009    License as published by the Free Software Foundation; either
00010    version 2 of the License, or (at your option) any later version.
00011 
00012    This library is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015    Library General Public License for more details.
00016 
00017    You should have received a copy of the GNU Library General Public License
00018    along with this library; see the file COPYING.LIB.  If not, write to
00019    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020    Boston, MA 02110-1301, USA.
00021 */
00022 #ifndef IPLUGIN_H
00023 #define IPLUGIN_H
00024 
00025 #include <QtCore/QObject>
00026 #include <kxmlguiclient.h>
00027 
00028 #include <QtCore/QList>
00029 #include <QtCore/QPointer>
00030 #include <QtCore/QPair>
00031 #include <QtDesigner/QExtensionManager>
00032 #include "interfacesexport.h"
00033 
00034 class KIconLoader;
00035 class QAction;
00036 
00042 #define KDEVELOP_PLUGIN_VERSION 6
00043 
00049 #define KDEV_USE_EXTENSION_INTERFACE( Extension ) \
00050     addExtension( Q_TYPEID( Extension ) );
00051 
00052 namespace KDevelop
00053 {
00054 
00055 class ICore;
00056 class Context;
00057 class ContextMenuExtension;
00058 
00133 class KDEVPLATFORMINTERFACES_EXPORT IPlugin: public QObject, public KXMLGUIClient
00134 {
00135     Q_OBJECT
00136 
00137 public:
00142     IPlugin(const KComponentData &instance, QObject *parent);
00143 
00145     virtual ~IPlugin();
00146 
00150     Q_SCRIPTABLE virtual void unload();
00151 
00156     Q_SCRIPTABLE KIconLoader* iconLoader() const;
00157 
00158     Q_SCRIPTABLE ICore *core() const;
00159 
00160     Q_SCRIPTABLE void registerExtensions();
00161     Q_SCRIPTABLE void unregisterExtensions();
00162 
00163     Q_SCRIPTABLE QStringList extensions() const;
00164 
00165     template<class Extension> Extension* extension()
00166     {
00167         return qt_extension<Extension*>( extensionManager(), this );
00168     }
00169 
00176     virtual ContextMenuExtension contextMenuExtension( KDevelop::Context* context );
00177 
00178 public Q_SLOTS:
00182     void newIconLoader() const;
00183 
00184 protected:
00185     void addExtension( const QString& );
00186 
00190     virtual void initializeGuiState();
00191 
00192 private:
00193     Q_PRIVATE_SLOT(d, void _k_guiClientAdded(KXMLGUIClient *))
00194     Q_PRIVATE_SLOT(d, void _k_updateState())
00195 
00196     friend class IPluginPrivate;
00197     class IPluginPrivate* const d;
00198     QExtensionManager* extensionManager();
00199 };
00200 
00201 }
00202 #endif
00203 

interfaces

Skip menu "interfaces"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

KDevelop Platform Libraries

Skip menu "KDevelop Platform Libraries"
  • interfaces
  • language
  •   duchain
  •   editor
  • outputview
  • project
  • shell
  • sublime
  • util
  • vcs
Generated for KDevelop Platform Libraries 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