|
|
|
%{CPP_TEMPLATE}
|
|
|
|
|
|
|
|
#include <tqlcdnumber.h>
|
|
|
|
#include <kglobal.h>
|
|
|
|
#include <klocale.h>
|
|
|
|
#include <kconfig.h>
|
|
|
|
#include <kapplication.h>
|
|
|
|
#include <kmessagebox.h>
|
|
|
|
|
|
|
|
#include "%{APPNAMELC}.h"
|
|
|
|
|
|
|
|
|
|
|
|
%{APPNAME}::%{APPNAME}(const TQString& configFile, Type type, int actions, TQWidget *tqparent, const char *name)
|
|
|
|
: KPanelApplet(configFile, type, actions, tqparent, name)
|
|
|
|
{
|
|
|
|
// Get the current application configuration handle
|
|
|
|
ksConfig = config();
|
|
|
|
TQLCDNumber *w = new TQLCDNumber(this);
|
|
|
|
w->display(42);
|
|
|
|
|
|
|
|
mainView = w;
|
|
|
|
mainView->show();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
%{APPNAME}::~%{APPNAME}()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void %{APPNAME}::about()
|
|
|
|
{
|
|
|
|
KMessageBox::information(0, i18n("This is an about box"));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void %{APPNAME}::help()
|
|
|
|
{
|
|
|
|
KMessageBox::information(0, i18n("This is a help box"));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void %{APPNAME}::preferences()
|
|
|
|
{
|
|
|
|
KMessageBox::information(0, i18n("This is a preferences box"));
|
|
|
|
}
|
|
|
|
|
|
|
|
int %{APPNAME}::widthForHeight(int height) const
|
|
|
|
{
|
|
|
|
return width();
|
|
|
|
}
|
|
|
|
|
|
|
|
int %{APPNAME}::heightForWidth(int width) const
|
|
|
|
{
|
|
|
|
return height();
|
|
|
|
}
|
|
|
|
|
|
|
|
void %{APPNAME}::resizeEvent(TQResizeEvent *e)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
KPanelApplet* init( TQWidget *tqparent, const TQString& configFile)
|
|
|
|
{
|
|
|
|
KGlobal::locale()->insertCatalogue("%{APPNAMELC}");
|
|
|
|
return new %{APPNAME}(configFile, KPanelApplet::Normal,
|
|
|
|
KPanelApplet::About | KPanelApplet::Help | KPanelApplet::Preferences,
|
|
|
|
tqparent, "%{APPNAMELC}");
|
|
|
|
}
|
|
|
|
}
|