summaryrefslogtreecommitdiff
path: root/inputmethods/kjumpx/keyboard.h
Unidiff
Diffstat (limited to 'inputmethods/kjumpx/keyboard.h') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/kjumpx/keyboard.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/inputmethods/kjumpx/keyboard.h b/inputmethods/kjumpx/keyboard.h
new file mode 100644
index 0000000..148cb72
--- a/dev/null
+++ b/inputmethods/kjumpx/keyboard.h
@@ -0,0 +1,79 @@
1/**************************************************************************************94x78**
2**
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
5** Foundation and appearing in the file LICENSE.GPL included in the
6** packaging of this file.
7**
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.
10**
11*********************************************************************************************/
12#include <qframe.h>
13#include <qpixmap.h>
14#include <qtimer.h>
15
16class Keyboard : public QFrame
17{
18 Q_OBJECT
19public:
20 Keyboard( QWidget* parent=0, const char* name=0, WFlags f=0 );
21
22 void resetState();
23
24 void mousePressEvent(QMouseEvent*);
25 void mouseReleaseEvent(QMouseEvent*);
26 void mouseMoveEvent(QMouseEvent*);
27 void resizeEvent(QResizeEvent*);
28 void paintEvent(QPaintEvent* e);
29 //void timerEvent(QTimerEvent* e);
30
31 QSize sizeHint() const;
32
33 QChar parseKoreanInput(ushort);
34 ushort combineKoreanChars(const ushort, const ushort, const ushort);
35 ushort constoe(const ushort);
36
37
38signals:
39 void key( ushort unicode, ushort qcode, ushort modifiers, bool, bool );
40
41private slots:
42 void delayTimerDone();
43 void rateTimerDone();
44
45private:
46 int shift; // 0, 1, 2
47 int paren; // 0, 1, 2
48 int ctrl; // 0, 1
49 int alt; // 0, 1
50 bool lang; // 0 -> english, 1 -> korean
51
52 int lastKey;
53
54 int pressedKeyUnicode, pressedKeyQcode, pressedMod;
55 int pressedx, pressedy, pressedw, pressedh;
56 bool isnoncont;
57 int pressed2x, pressed2y, pressed2w, pressed2h;
58
59 int slideKeyUnicodeH, slideKeyQcodeH, slideKeyUnicodeV, slideKeyQcodeV;
60 bool enableMouseTracking;
61 QPixmap *slidePix, *slidePixH, *slidePixV;
62
63 QPixmap releasedPlain;
64 QPixmap releasedShift;
65 QPixmap releasedParen;
66
67 QPixmap pressedPlain;
68 QPixmap pressedShift;
69 QPixmap pressedParen;
70 QPixmap pressedDigit;
71
72 QPixmap offscreen;
73
74 QPixmap *releasedPix;
75 QPixmap *pressedPix;
76
77 QTimer *delayTimer;
78 QTimer *rateTimer;
79};