summaryrefslogtreecommitdiff
path: root/noncore/applets/zkbapplet/zkbwidget.cpp
authorzecke <zecke>2004-03-13 21:53:54 (UTC)
committer zecke <zecke>2004-03-13 21:53:54 (UTC)
commit2eb5c075b612498c4b65f3d49389b8612612a930 (patch) (side-by-side diff)
treea0230cd9007f71bbb387b71b8e58684937e0cf70 /noncore/applets/zkbapplet/zkbwidget.cpp
parent184a0cd9935d0a249038cdbe05488c181b273d64 (diff)
downloadopie-2eb5c075b612498c4b65f3d49389b8612612a930.zip
opie-2eb5c075b612498c4b65f3d49389b8612612a930.tar.gz
opie-2eb5c075b612498c4b65f3d49389b8612612a930.tar.bz2
Introduce the namespace
and the new APPLET_EXPORT define
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 )
+