summaryrefslogtreecommitdiff
path: root/core/applets/multikeyapplet/multikey.cpp
Unidiff
Diffstat (limited to 'core/applets/multikeyapplet/multikey.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/multikeyapplet/multikey.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/core/applets/multikeyapplet/multikey.cpp b/core/applets/multikeyapplet/multikey.cpp
index fc5f093..195ada5 100644
--- a/core/applets/multikeyapplet/multikey.cpp
+++ b/core/applets/multikeyapplet/multikey.cpp
@@ -8,28 +8,30 @@
8** packaging of this file. 8** packaging of this file.
9** 9**
10** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 10** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
11** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 11** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
12** 12**
13**********************************************************************/ 13**********************************************************************/
14 14
15#include "multikey.h" 15#include "multikey.h"
16 16
17/* OPIE */ 17/* OPIE */
18#include <opie2/otaskbarapplet.h> 18#include <opie2/otaskbarapplet.h>
19#include <qpe/qcopenvelope_qws.h> 19#include <qpe/qcopenvelope_qws.h>
20#include <qpe/qpeapplication.h>
20 21
21/* QT */ 22/* QT */
22#include <qdir.h> 23#include <qdir.h>
23 24
25using namespace Opie::Ui;
24Multikey::Multikey(QWidget *parent) : QLabel(parent), popupMenu(this), current("EN") 26Multikey::Multikey(QWidget *parent) : QLabel(parent), popupMenu(this), current("EN")
25{ 27{
26 QCopChannel* swChannel = new QCopChannel("MultiKey/Switcher", this); 28 QCopChannel* swChannel = new QCopChannel("MultiKey/Switcher", this);
27 connect( swChannel, SIGNAL(received(const QCString&,const QByteArray&)), 29 connect( swChannel, SIGNAL(received(const QCString&,const QByteArray&)),
28 this, SLOT(message(const QCString&,const QByteArray&))); 30 this, SLOT(message(const QCString&,const QByteArray&)));
29 31
30 setFont( QFont( "Helvetica", 10, QFont::Normal ) ); 32 setFont( QFont( "Helvetica", 10, QFont::Normal ) );
31 QPEApplication::setStylusOperation(this, QPEApplication::RightOnHold); 33 QPEApplication::setStylusOperation(this, QPEApplication::RightOnHold);
32 lang = 0; 34 lang = 0;
33 QCopEnvelope e("MultiKey/Keyboard", "getmultikey()"); 35 QCopEnvelope e("MultiKey/Keyboard", "getmultikey()");
34 setText("EN"); 36 setText("EN");
35 popupMenu.insertItem("EN", 0); 37 popupMenu.insertItem("EN", 0);
@@ -128,16 +130,13 @@ void Multikey::message(const QCString &message, const QByteArray &data)
128 } 130 }
129 } 131 }
130 132
131 setText(current); 133 setText(current);
132 } 134 }
133} 135}
134 136
135int Multikey::position() 137int Multikey::position()
136{ 138{
137 return 10; 139 return 10;
138} 140}
139 141
140Q_EXPORT_INTERFACE() 142EXPORT_OPIE_APPLET_v1( Multikey )
141{
142 Q_CREATE_INSTANCE( OTaskbarAppletWrapper<Multikey> );
143}