diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | e9ae80694875f869892f13f4fcaf1170a00dea41 (patch) | |
tree | aa2f8d8a217e2d376224c8d46b7397b68d35de2d /kommander/working/plugintemplate/plugin.cpp | |
download | tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.tar.gz tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.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/kdewebdev@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/working/plugintemplate/plugin.cpp')
-rw-r--r-- | kommander/working/plugintemplate/plugin.cpp | 29 |
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) |