summaryrefslogtreecommitdiffstats
path: root/kommander/working/plugintemplate/plugin.cpp
blob: a0138bdeb9e2aec9f6958026d02ca72bb57a27c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
%{CPP_TEMPLATE}
#include "%{APPNAMELC}.h"

#include <kommanderplugin.h>
#include <tdeglobal.h>
#include <kiconloader.h>
#include <tdelocale.h>
#include "%{APPNAMELC}.h"

class %{APPNAME}Plugin : public KommanderPlugin
{
public:
    %{APPNAME}Plugin();
    virtual TQWidget *create( const TQString &className, TQWidget *parent = 0, const char *name = 0);
};

%{APPNAME}Plugin::%{APPNAME}Plugin()
{
    addWidget( "%{APPNAME}", "Custom", i18n("Kommander %{APPNAME} plugin."), new TQIconSet(TDEGlobal::iconLoader()->loadIcon("%{APPNAMELC}", TDEIcon::NoGroup, TDEIcon::SizeMedium)) );
}

TQWidget *%{APPNAME}Plugin::create( const TQString &className, TQWidget *parent, const char *name)
{
  if (className == "%{APPNAME}")
    return new %{APPNAME}(parent, name);
  return 0;
}

KOMMANDER_EXPORT_PLUGIN(%{APPNAME}Plugin)