summaryrefslogtreecommitdiff
path: root/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperApplet.cpp
authoralwin <alwin>2005-02-28 09:40:30 (UTC)
committer alwin <alwin>2005-02-28 09:40:30 (UTC)
commit2b64a84d39eeed5681d0ee5068c7d11a01527750 (patch) (unidiff)
treec8693340dbc5ef5e2f9afa90b690829ddff2c4bd /noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperApplet.cpp
parent61fa699140c5efbb6ba0bf2a62f7e8fbf62976be (diff)
downloadopie-2b64a84d39eeed5681d0ee5068c7d11a01527750.zip
opie-2b64a84d39eeed5681d0ee5068c7d11a01527750.tar.gz
opie-2b64a84d39eeed5681d0ee5068c7d11a01527750.tar.bz2
other keymapping tool - not working this moment, I have to check it out
- the reason is that the config file is somewhat easier to understand than from zkbapplet and has a nice config tool. Please don't put it into any repositories this moment.
Diffstat (limited to 'noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperApplet.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperApplet.cpp65
1 files changed, 65 insertions, 0 deletions
diff --git a/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperApplet.cpp b/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperApplet.cpp
new file mode 100644
index 0000000..28304d7
--- a/dev/null
+++ b/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperApplet.cpp
@@ -0,0 +1,65 @@
1#include "KeyHelperApplet.h"
2#include "KeyHelperWidget.h"
3
4#if 0
5KeyHelperApplet::KeyHelperApplet()
6 : widget(0), ref(0)
7{
8 qDebug("KeyHelperApplet::KeyHelperApplet()");
9}
10
11KeyHelperApplet::~KeyHelperApplet()
12{
13 qDebug("KeyHelperApplet::~KeyHelperApplet()");
14 delete widget;
15}
16
17QWidget* KeyHelperApplet::applet(QWidget* parent)
18{
19 if(!widget){
20 widget = new KeyHelperWidget(parent);
21 }
22 return(widget);
23}
24
25int KeyHelperApplet::position() const
26{
27 return(6);
28}
29
30QRESULT KeyHelperApplet::queryInterface(const QUuid& uuid,
31 QUnknownInterface** iface)
32{
33 *iface = 0;
34
35 if(QFile::exists("/tmp/disable-keyhelper")
36 || QFile::exists("/mnt/card/disable-keyhelper")
37 || QFile::exists("/mnt/cf/disable-keyhelper")){
38 return QS_FALSE;
39 }
40
41 if(uuid == IID_QUnknown){
42 *iface = this;
43 } else if(uuid == IID_TaskbarApplet){
44 *iface = this;
45 }
46
47 if(*iface){
48 (*iface)->addRef();
49 }
50 return QS_OK;
51}
52
53Q_EXPORT_INTERFACE()
54{
55 Q_CREATE_INSTANCE(KeyHelperApplet)
56}
57
58#else
59#include <opie2/otaskbarapplet.h>
60
61using namespace Opie::Ui;
62
63EXPORT_OPIE_APPLET_v1( KeyHelperWidget )
64
65#endif