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

references,
parent, "firstapplet");
}
}