summaryrefslogtreecommitdiff
path: root/noncore/applets/zkbapplet/zkbwidget.cpp
Side-by-side diff
Diffstat (limited to 'noncore/applets/zkbapplet/zkbwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/zkbapplet/zkbwidget.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/noncore/applets/zkbapplet/zkbwidget.cpp b/noncore/applets/zkbapplet/zkbwidget.cpp
index 0083e9b..3acff1e 100644
--- a/noncore/applets/zkbapplet/zkbwidget.cpp
+++ b/noncore/applets/zkbapplet/zkbwidget.cpp
@@ -5,17 +5,18 @@
#include <qpe/resource.h>
#include <stdio.h>
#include <unistd.h>
#include "zkbwidget.h"
#include "zkbcfg.h"
+using namespace Opie::Ui;
ZkbWidget::ZkbWidget(QWidget* parent):QLabel(parent),keymap(0),
disabled(Resource::loadPixmap("zkb-disabled")) {
labels = new QPopupMenu();
- connect(labels, SIGNAL(activated(int)), this,
+ connect(labels, SIGNAL(activated(int)), this,
SLOT(labelChanged(int)));
loadKeymap();
channel = new QCopChannel("QPE/zkb", this);
connect(channel, SIGNAL(received(const QCString&,const QByteArray&)),
@@ -65,13 +66,13 @@ bool ZkbWidget::loadKeymap() {
labels->clear();
QStringList l = keymap->listLabels();
labels->insertItem(disabled, 0, 0);
int n = 1;
w = 0;
- for(QStringList::Iterator it = l.begin(); it != l.end();
+ for(QStringList::Iterator it = l.begin(); it != l.end();
++it, n++) {
// printf("label: %s\n", (const char*) (*it).utf8());
labels->insertItem(*it, n, n);
int lw = fm.width(*it);
@@ -152,11 +153,9 @@ void ZkbWidget::signalReceived(const QCString& msg, const QByteArray& data) {
void ZkbWidget::reload() {
loadKeymap();
QCopEnvelope("QPE/System", "notBusy()");
}
-Q_EXPORT_INTERFACE()
-{
- Q_CREATE_INSTANCE( OTaskbarAppletWrapper<ZkbWidget> );
-}
+EXPORT_OPIE_APPLET_v1( ZkbWidget )
+