summaryrefslogtreecommitdiffstats
path: root/kmymoney2/plugins/pluginloader.h
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/plugins/pluginloader.h')
-rw-r--r--kmymoney2/plugins/pluginloader.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/kmymoney2/plugins/pluginloader.h b/kmymoney2/plugins/pluginloader.h
new file mode 100644
index 0000000..4d0c500
--- /dev/null
+++ b/kmymoney2/plugins/pluginloader.h
@@ -0,0 +1,76 @@
+/***************************************************************************
+ pluginloader.h
+ -------------------
+ begin : Thu Feb 12 2009
+ copyright : (C) 2009 Cristian Onet
+ email : onet.cristian@gmail.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef PLUGINLOADER_H
+#define PLUGINLOADER_H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+// ----------------------------------------------------------------------------
+// QT Includes
+
+#include <qwidget.h>
+#include <qscrollview.h>
+
+// ----------------------------------------------------------------------------
+// KDE Includes
+#include <kplugininfo.h>
+
+// ----------------------------------------------------------------------------
+// Project Includes
+
+#include <kmymoney/export.h>
+
+class KPluginSelector;
+
+namespace KMyMoneyPlugin
+{
+ class Plugin;
+
+ class KMYMONEY_EXPORT PluginLoader : public QObject
+ {
+ Q_OBJECT
+ public:
+ PluginLoader(QObject* parent);
+ virtual ~PluginLoader();
+ static PluginLoader* instance();
+
+ void loadPlugins();
+ Plugin* getPluginFromInfo(KPluginInfo*);
+ KPluginSelector* pluginSelectorWidget();
+
+ private:
+ void loadPlugin(KPluginInfo*);
+
+ signals:
+ void plug(KPluginInfo*);
+ void unplug(KPluginInfo*);
+ void configChanged(Plugin*); // consfiguration of the plugin has changed not the enabled/disabled state
+
+ private slots:
+ void changed();
+ void changedConfigOfPlugin( const QCString & );
+
+ private:
+ struct Private;
+ Private* d;
+ };
+}
+
+#endif /* PLUGINLOADER_H */