Diffstat (limited to 'inputmethods/multikey/keyboard.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | inputmethods/multikey/keyboard.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/inputmethods/multikey/keyboard.h b/inputmethods/multikey/keyboard.h index 8c4e666..6e577ab 100644 --- a/inputmethods/multikey/keyboard.h +++ b/inputmethods/multikey/keyboard.h | |||
@@ -93,66 +93,76 @@ class Keyboard : public QFrame | |||
93 | Q_OBJECT | 93 | Q_OBJECT |
94 | public: | 94 | public: |
95 | Keyboard( QWidget* parent=0, const char* name=0, WFlags f=0 ); | 95 | Keyboard( QWidget* parent=0, const char* name=0, WFlags f=0 ); |
96 | ~Keyboard(); | 96 | ~Keyboard(); |
97 | 97 | ||
98 | void resetState(); | 98 | void resetState(); |
99 | 99 | ||
100 | void mousePressEvent(QMouseEvent*); | 100 | void mousePressEvent(QMouseEvent*); |
101 | void mouseReleaseEvent(QMouseEvent*); | 101 | void mouseReleaseEvent(QMouseEvent*); |
102 | void resizeEvent(QResizeEvent*); | 102 | void resizeEvent(QResizeEvent*); |
103 | void paintEvent(QPaintEvent* e); | 103 | void paintEvent(QPaintEvent* e); |
104 | //void timerEvent(QTimerEvent* e); | 104 | //void timerEvent(QTimerEvent* e); |
105 | void drawKeyboard( QPainter &p, int row = -1, int col = -1); | 105 | void drawKeyboard( QPainter &p, int row = -1, int col = -1); |
106 | 106 | ||
107 | QSize sizeHint() const; | 107 | QSize sizeHint() const; |
108 | 108 | ||
109 | signals: | 109 | signals: |
110 | void key( ushort scancode, ushort unicode, ushort modifiers, bool, bool ); | 110 | void key( ushort scancode, ushort unicode, ushort modifiers, bool, bool ); |
111 | 111 | ||
112 | private slots: | 112 | private slots: |
113 | void repeat(); | 113 | void repeat(); |
114 | void togglePickboard(bool on_off); | 114 | void togglePickboard(bool on_off); |
115 | void setMapToDefault(); | 115 | void setMapToDefault(); |
116 | void setMapToFile(QString map); | 116 | void setMapToFile(QString map); |
117 | |||
118 | // used to redraw keyboard after edited colors | ||
119 | void reloadKeyboard(); | ||
117 | 120 | ||
118 | private: | 121 | private: |
119 | int getKey( int &w, int j = -1 ); | 122 | int getKey( int &w, int j = -1 ); |
120 | void clearHighlight(); | 123 | void clearHighlight(); |
121 | 124 | ||
122 | bool *shift; | 125 | bool *shift; |
123 | bool *lock; | 126 | bool *lock; |
124 | bool *ctrl; | 127 | bool *ctrl; |
125 | bool *alt; | 128 | bool *alt; |
126 | uint useLargeKeys:1; | 129 | uint useLargeKeys:1; |
127 | uint usePicks:1; | 130 | uint usePicks:1; |
128 | 131 | ||
129 | int pressedKeyRow; | 132 | int pressedKeyRow; |
130 | int pressedKeyCol; | 133 | int pressedKeyCol; |
131 | 134 | ||
132 | KeyboardPicks *picks; | 135 | KeyboardPicks *picks; |
133 | 136 | ||
134 | int keyHeight; | 137 | int keyHeight; |
135 | int defaultKeyWidth; | 138 | int defaultKeyWidth; |
136 | int xoffs; | 139 | int xoffs; |
137 | 140 | ||
138 | int unicode; | 141 | int unicode; |
139 | int qkeycode; | 142 | int qkeycode; |
140 | int modifiers; | 143 | int modifiers; |
141 | 144 | ||
142 | int pressTid; | 145 | int pressTid; |
143 | bool pressed; | 146 | bool pressed; |
144 | 147 | ||
145 | Keys *keys; | 148 | Keys *keys; |
146 | 149 | ||
147 | /* for korean input */ | 150 | /* for korean input */ |
148 | ushort schar, mchar, echar; | 151 | ushort schar, mchar, echar; |
149 | ushort parseKoreanInput(ushort c); | 152 | ushort parseKoreanInput(ushort c); |
150 | ushort combineKoreanChars(const ushort s, const ushort m, const ushort e); | 153 | ushort combineKoreanChars(const ushort s, const ushort m, const ushort e); |
151 | ushort constoe(const ushort c); | 154 | ushort constoe(const ushort c); |
152 | 155 | ||
153 | QTimer *repeatTimer; | 156 | QTimer *repeatTimer; |
154 | 157 | ||
158 | /* colors */ | ||
159 | void loadKeyboardColors(); | ||
160 | QColor keycolor; | ||
161 | QColor keycolor_pressed; | ||
162 | QColor keycolor_lines; | ||
163 | QColor textcolor; | ||
164 | |||
155 | ConfigDlg *configdlg; | 165 | ConfigDlg *configdlg; |
156 | }; | 166 | }; |
157 | 167 | ||
158 | 168 | ||