Diffstat (limited to 'inputmethods/multikey/keyboard.h') (more/less context) (show whitespace changes)
-rw-r--r-- | inputmethods/multikey/keyboard.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/inputmethods/multikey/keyboard.h b/inputmethods/multikey/keyboard.h index e61b76c..c2efe10 100644 --- a/inputmethods/multikey/keyboard.h +++ b/inputmethods/multikey/keyboard.h | |||
@@ -58,24 +58,26 @@ public: | |||
58 | ushort uni(const int row, const int col); | 58 | ushort uni(const int row, const int col); |
59 | int qcode(const int row, const int col); | 59 | int qcode(const int row, const int col); |
60 | int width(const int row, const int col); | 60 | int width(const int row, const int col); |
61 | bool pressed(const int row, const int col); | 61 | bool pressed(const int row, const int col); |
62 | bool *pressedPtr(const int row, const int col); | 62 | bool *pressedPtr(const int row, const int col); |
63 | ushort shift(const ushort); | 63 | ushort shift(const ushort); |
64 | QPixmap *pix(const int row, const int col); | 64 | QPixmap *pix(const int row, const int col); |
65 | int numKeys(const int row); | 65 | int numKeys(const int row); |
66 | void setKeysFromFile(const char *filename); | 66 | void setKeysFromFile(const char *filename); |
67 | void setKey(const int row, const int qcode, const ushort unicode, | 67 | void setKey(const int row, const int qcode, const ushort unicode, |
68 | const int width, QPixmap *pix); | 68 | const int width, QPixmap *pix); |
69 | void setPressed(const int row, const int col, const bool pressed); | 69 | void setPressed(const int row, const int col, const bool pressed); |
70 | QString lang; | ||
71 | QString title; | ||
70 | 72 | ||
71 | private: | 73 | private: |
72 | 74 | ||
73 | typedef struct Key { | 75 | typedef struct Key { |
74 | int qcode; // are qt key codes just unicode values? | 76 | int qcode; // are qt key codes just unicode values? |
75 | ushort unicode; | 77 | ushort unicode; |
76 | int width; // not pixels but relative key width. normal key is 2 | 78 | int width; // not pixels but relative key width. normal key is 2 |
77 | 79 | ||
78 | // only needed for keys like ctrl that can have multiple keys pressed at once | 80 | // only needed for keys like ctrl that can have multiple keys pressed at once |
79 | bool *pressed; | 81 | bool *pressed; |
80 | QPixmap *pix; | 82 | QPixmap *pix; |
81 | }; | 83 | }; |
@@ -99,24 +101,26 @@ public: | |||
99 | void paintEvent(QPaintEvent* e); | 101 | void paintEvent(QPaintEvent* e); |
100 | //void timerEvent(QTimerEvent* e); | 102 | //void timerEvent(QTimerEvent* e); |
101 | void drawKeyboard( QPainter &p, int row = -1, int col = -1); | 103 | void drawKeyboard( QPainter &p, int row = -1, int col = -1); |
102 | 104 | ||
103 | QSize sizeHint() const; | 105 | QSize sizeHint() const; |
104 | 106 | ||
105 | signals: | 107 | signals: |
106 | void key( ushort scancode, ushort unicode, ushort modifiers, bool, bool ); | 108 | void key( ushort scancode, ushort unicode, ushort modifiers, bool, bool ); |
107 | 109 | ||
108 | private slots: | 110 | private slots: |
109 | void repeat(); | 111 | void repeat(); |
110 | void togglePickboard(bool on_off); | 112 | void togglePickboard(bool on_off); |
113 | void setMapToDefault(); | ||
114 | void setMapToFile(QString file); | ||
111 | 115 | ||
112 | private: | 116 | private: |
113 | int getKey( int &w, int j = -1 ); | 117 | int getKey( int &w, int j = -1 ); |
114 | void clearHighlight(); | 118 | void clearHighlight(); |
115 | 119 | ||
116 | bool *shift; | 120 | bool *shift; |
117 | bool *lock; | 121 | bool *lock; |
118 | bool *ctrl; | 122 | bool *ctrl; |
119 | bool *alt; | 123 | bool *alt; |
120 | uint useLargeKeys:1; | 124 | uint useLargeKeys:1; |
121 | uint usePicks:1; | 125 | uint usePicks:1; |
122 | 126 | ||
@@ -127,26 +131,26 @@ private: | |||
127 | 131 | ||
128 | int keyHeight; | 132 | int keyHeight; |
129 | int defaultKeyWidth; | 133 | int defaultKeyWidth; |
130 | int xoffs; | 134 | int xoffs; |
131 | 135 | ||
132 | int unicode; | 136 | int unicode; |
133 | int qkeycode; | 137 | int qkeycode; |
134 | int modifiers; | 138 | int modifiers; |
135 | 139 | ||
136 | int pressTid; | 140 | int pressTid; |
137 | bool pressed; | 141 | bool pressed; |
138 | 142 | ||
139 | Keys keys; | 143 | Keys *keys; |
140 | QString LANG; | 144 | |
141 | /* for korean input */ | 145 | /* for korean input */ |
142 | ushort schar, mchar, echar; | 146 | ushort schar, mchar, echar; |
143 | ushort parseKoreanInput(ushort c); | 147 | ushort parseKoreanInput(ushort c); |
144 | ushort combineKoreanChars(const ushort s, const ushort m, const ushort e); | 148 | ushort combineKoreanChars(const ushort s, const ushort m, const ushort e); |
145 | ushort constoe(const ushort c); | 149 | ushort constoe(const ushort c); |
146 | 150 | ||
147 | QTimer *repeatTimer; | 151 | QTimer *repeatTimer; |
148 | 152 | ||
149 | ConfigDlg *configdlg; | 153 | ConfigDlg *configdlg; |
150 | }; | 154 | }; |
151 | 155 | ||
152 | 156 | ||