-rw-r--r-- | inputmethods/pickboard/pickboardpicks.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/inputmethods/pickboard/pickboardpicks.cpp b/inputmethods/pickboard/pickboardpicks.cpp index b9d9928..bad1d24 100644 --- a/inputmethods/pickboard/pickboardpicks.cpp +++ b/inputmethods/pickboard/pickboardpicks.cpp | |||
@@ -8,410 +8,410 @@ | |||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "pickboardpicks.h" | 20 | #include "pickboardpicks.h" |
21 | #include "pickboardcfg.h" | 21 | #include "pickboardcfg.h" |
22 | 22 | ||
23 | #include <qpe/global.h> | 23 | #include <qpe/global.h> |
24 | 24 | ||
25 | #include <qpainter.h> | 25 | #include <qpainter.h> |
26 | #include <qlist.h> | 26 | #include <qlist.h> |
27 | #include <qbitmap.h> | 27 | #include <qbitmap.h> |
28 | #include <qlayout.h> | 28 | #include <qlayout.h> |
29 | #include <qvbox.h> | 29 | #include <qvbox.h> |
30 | #include <qdialog.h> | 30 | #include <qdialog.h> |
31 | #include <qscrollview.h> | 31 | #include <qscrollview.h> |
32 | #include <qpopupmenu.h> | 32 | #include <qpopupmenu.h> |
33 | #include <qhbuttongroup.h> | 33 | #include <qhbuttongroup.h> |
34 | #include <qpushbutton.h> | 34 | #include <qpushbutton.h> |
35 | #include <qmessagebox.h> | 35 | #include <qmessagebox.h> |
36 | #ifdef QWS | 36 | #ifdef QWS |
37 | #include <qwindowsystem_qws.h> | 37 | #include <qwindowsystem_qws.h> |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | void PickboardPicks::doMenu() | 40 | void PickboardPicks::doMenu() |
41 | { | 41 | { |
42 | QWidget* cause = (QWidget*)sender(); // evil | 42 | QWidget* cause = (QWidget*)sender(); // evil |
43 | 43 | ||
44 | QPopupMenu popup(this); | 44 | QPopupMenu popup(this); |
45 | config()->fillMenu(popup); | 45 | config()->fillMenu(popup); |
46 | 46 | ||
47 | QPoint pos = cause->mapToGlobal(cause->rect().topRight()); | 47 | QPoint pos = cause->mapToGlobal(cause->rect().topRight()); |
48 | QSize sz = popup.sizeHint(); | 48 | QSize sz = popup.sizeHint(); |
49 | pos.ry() -= sz.height(); | 49 | pos.ry() -= sz.height(); |
50 | pos.rx() -= sz.width(); | 50 | pos.rx() -= sz.width(); |
51 | popup.move(pos); | 51 | popup.move(pos); |
52 | config()->doMenu(popup.exec()); | 52 | config()->doMenu(popup.exec()); |
53 | } | 53 | } |
54 | 54 | ||
55 | static const char *BS_xpm[] = { | 55 | static const char *BS_xpm[] = { |
56 | "5 7 2 1", | 56 | "5 7 2 1", |
57 | "a c #000000", | 57 | "a c #000000", |
58 | ". c None", | 58 | ". c None", |
59 | "...aa", | 59 | "...aa", |
60 | "..aaa", | 60 | "..aaa", |
61 | ".aaaa", | 61 | ".aaaa", |
62 | "aaaaa", | 62 | "aaaaa", |
63 | ".aaaa", | 63 | ".aaaa", |
64 | "..aaa", | 64 | "..aaa", |
65 | "...aa", | 65 | "...aa", |
66 | }; | 66 | }; |
67 | static const char *Del_xpm[] = { | 67 | static const char *Del_xpm[] = { |
68 | "14 7 2 1", | 68 | "14 7 2 1", |
69 | "a c #000000", | 69 | "a c #000000", |
70 | ". c None", | 70 | ". c None", |
71 | "aaa..aaaa.a...", | 71 | "aaa..aaaa.a...", |
72 | "a..a.a....a...", | 72 | "a..a.a....a...", |
73 | "a..a.a....a...", | 73 | "a..a.a....a...", |
74 | "a..a.aaa..a...", | 74 | "a..a.aaa..a...", |
75 | "a..a.a....a...", | 75 | "a..a.a....a...", |
76 | "a..a.a....a...", | 76 | "a..a.a....a...", |
77 | "aaa..aaaa.aaaa" | 77 | "aaa..aaaa.aaaa" |
78 | }; | 78 | }; |
79 | static const char *Home_xpm[] = { | 79 | static const char *Home_xpm[] = { |
80 | "20 7 2 1", | 80 | "20 7 2 1", |
81 | "a c #000000", | 81 | "a c #000000", |
82 | ". c None", | 82 | ". c None", |
83 | "a..a..aa..a...a.aaaa", | 83 | "a..a..aa..a...a.aaaa", |
84 | "a..a.a..a.aa.aa.a...", | 84 | "a..a.a..a.aa.aa.a...", |
85 | "a..a.a..a.a.a.a.a...", | 85 | "a..a.a..a.a.a.a.a...", |
86 | "aaaa.a..a.a.a.a.aaa.", | 86 | "aaaa.a..a.a.a.a.aaa.", |
87 | "a..a.a..a.a...a.a...", | 87 | "a..a.a..a.a...a.a...", |
88 | "a..a.a..a.a...a.a...", | 88 | "a..a.a..a.a...a.a...", |
89 | "a..a..aa..a...a.aaaa" | 89 | "a..a..aa..a...a.aaaa" |
90 | }; | 90 | }; |
91 | static const char *PgUp_xpm[] = { | 91 | static const char *PgUp_xpm[] = { |
92 | "20 7 2 1", | 92 | "20 7 2 1", |
93 | "a c #000000", | 93 | "a c #000000", |
94 | ". c None", | 94 | ". c None", |
95 | "aaa.......a..a......", | 95 | "aaa.......a..a......", |
96 | "a..a......a..a......", | 96 | "a..a......a..a......", |
97 | "a..a.aa...a..a.aaa..", | 97 | "a..a.aa...a..a.aaa..", |
98 | "aaa.a.....a..a.a..a.", | 98 | "aaa.a.....a..a.a..a.", |
99 | "a...a.aa..a..a.aaa..", | 99 | "a...a.aa..a..a.aaa..", |
100 | "a...a..a..a..a.a....", | 100 | "a...a..a..a..a.a....", |
101 | "a....aaa...aa..a...." | 101 | "a....aaa...aa..a...." |
102 | }; | 102 | }; |
103 | static const char *PgDn_xpm[] = { | 103 | static const char *PgDn_xpm[] = { |
104 | "20 7 2 1", | 104 | "20 7 2 1", |
105 | "a c #000000", | 105 | "a c #000000", |
106 | ". c None", | 106 | ". c None", |
107 | "aaa.......aaa.......", | 107 | "aaa.......aaa.......", |
108 | "a..a......a..a......", | 108 | "a..a......a..a......", |
109 | "a..a.aa...a..a.a..a.", | 109 | "a..a.aa...a..a.a..a.", |
110 | "aaa.a.....a..a.aa.a.", | 110 | "aaa.a.....a..a.aa.a.", |
111 | "a...a.aa..a..a.a.aa.", | 111 | "a...a.aa..a..a.a.aa.", |
112 | "a...a..a..a..a.a..a.", | 112 | "a...a..a..a..a.a..a.", |
113 | "a....aaa..aaa..a..a." | 113 | "a....aaa..aaa..a..a." |
114 | }; | 114 | }; |
115 | static const char *End_xpm[] = { | 115 | static const char *End_xpm[] = { |
116 | "14 7 2 1", | 116 | "14 7 2 1", |
117 | "a c #000000", | 117 | "a c #000000", |
118 | ". c None", | 118 | ". c None", |
119 | "aaaa.a..a.aaa.", | 119 | "aaaa.a..a.aaa.", |
120 | "a....aa.a.a..a", | 120 | "a....aa.a.a..a", |
121 | "a....a.aa.a..a", | 121 | "a....a.aa.a..a", |
122 | "aaa..a..a.a..a", | 122 | "aaa..a..a.a..a", |
123 | "a....a..a.a..a", | 123 | "a....a..a.a..a", |
124 | "a....a..a.a..a", | 124 | "a....a..a.a..a", |
125 | "aaaa.a..a.aaa." | 125 | "aaaa.a..a.aaa." |
126 | }; | 126 | }; |
127 | static const char *Enter_xpm[] = { | 127 | static const char *Enter_xpm[] = { |
128 | "14 7 2 1", | 128 | "14 7 2 1", |
129 | "a c #000000", | 129 | "a c #000000", |
130 | ". c None", | 130 | ". c None", |
131 | ".............a", | 131 | ".............a", |
132 | ".............a", | 132 | ".............a", |
133 | "..a..........a", | 133 | "..a..........a", |
134 | ".aa.........a.", | 134 | ".aa.........a.", |
135 | "aaaaaaaaaaaa..", | 135 | "aaaaaaaaaaaa..", |
136 | ".aa...........", | 136 | ".aa...........", |
137 | "..a..........." | 137 | "..a..........." |
138 | }; | 138 | }; |
139 | static const char *Esc_xpm[] = { | 139 | static const char *Esc_xpm[] = { |
140 | "14 7 2 1", | 140 | "14 7 2 1", |
141 | "a c #000000", | 141 | "a c #000000", |
142 | ". c None", | 142 | ". c None", |
143 | "aaaa..aa...aa.", | 143 | "aaaa..aa...aa.", |
144 | "a....a..a.a..a", | 144 | "a....a..a.a..a", |
145 | "a....a....a...", | 145 | "a....a....a...", |
146 | "aaa...aa..a...", | 146 | "aaa...aa..a...", |
147 | "a.......a.a...", | 147 | "a.......a.a...", |
148 | "a....a..a.a..a", | 148 | "a....a..a.a..a", |
149 | "aaaa..aa...aa." | 149 | "aaaa..aa...aa." |
150 | }; | 150 | }; |
151 | static const char *Ins_xpm[] = { | 151 | static const char *Ins_xpm[] = { |
152 | "13 7 2 1", | 152 | "13 7 2 1", |
153 | "a c #000000", | 153 | "a c #000000", |
154 | ". c None", | 154 | ". c None", |
155 | "aaa.a..a..aa.", | 155 | "aaa.a..a..aa.", |
156 | ".a..aa.a.a..a", | 156 | ".a..aa.a.a..a", |
157 | ".a..a.aa.a...", | 157 | ".a..a.aa.a...", |
158 | ".a..a..a..aa.", | 158 | ".a..a..a..aa.", |
159 | ".a..a..a....a", | 159 | ".a..a..a....a", |
160 | ".a..a..a.a..a", | 160 | ".a..a..a.a..a", |
161 | "aaa.a..a..aa." | 161 | "aaa.a..a..aa." |
162 | }; | 162 | }; |
163 | static const char *Up_xpm[] = { | 163 | static const char *Up_xpm[] = { |
164 | "7 7 2 1", | 164 | "7 7 2 1", |
165 | "a c #000000", | 165 | "a c #000000", |
166 | ". c None", | 166 | ". c None", |
167 | "...a...", | 167 | "...a...", |
168 | "..aaa..", | 168 | "..aaa..", |
169 | ".a.a.a.", | 169 | ".a.a.a.", |
170 | "a..a..a", | 170 | "a..a..a", |
171 | "...a...", | 171 | "...a...", |
172 | "...a...", | 172 | "...a...", |
173 | "...a..." | 173 | "...a..." |
174 | }; | 174 | }; |
175 | static const char *Left_xpm[] = { | 175 | static const char *Left_xpm[] = { |
176 | "7 7 2 1", | 176 | "7 7 2 1", |
177 | "a c #000000", | 177 | "a c #000000", |
178 | ". c None", | 178 | ". c None", |
179 | "...a...", | 179 | "...a...", |
180 | "..a....", | 180 | "..a....", |
181 | ".a.....", | 181 | ".a.....", |
182 | "aaaaaaa", | 182 | "aaaaaaa", |
183 | ".a.....", | 183 | ".a.....", |
184 | "..a....", | 184 | "..a....", |
185 | "...a..." | 185 | "...a..." |
186 | }; | 186 | }; |
187 | static const char *Down_xpm[] = { | 187 | static const char *Down_xpm[] = { |
188 | "7 7 2 1", | 188 | "7 7 2 1", |
189 | "a c #000000", | 189 | "a c #000000", |
190 | ". c None", | 190 | ". c None", |
191 | "...a...", | 191 | "...a...", |
192 | "...a...", | 192 | "...a...", |
193 | "...a...", | 193 | "...a...", |
194 | "a..a..a", | 194 | "a..a..a", |
195 | ".a.a.a.", | 195 | ".a.a.a.", |
196 | "..aaa..", | 196 | "..aaa..", |
197 | "...a..." | 197 | "...a..." |
198 | }; | 198 | }; |
199 | static const char *Right_xpm[] = { | 199 | static const char *Right_xpm[] = { |
200 | "7 7 2 1", | 200 | "7 7 2 1", |
201 | "a c #000000", | 201 | "a c #000000", |
202 | ". c None", | 202 | ". c None", |
203 | "...a...", | 203 | "...a...", |
204 | "....a..", | 204 | "....a..", |
205 | ".....a.", | 205 | ".....a.", |
206 | "aaaaaaa", | 206 | "aaaaaaa", |
207 | ".....a.", | 207 | ".....a.", |
208 | "....a..", | 208 | "....a..", |
209 | "...a..." | 209 | "...a..." |
210 | }; | 210 | }; |
211 | static const char *BackTab_xpm[] = { | 211 | static const char *BackTab_xpm[] = { |
212 | "8 7 2 1", | 212 | "8 7 2 1", |
213 | "a c #000000", | 213 | "a c #000000", |
214 | ". c None", | 214 | ". c None", |
215 | "a.......", | 215 | "a.......", |
216 | "a..a....", | 216 | "a..a....", |
217 | "a.aa....", | 217 | "a.aa....", |
218 | "aaaaaaaa", | 218 | "aaaaaaaa", |
219 | "a.aa....", | 219 | "a.aa....", |
220 | "a..a....", | 220 | "a..a....", |
221 | "a......." | 221 | "a......." |
222 | }; | 222 | }; |
223 | static const char *Tab_xpm[] = { | 223 | static const char *Tab_xpm[] = { |
224 | "8 7 2 1", | 224 | "8 7 2 1", |
225 | "a c #000000", | 225 | "a c #000000", |
226 | ". c None", | 226 | ". c None", |
227 | ".......a", | 227 | ".......a", |
228 | "....a..a", | 228 | "....a..a", |
229 | "....aa.a", | 229 | "....aa.a", |
230 | "aaaaaaaa", | 230 | "aaaaaaaa", |
231 | "....aa.a", | 231 | "....aa.a", |
232 | "....a..a", | 232 | "....a..a", |
233 | ".......a" | 233 | ".......a" |
234 | }; | 234 | }; |
235 | static const char *Space_xpm[] = { | 235 | static const char *Space_xpm[] = { |
236 | "9 9 2 1", | 236 | "9 9 2 1", |
237 | "a c #000000", | 237 | "a c #000000", |
238 | ". c None", | 238 | ". c None", |
239 | "aaaaaaaaa", | 239 | "aaaaaaaaa", |
240 | "a.......a", | 240 | "a.......a", |
241 | "a.......a", | 241 | "a.......a", |
242 | "a.......a", | 242 | "a.......a", |
243 | "a.......a", | 243 | "a.......a", |
244 | "a.......a", | 244 | "a.......a", |
245 | "a.......a", | 245 | "a.......a", |
246 | "a.......a", | 246 | "a.......a", |
247 | "aaaaaaaaa" | 247 | "aaaaaaaaa" |
248 | }; | 248 | }; |
249 | 249 | ||
250 | PickboardPicks::PickboardPicks(QWidget* parent, const char* name, WFlags f ) : | 250 | PickboardPicks::PickboardPicks(QWidget* parent, const char* name, WFlags f ) : |
251 | QFrame(parent,name,f) | 251 | QFrame(parent,name,f) |
252 | { | 252 | { |
253 | configs.setAutoDelete( TRUE ); | 253 | configs.setAutoDelete( TRUE ); |
254 | } | 254 | } |
255 | 255 | ||
256 | void PickboardPicks::initialise(void) | 256 | void PickboardPicks::initialise(void) |
257 | { | 257 | { |
258 | setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed)); | 258 | setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed)); |
259 | mode = 0; | 259 | mode = 0; |
260 | 260 | ||
261 | DictFilterConfig* dc = new DictFilterConfig(this); | 261 | DictFilterConfig* dc = new DictFilterConfig(this); |
262 | QStringList sets_a = QStringList::split(' ',tr("ABC DEF GHI JKL MNO PQR STU VWX YZ-'")); | 262 | QStringList sets_a = QStringList::split(' ',tr("ABC DEF GHI JKL MNO PQR STU VWX YZ-'")); |
263 | QStringList sets = QStringList::split(' ', | 263 | QStringList sets = QStringList::split(' ', |
264 | tr("ABC%/1iso8859-15 DEF%/1iso8859-15 GHI%/1iso8859-15 JKL MNO%/1iso8859-15 PQR%/1iso8859-15 STU%/1iso8859-15 VWX YZ-'%/1iso8859-15")); | 264 | tr("ABC DEF GHI JKL MNO PQR STU VWX YZ-'")); |
265 | for (QStringList::ConstIterator it = sets.begin(), it_a = sets_a.begin(); it!=sets.end(); ++it,++it_a) | 265 | for (QStringList::ConstIterator it = sets.begin(), it_a = sets_a.begin(); it!=sets.end(); ++it,++it_a) |
266 | dc->addSet(*it_a,*it); | 266 | dc->addSet(*it_a,*it); |
267 | dc->addMode("123"); | 267 | dc->addMode("123"); |
268 | dc->addMode("@*!?"); | 268 | dc->addMode("@*!?"); |
269 | dc->addMode(tr("KEY")); | 269 | dc->addMode(tr("KEY")); |
270 | dc->addMode(tr("Space")); | 270 | dc->addMode(tr("Space")); |
271 | dc->addMode(tr("Back")); | 271 | dc->addMode(tr("Back")); |
272 | dc->addMode(tr("Enter")); | 272 | dc->addMode(tr("Enter")); |
273 | dc->addMode(tr("Shift")); | 273 | dc->addMode(tr("Shift")); |
274 | configs.append(dc); | 274 | configs.append(dc); |
275 | 275 | ||
276 | CharStringConfig* number = new CharStringConfig(this); | 276 | CharStringConfig* number = new CharStringConfig(this); |
277 | number->addChar("0"); | 277 | number->addChar("0"); |
278 | number->addChar("1"); | 278 | number->addChar("1"); |
279 | number->addChar("2"); | 279 | number->addChar("2"); |
280 | number->addChar("3"); | 280 | number->addChar("3"); |
281 | number->addChar("4"); | 281 | number->addChar("4"); |
282 | number->addChar("5"); | 282 | number->addChar("5"); |
283 | number->addChar("6"); | 283 | number->addChar("6"); |
284 | number->addChar("7"); | 284 | number->addChar("7"); |
285 | number->addChar("8"); | 285 | number->addChar("8"); |
286 | number->addChar("9"); | 286 | number->addChar("9"); |
287 | number->addChar("."); // #### or "," in some locales | 287 | number->addChar("."); // #### or "," in some locales |
288 | configs.append(number); | 288 | configs.append(number); |
289 | 289 | ||
290 | CharConfig* punc = new CharConfig(this); | 290 | CharConfig* punc = new CharConfig(this); |
291 | 291 | ||
292 | punc->addChar(0,"\""); | 292 | punc->addChar(0,"\""); |
293 | punc->addChar(0,"`"); | 293 | punc->addChar(0,"`"); |
294 | punc->addChar(0,"'"); | 294 | punc->addChar(0,"'"); |
295 | punc->addChar(0,"\253"); | 295 | punc->addChar(0,"\253"); |
296 | punc->addChar(0,"\273"); | 296 | punc->addChar(0,"\273"); |
297 | punc->addChar(0,"\277"); | 297 | punc->addChar(0,"\277"); |
298 | punc->addChar(1,"("); | 298 | punc->addChar(1,"("); |
299 | punc->addChar(1,")"); | 299 | punc->addChar(1,")"); |
300 | punc->addChar(1,"["); | 300 | punc->addChar(1,"["); |
301 | punc->addChar(1,"]"); | 301 | punc->addChar(1,"]"); |
302 | punc->addChar(1,"{"); | 302 | punc->addChar(1,"{"); |
303 | punc->addChar(1,"}"); | 303 | punc->addChar(1,"}"); |
304 | 304 | ||
305 | punc->addChar(0,"+"); | 305 | punc->addChar(0,"+"); |
306 | punc->addChar(0,"-"); | 306 | punc->addChar(0,"-"); |
307 | punc->addChar(0,"*"); | 307 | punc->addChar(0,"*"); |
308 | punc->addChar(0,"/"); | 308 | punc->addChar(0,"/"); |
309 | punc->addChar(0,"="); | 309 | punc->addChar(0,"="); |
310 | punc->addChar(0,"_"); | 310 | punc->addChar(0,"_"); |
311 | punc->addChar(0,"$"); | 311 | punc->addChar(0,"$"); |
312 | punc->addChar(0,"&"); | 312 | punc->addChar(0,"&"); |
313 | punc->addChar(1,"|"); | 313 | punc->addChar(1,"|"); |
314 | punc->addChar(1,"@"); | 314 | punc->addChar(1,"@"); |
315 | punc->addChar(1,"\\"); | 315 | punc->addChar(1,"\\"); |
316 | punc->addChar(1,"#"); | 316 | punc->addChar(1,"#"); |
317 | punc->addChar(1,"^"); | 317 | punc->addChar(1,"^"); |
318 | punc->addChar(1,"~"); | 318 | punc->addChar(1,"~"); |
319 | punc->addChar(1,"<"); | 319 | punc->addChar(1,"<"); |
320 | punc->addChar(1,">"); | 320 | punc->addChar(1,">"); |
321 | 321 | ||
322 | punc->addChar(0,"."); | 322 | punc->addChar(0,"."); |
323 | punc->addChar(0,"?"); | 323 | punc->addChar(0,"?"); |
324 | punc->addChar(0,"!"); | 324 | punc->addChar(0,"!"); |
325 | punc->addChar(0,","); | 325 | punc->addChar(0,","); |
326 | punc->addChar(0,";"); | 326 | punc->addChar(0,";"); |
327 | punc->addChar(1,":"); | 327 | punc->addChar(1,":"); |
328 | punc->addChar(1,"\267"); | 328 | punc->addChar(1,"\267"); |
329 | punc->addChar(1,"\277"); | 329 | punc->addChar(1,"\277"); |
330 | punc->addChar(1,"\241"); | 330 | punc->addChar(1,"\241"); |
331 | punc->addChar(1,"\367"); | 331 | punc->addChar(1,"\367"); |
332 | 332 | ||
333 | punc->addChar(0,"$"); | 333 | punc->addChar(0,"$"); |
334 | punc->addChar(0,"\242"); | 334 | punc->addChar(0,"\242"); |
335 | punc->addChar(0,"\245"); | 335 | punc->addChar(0,"\245"); |
336 | punc->addChar(1,"\243"); | 336 | punc->addChar(1,"\243"); |
337 | punc->addChar(1,"\244"); | 337 | punc->addChar(1,"\244"); |
338 | punc->addChar(1,"\260"); | 338 | punc->addChar(1,"\260"); |
339 | 339 | ||
340 | configs.append(punc); | 340 | configs.append(punc); |
341 | 341 | ||
342 | KeycodeConfig* keys = new KeycodeConfig(this); | 342 | KeycodeConfig* keys = new KeycodeConfig(this); |
343 | keys->addKey(0,QPixmap(Esc_xpm),Key_Escape); | 343 | keys->addKey(0,QPixmap(Esc_xpm),Key_Escape); |
344 | keys->addKey(0,QPixmap(BS_xpm),Key_Backspace); | 344 | keys->addKey(0,QPixmap(BS_xpm),Key_Backspace); |
345 | keys->addGap(0,10); | 345 | keys->addGap(0,10); |
346 | 346 | ||
347 | keys->addKey(0,QPixmap(Ins_xpm),Key_Insert); | 347 | keys->addKey(0,QPixmap(Ins_xpm),Key_Insert); |
348 | keys->addKey(0,QPixmap(Home_xpm),Key_Home); | 348 | keys->addKey(0,QPixmap(Home_xpm),Key_Home); |
349 | keys->addKey(0,QPixmap(PgUp_xpm),Key_PageUp); | 349 | keys->addKey(0,QPixmap(PgUp_xpm),Key_PageUp); |
350 | 350 | ||
351 | keys->addGap(0,25); | 351 | keys->addGap(0,25); |
352 | keys->addKey(0,QPixmap(Up_xpm),Key_Up); | 352 | keys->addKey(0,QPixmap(Up_xpm),Key_Up); |
353 | keys->addGap(0,15); | 353 | keys->addGap(0,15); |
354 | 354 | ||
355 | keys->addKey(1,QPixmap(BackTab_xpm),Key_Tab); | 355 | keys->addKey(1,QPixmap(BackTab_xpm),Key_Tab); |
356 | keys->addGap(1,3); | 356 | keys->addGap(1,3); |
357 | keys->addKey(1,QPixmap(Tab_xpm),Key_Tab); | 357 | keys->addKey(1,QPixmap(Tab_xpm),Key_Tab); |
358 | keys->addGap(1,10); | 358 | keys->addGap(1,10); |
359 | 359 | ||
360 | keys->addKey(1,QPixmap(Del_xpm),Key_Delete); | 360 | keys->addKey(1,QPixmap(Del_xpm),Key_Delete); |
361 | keys->addGap(1,2); | 361 | keys->addGap(1,2); |
362 | keys->addKey(1,QPixmap(End_xpm),Key_End); | 362 | keys->addKey(1,QPixmap(End_xpm),Key_End); |
363 | keys->addGap(1,3); | 363 | keys->addGap(1,3); |
364 | keys->addKey(1,QPixmap(PgDn_xpm),Key_PageDown); | 364 | keys->addKey(1,QPixmap(PgDn_xpm),Key_PageDown); |
365 | 365 | ||
366 | keys->addGap(1,10); | 366 | keys->addGap(1,10); |
367 | keys->addKey(1,QPixmap(Left_xpm),Key_Left); | 367 | keys->addKey(1,QPixmap(Left_xpm),Key_Left); |
368 | keys->addKey(1,QPixmap(Down_xpm),Key_Down); | 368 | keys->addKey(1,QPixmap(Down_xpm),Key_Down); |
369 | keys->addKey(1,QPixmap(Right_xpm),Key_Right); | 369 | keys->addKey(1,QPixmap(Right_xpm),Key_Right); |
370 | 370 | ||
371 | keys->addGap(1,13); | 371 | keys->addGap(1,13); |
372 | keys->addKey(1,QPixmap(Space_xpm),Key_Space); | 372 | keys->addKey(1,QPixmap(Space_xpm),Key_Space); |
373 | 373 | ||
374 | keys->addGap(0,10); | 374 | keys->addGap(0,10); |
375 | keys->addKey(0,QPixmap(Enter_xpm),Key_Return); | 375 | keys->addKey(0,QPixmap(Enter_xpm),Key_Return); |
376 | 376 | ||
377 | configs.append(keys); | 377 | configs.append(keys); |
378 | } | 378 | } |
379 | 379 | ||
380 | PickboardPicks::~PickboardPicks() | 380 | PickboardPicks::~PickboardPicks() |
381 | { | 381 | { |
382 | } | 382 | } |
383 | 383 | ||
384 | QSize PickboardPicks::sizeHint() const | 384 | QSize PickboardPicks::sizeHint() const |
385 | { | 385 | { |
386 | return QSize(240,fontMetrics().lineSpacing()*2+3); | 386 | return QSize(240,fontMetrics().lineSpacing()*2+3); |
387 | } | 387 | } |
388 | 388 | ||
389 | void PickboardPicks::drawContents(QPainter* p) | 389 | void PickboardPicks::drawContents(QPainter* p) |
390 | { | 390 | { |
391 | config()->draw(p); | 391 | config()->draw(p); |
392 | } | 392 | } |
393 | 393 | ||
394 | void PickboardPicks::mousePressEvent(QMouseEvent* e) | 394 | void PickboardPicks::mousePressEvent(QMouseEvent* e) |
395 | { | 395 | { |
396 | config()->pickPoint(e->pos(),TRUE); | 396 | config()->pickPoint(e->pos(),TRUE); |
397 | } | 397 | } |
398 | 398 | ||
399 | void PickboardPicks::mouseDoubleClickEvent(QMouseEvent* e) | 399 | void PickboardPicks::mouseDoubleClickEvent(QMouseEvent* e) |
400 | { | 400 | { |
401 | config()->pickPoint(e->pos(),TRUE); | 401 | config()->pickPoint(e->pos(),TRUE); |
402 | } | 402 | } |
403 | 403 | ||
404 | void PickboardPicks::mouseReleaseEvent(QMouseEvent* e) | 404 | void PickboardPicks::mouseReleaseEvent(QMouseEvent* e) |
405 | { | 405 | { |
406 | config()->pickPoint(e->pos(),FALSE); | 406 | config()->pickPoint(e->pos(),FALSE); |
407 | } | 407 | } |
408 | 408 | ||
409 | void PickboardPicks::setMode(int m) | 409 | void PickboardPicks::setMode(int m) |
410 | { | 410 | { |
411 | mode = m; | 411 | mode = m; |
412 | } | 412 | } |
413 | 413 | ||
414 | void PickboardPicks::resetState() | 414 | void PickboardPicks::resetState() |
415 | { | 415 | { |
416 | config()->doMenu(100); | 416 | config()->doMenu(100); |
417 | } | 417 | } |