author | alwin <alwin> | 2004-02-26 15:33:31 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-02-26 15:33:31 (UTC) |
commit | 42eb413737eb6e911867e1b9c0f5b6cf81c677fd (patch) (side-by-side diff) | |
tree | b32284f8cec0f584151f0826fd121c153fc07601 /noncore/applets/zkbapplet/zkbapplet.cpp | |
parent | d26a7814b7b454583a136a78aeb7016467ec9ff8 (diff) | |
download | opie-42eb413737eb6e911867e1b9c0f5b6cf81c677fd.zip opie-42eb413737eb6e911867e1b9c0f5b6cf81c677fd.tar.gz opie-42eb413737eb6e911867e1b9c0f5b6cf81c677fd.tar.bz2 |
Yeah - zkb fixed and working within OPIE.
Diffstat (limited to 'noncore/applets/zkbapplet/zkbapplet.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/applets/zkbapplet/zkbapplet.cpp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/noncore/applets/zkbapplet/zkbapplet.cpp b/noncore/applets/zkbapplet/zkbapplet.cpp new file mode 100644 index 0000000..6c71568 --- a/dev/null +++ b/noncore/applets/zkbapplet/zkbapplet.cpp @@ -0,0 +1,49 @@ +#include <stdio.h> +#include <qlabel.h> +#include <qbutton.h> +#include <qwindowsystem_qws.h> +#include "zkbapplet.h" +#include "zkbwidget.h" + + +ZkbApplet::ZkbApplet() : app(0){ +} + +ZkbApplet::~ZkbApplet() +{ + if (app) delete app; +} + +QWidget* ZkbApplet::applet(QWidget* parent) { + if (app == 0) { + app = new ZkbWidget(parent); + } + + return app; +} + +int ZkbApplet::position() const { + return 8; +} + +QRESULT ZkbApplet::queryInterface(const QUuid& uuid, QUnknownInterface** iface) { + + *iface = 0; + if (uuid == IID_QUnknown) { + *iface = this; + } else if (uuid == IID_TaskbarApplet) { + *iface = this; + } else { + return QS_FALSE; + } + + if (*iface) { + (*iface)->addRef(); + } + + return QS_OK; +} + +Q_EXPORT_INTERFACE() { + Q_CREATE_INSTANCE(ZkbApplet) +} |