From e9ae80694875f869892f13f4fcaf1170a00dea41 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: 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/kdewebdev@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kommander/working/plugintemplate/plugin.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 kommander/working/plugintemplate/plugin.cpp (limited to 'kommander/working/plugintemplate/plugin.cpp') 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 +#include +#include +#include +#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) -- cgit v1.2.1