summaryrefslogtreecommitdiffstats
path: root/kommander/working/plugintemplate/plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/working/plugintemplate/plugin.cpp')
-rw-r--r--kommander/working/plugintemplate/plugin.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/kommander/working/plugintemplate/plugin.cpp b/kommander/working/plugintemplate/plugin.cpp
new file mode 100644
index 00000000..e6b506cc
--- /dev/null
+++ b/kommander/working/plugintemplate/plugin.cpp
@@ -0,0 +1,29 @@
+%{CPP_TEMPLATE}
+#include "%{APPNAMELC}.h"
+
+#include <kommanderplugin.h>
+#include <kglobal.h>
+#include <kiconloader.h>
+#include <klocale.h>
+#include "%{APPNAMELC}.h"
+
+class %{APPNAME}Plugin : public KommanderPlugin
+{
+public:
+ %{APPNAME}Plugin();
+ virtual QWidget *create( const QString &className, QWidget *parent = 0, const char *name = 0);
+};
+
+%{APPNAME}Plugin::%{APPNAME}Plugin()
+{
+ addWidget( "%{APPNAME}", "Custom", i18n("Kommander %{APPNAME} plugin."), new QIconSet(KGlobal::iconLoader()->loadIcon("%{APPNAMELC}", KIcon::NoGroup, KIcon::SizeMedium)) );
+}
+
+QWidget *%{APPNAME}Plugin::create( const QString &className, QWidget *parent, const char *name)
+{
+ if (className == "%{APPNAME}")
+ return new %{APPNAME}(parent, name);
+ return 0;
+}
+
+KOMMANDER_EXPORT_PLUGIN(%{APPNAME}Plugin)