Diffstat (limited to 'inputmethods/kjumpx/keyboard.h') (more/less context) (show whitespace changes)
-rw-r--r-- | inputmethods/kjumpx/keyboard.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/inputmethods/kjumpx/keyboard.h b/inputmethods/kjumpx/keyboard.h index 148cb72..ca83915 100644 --- a/inputmethods/kjumpx/keyboard.h +++ b/inputmethods/kjumpx/keyboard.h | |||
@@ -1,79 +1,84 @@ | |||
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 | ||
16 | namespace KJumpX | ||
17 | { | ||
18 | |||
16 | class Keyboard : public QFrame | 19 | class Keyboard : public QFrame |
17 | { | 20 | { |
18 | Q_OBJECT | 21 | Q_OBJECT |
19 | public: | 22 | public: |
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 | ||
33 | QChar parseKoreanInput(ushort); | 36 | QChar parseKoreanInput(ushort); |
34 | ushort combineKoreanChars(const ushort, const ushort, const ushort); | 37 | ushort combineKoreanChars(const ushort, const ushort, const ushort); |
35 | ushort constoe(const ushort); | 38 | ushort constoe(const ushort); |
36 | 39 | ||
37 | 40 | ||
38 | signals: | 41 | signals: |
39 | void key( ushort unicode, ushort qcode, ushort modifiers, bool, bool ); | 42 | void key( ushort unicode, ushort qcode, ushort modifiers, bool, bool ); |
40 | 43 | ||
41 | private slots: | 44 | private slots: |
42 | void delayTimerDone(); | 45 | void delayTimerDone(); |
43 | void rateTimerDone(); | 46 | void rateTimerDone(); |
44 | 47 | ||
45 | private: | 48 | private: |
46 | int shift; // 0, 1, 2 | 49 | int shift; // 0, 1, 2 |
47 | int paren; // 0, 1, 2 | 50 | int paren; // 0, 1, 2 |
48 | int ctrl; // 0, 1 | 51 | int ctrl; // 0, 1 |
49 | int alt; // 0, 1 | 52 | int alt; // 0, 1 |
50 | bool lang; // 0 -> english, 1 -> korean | 53 | bool lang; // 0 -> english, 1 -> korean |
51 | 54 | ||
52 | int lastKey; | 55 | int lastKey; |
53 | 56 | ||
54 | int pressedKeyUnicode, pressedKeyQcode, pressedMod; | 57 | int pressedKeyUnicode, pressedKeyQcode, pressedMod; |
55 | int pressedx, pressedy, pressedw, pressedh; | 58 | int pressedx, pressedy, pressedw, pressedh; |
56 | bool isnoncont; | 59 | bool isnoncont; |
57 | int pressed2x, pressed2y, pressed2w, pressed2h; | 60 | int pressed2x, pressed2y, pressed2w, pressed2h; |
58 | 61 | ||
59 | int slideKeyUnicodeH, slideKeyQcodeH, slideKeyUnicodeV, slideKeyQcodeV; | 62 | int slideKeyUnicodeH, slideKeyQcodeH, slideKeyUnicodeV, slideKeyQcodeV; |
60 | bool enableMouseTracking; | 63 | bool enableMouseTracking; |
61 | QPixmap *slidePix, *slidePixH, *slidePixV; | 64 | QPixmap *slidePix, *slidePixH, *slidePixV; |
62 | 65 | ||
63 | QPixmap releasedPlain; | 66 | QPixmap releasedPlain; |
64 | QPixmap releasedShift; | 67 | QPixmap releasedShift; |
65 | QPixmap releasedParen; | 68 | QPixmap releasedParen; |
66 | 69 | ||
67 | QPixmap pressedPlain; | 70 | QPixmap pressedPlain; |
68 | QPixmap pressedShift; | 71 | QPixmap pressedShift; |
69 | QPixmap pressedParen; | 72 | QPixmap pressedParen; |
70 | QPixmap pressedDigit; | 73 | QPixmap pressedDigit; |
71 | 74 | ||
72 | QPixmap offscreen; | 75 | QPixmap offscreen; |
73 | 76 | ||
74 | QPixmap *releasedPix; | 77 | QPixmap *releasedPix; |
75 | QPixmap *pressedPix; | 78 | QPixmap *pressedPix; |
76 | 79 | ||
77 | QTimer *delayTimer; | 80 | QTimer *delayTimer; |
78 | QTimer *rateTimer; | 81 | QTimer *rateTimer; |
79 | }; | 82 | }; |
83 | |||
84 | } // namespace KJumpX | ||