summaryrefslogtreecommitdiffstats
path: root/src/plugincontroller.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch)
treeacaf47eb0fa12142d3896416a69e74cbf5a72242 /src/plugincontroller.h
downloadtdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz
tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/plugincontroller.h')
-rw-r--r--src/plugincontroller.h96
1 files changed, 96 insertions, 0 deletions
diff --git a/src/plugincontroller.h b/src/plugincontroller.h
new file mode 100644
index 00000000..9b526e3e
--- /dev/null
+++ b/src/plugincontroller.h
@@ -0,0 +1,96 @@
+#ifndef __PLUGINCONTROLLER_H__
+#define __PLUGINCONTROLLER_H__
+
+#include <qdict.h>
+#include <qvaluelist.h>
+
+#include <kservice.h>
+
+#include <kdevplugincontroller.h>
+
+#include <profileengine.h>
+
+class KXMLGUIClient;
+class KService;
+class KDevPlugin;
+class KDialogBase;
+class ProjectInfo;
+
+/**
+Plugin controller implementation.
+Loads and unloads plugins.
+*/
+class PluginController : public KDevPluginController
+{
+ Q_OBJECT
+
+public:
+
+ ~PluginController();
+
+ static PluginController *getInstance();
+ static QStringList argumentsFromService( const KService::Ptr &service );
+
+
+ virtual KDevPlugin * loadPlugin( const QString & serviceType, const QString & constraint );
+ virtual void unloadPlugin( const QString & plugin );
+
+ QString currentProfile() const { return m_profile; }
+
+ void loadInitialPlugins();
+
+ void loadProjectPlugins( const QStringList & ignorePlugins );
+ void unloadProjectPlugins();
+
+ void loadGlobalPlugins( const QStringList & ignorePlugins = QStringList() );
+
+ // KDevPlugin * getPlugin( const KService::Ptr &service );
+
+ virtual KDevPlugin *extension(const QString &serviceType, const QString &constraint = "");
+
+ void unloadPlugins( QStringList const & );
+
+ void integratePart(KXMLGUIClient *part);
+ void integrateAndRememberPart(const QString &name, KDevPlugin *part);
+ void removePart(KXMLGUIClient* part);
+ void removeAndForgetPart(const QString &name, KDevPlugin* part);
+
+ const QValueList<KDevPlugin*> loadedPlugins();
+
+ ProfileEngine &engine() { return m_engine; }
+
+ virtual KURL::List profileResources(const QString &nameFilter);
+ virtual KURL::List profileResourcesRecursive(const QString &nameFilter);
+
+ //returns the name of an old profile that was unloaded
+ QString changeProfile(const QString &newProfile);
+
+public slots:
+ void selectPlugins();
+
+signals:
+ void loadingPlugin(const QString &plugin);
+
+protected:
+ PluginController();
+
+private slots:
+// void slotConfigWidget( KDialogBase* );
+ void loadCorePlugins();
+ void loadPlugins( KTrader::OfferList offers, const QStringList & ignorePlugins = QStringList() );
+ void unloadPlugins();
+
+private:
+ static KDevPlugin *loadPlugin( const KService::Ptr &service );
+
+
+ QDict<KDevPlugin> m_parts;
+ QString m_profile;
+
+ static PluginController *s_instance;
+
+ ProfileEngine m_engine;
+
+};
+
+#endif