summaryrefslogtreecommitdiff
path: root/inputmethods/jumpx/keyboard.h
authorsimon <simon>2002-11-22 10:56:30 (UTC)
committer simon <simon>2002-11-22 10:56:30 (UTC)
commit480284c491e26427c630131a25e56f9ed1d129b2 (patch) (unidiff)
tree3bdd60afe34e8c466fbea92dcf89fcab381b110d /inputmethods/jumpx/keyboard.h
parent772c1321e4e95a415b9de700c3474f81f98b5482 (diff)
downloadopie-480284c491e26427c630131a25e56f9ed1d129b2.zip
opie-480284c491e26427c630131a25e56f9ed1d129b2.tar.gz
opie-480284c491e26427c630131a25e56f9ed1d129b2.tar.bz2
- properly namespace the input methods. fixes symbols clashes at run-time
with names like 'Keyboard' or 'KeyboardConfig' . the qcom interface objects are in an anonymous namespace now and the actual keyboard implementations are in Dvorak, JumpX, etc. namespaces. What's left is to solve the symbol clashes of the multiply compiled pickboard classes. I'll leave that one (as part of the patch posted yesterday) for another day for review. This part (namespacing) sounds like a safe bet to me though, so comitting now. (got no comments anyway)
Diffstat (limited to 'inputmethods/jumpx/keyboard.h') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/jumpx/keyboard.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/inputmethods/jumpx/keyboard.h b/inputmethods/jumpx/keyboard.h
index 1be095d..689d95a 100644
--- a/inputmethods/jumpx/keyboard.h
+++ b/inputmethods/jumpx/keyboard.h
@@ -1,71 +1,76 @@
1/**************************************************************************************94x78** 1/**************************************************************************************94x78**
2** 2**
3** This file may be distributed and/or modified under the terms of the 3** This file may be distributed and/or modified under the terms of the
4** GNU General Public License version 2 as published by the Free Software 4** GNU General Public License version 2 as published by the Free Software
5** Foundation and appearing in the file LICENSE.GPL included in the 5** Foundation and appearing in the file LICENSE.GPL included in the
6** packaging of this file. 6** packaging of this file.
7** 7**
8** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 8** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
9** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 9** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
10** 10**
11*********************************************************************************************/ 11*********************************************************************************************/
12#include <qframe.h> 12#include <qframe.h>
13#include <qpixmap.h> 13#include <qpixmap.h>
14#include <qtimer.h> 14#include <qtimer.h>
15 15
16namespace JumpX
17{
18
16class Keyboard : public QFrame 19class Keyboard : public QFrame
17{ 20{
18 Q_OBJECT 21 Q_OBJECT
19public: 22public:
20 Keyboard( QWidget* parent=0, const char* name=0, WFlags f=0 ); 23 Keyboard( QWidget* parent=0, const char* name=0, WFlags f=0 );
21 24
22 void resetState(); 25 void resetState();
23 26
24 void mousePressEvent(QMouseEvent*); 27 void mousePressEvent(QMouseEvent*);
25 void mouseReleaseEvent(QMouseEvent*); 28 void mouseReleaseEvent(QMouseEvent*);
26 void mouseMoveEvent(QMouseEvent*); 29 void mouseMoveEvent(QMouseEvent*);
27 void resizeEvent(QResizeEvent*); 30 void resizeEvent(QResizeEvent*);
28 void paintEvent(QPaintEvent* e); 31 void paintEvent(QPaintEvent* e);
29 //void timerEvent(QTimerEvent* e); 32 //void timerEvent(QTimerEvent* e);
30 33
31 QSize sizeHint() const; 34 QSize sizeHint() const;
32 35
33signals: 36signals:
34 void key( ushort unicode, ushort qcode, ushort modifiers, bool, bool ); 37 void key( ushort unicode, ushort qcode, ushort modifiers, bool, bool );
35 38
36private slots: 39private slots:
37 void delayTimerDone(); 40 void delayTimerDone();
38 void rateTimerDone(); 41 void rateTimerDone();
39 42
40private: 43private:
41 int shift; // 0, 1, 2 44 int shift; // 0, 1, 2
42 int paren; // 0, 1, 2 45 int paren; // 0, 1, 2
43 int ctrl; // 0, 1 46 int ctrl; // 0, 1
44 int alt; // 0, 1 47 int alt; // 0, 1
45 48
46 int pressedKeyUnicode, pressedKeyQcode, pressedMod; 49 int pressedKeyUnicode, pressedKeyQcode, pressedMod;
47 int pressedx, pressedy, pressedw, pressedh; 50 int pressedx, pressedy, pressedw, pressedh;
48 bool isnoncont; 51 bool isnoncont;
49 int pressed2x, pressed2y, pressed2w, pressed2h; 52 int pressed2x, pressed2y, pressed2w, pressed2h;
50 53
51 int slideKeyUnicodeH, slideKeyQcodeH, slideKeyUnicodeV, slideKeyQcodeV; 54 int slideKeyUnicodeH, slideKeyQcodeH, slideKeyUnicodeV, slideKeyQcodeV;
52 bool enableMouseTracking; 55 bool enableMouseTracking;
53 QPixmap *slidePix, *slidePixH, *slidePixV; 56 QPixmap *slidePix, *slidePixH, *slidePixV;
54 57
55 QPixmap releasedPlain; 58 QPixmap releasedPlain;
56 QPixmap releasedShift; 59 QPixmap releasedShift;
57 QPixmap releasedParen; 60 QPixmap releasedParen;
58 61
59 QPixmap pressedPlain; 62 QPixmap pressedPlain;
60 QPixmap pressedShift; 63 QPixmap pressedShift;
61 QPixmap pressedParen; 64 QPixmap pressedParen;
62 QPixmap pressedDigit; 65 QPixmap pressedDigit;
63 66
64 QPixmap offscreen; 67 QPixmap offscreen;
65 68
66 QPixmap *releasedPix; 69 QPixmap *releasedPix;
67 QPixmap *pressedPix; 70 QPixmap *pressedPix;
68 71
69 QTimer *delayTimer; 72 QTimer *delayTimer;
70 QTimer *rateTimer; 73 QTimer *rateTimer;
71}; 74};
75
76} // namespace JumpX