You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdewebdev/kommander/working/plugintemplate/plugin.cpp

30 lines
808 B

%{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 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}", KIcon::NoGroup, KIcon::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)