Qt 4.8
qt-4.8.6
src
testlib
qasciikey.cpp
Go to the documentation of this file.
1
/****************************************************************************
2
**
3
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4
** Contact: http://www.qt-project.org/legal
5
**
6
** This file is part of the QtTest module of the Qt Toolkit.
7
**
8
** $QT_BEGIN_LICENSE:LGPL$
9
** Commercial License Usage
10
** Licensees holding valid commercial Qt licenses may use this file in
11
** accordance with the commercial license agreement provided with the
12
** Software or, alternatively, in accordance with the terms contained in
13
** a written agreement between you and Digia. For licensing terms and
14
** conditions see http://qt.digia.com/licensing. For further information
15
** use the contact form at http://qt.digia.com/contact-us.
16
**
17
** GNU Lesser General Public License Usage
18
** Alternatively, this file may be used under the terms of the GNU Lesser
19
** General Public License version 2.1 as published by the Free Software
20
** Foundation and appearing in the file LICENSE.LGPL included in the
21
** packaging of this file. Please review the following information to
22
** ensure the GNU Lesser General Public License version 2.1 requirements
23
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24
**
25
** In addition, as a special exception, Digia gives you certain additional
26
** rights. These rights are described in the Digia Qt LGPL Exception
27
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28
**
29
** GNU General Public License Usage
30
** Alternatively, this file may be used under the terms of the GNU
31
** General Public License version 3.0 as published by the Free Software
32
** Foundation and appearing in the file LICENSE.GPL included in the
33
** packaging of this file. Please review the following information to
34
** ensure the GNU General Public License version 3.0 requirements will be
35
** met: http://www.gnu.org/copyleft/gpl.html.
36
**
37
**
38
** $QT_END_LICENSE$
39
**
40
****************************************************************************/
41
42
#include "QtTest/qtestcase.h"
43
#include "QtTest/qtestassert.h"
44
45
QT_BEGIN_NAMESPACE
46
57
Qt::Key
QTest::asciiToKey
(
char
ascii)
58
{
59
switch
((
unsigned
char
)ascii) {
60
case
0x08:
return
Qt::Key_Backspace
;
61
case
0x09:
return
Qt::Key_Tab
;
62
case
0x0b:
return
Qt::Key_Backtab
;
63
case
0x0d:
return
Qt::Key_Return
;
64
case
0x1b:
return
Qt::Key_Escape
;
65
case
0x20:
return
Qt::Key_Space
;
66
case
0x21:
return
Qt::Key_Exclam
;
67
case
0x22:
return
Qt::Key_QuoteDbl
;
68
case
0x23:
return
Qt::Key_NumberSign
;
69
case
0x24:
return
Qt::Key_Dollar
;
70
case
0x25:
return
Qt::Key_Percent
;
71
case
0x26:
return
Qt::Key_Ampersand
;
72
case
0x27:
return
Qt::Key_Apostrophe
;
73
case
0x28:
return
Qt::Key_ParenLeft
;
74
case
0x29:
return
Qt::Key_ParenRight
;
75
case
0x2a:
return
Qt::Key_Asterisk
;
76
case
0x2b:
return
Qt::Key_Plus
;
77
case
0x2c:
return
Qt::Key_Comma
;
78
case
0x2d:
return
Qt::Key_Minus
;
79
case
0x2e:
return
Qt::Key_Period
;
80
case
0x2f:
return
Qt::Key_Slash
;
81
case
0x30:
return
Qt::Key_0
;
82
case
0x31:
return
Qt::Key_1
;
83
case
0x32:
return
Qt::Key_2
;
84
case
0x33:
return
Qt::Key_3
;
85
case
0x34:
return
Qt::Key_4
;
86
case
0x35:
return
Qt::Key_5
;
87
case
0x36:
return
Qt::Key_6
;
88
case
0x37:
return
Qt::Key_7
;
89
case
0x38:
return
Qt::Key_8
;
90
case
0x39:
return
Qt::Key_9
;
91
case
0x3a:
return
Qt::Key_Colon
;
92
case
0x3b:
return
Qt::Key_Semicolon
;
93
case
0x3c:
return
Qt::Key_Less
;
94
case
0x3d:
return
Qt::Key_Equal
;
95
case
0x3e:
return
Qt::Key_Greater
;
96
case
0x3f:
return
Qt::Key_Question
;
97
case
0x40:
return
Qt::Key_At
;
98
case
0x41:
return
Qt::Key_A
;
99
case
0x42:
return
Qt::Key_B
;
100
case
0x43:
return
Qt::Key_C
;
101
case
0x44:
return
Qt::Key_D
;
102
case
0x45:
return
Qt::Key_E
;
103
case
0x46:
return
Qt::Key_F
;
104
case
0x47:
return
Qt::Key_G
;
105
case
0x48:
return
Qt::Key_H
;
106
case
0x49:
return
Qt::Key_I
;
107
case
0x4a:
return
Qt::Key_J
;
108
case
0x4b:
return
Qt::Key_K
;
109
case
0x4c:
return
Qt::Key_L
;
110
case
0x4d:
return
Qt::Key_M
;
111
case
0x4e:
return
Qt::Key_N
;
112
case
0x4f:
return
Qt::Key_O
;
113
case
0x50:
return
Qt::Key_P
;
114
case
0x51:
return
Qt::Key_Q
;
115
case
0x52:
return
Qt::Key_R
;
116
case
0x53:
return
Qt::Key_S
;
117
case
0x54:
return
Qt::Key_T
;
118
case
0x55:
return
Qt::Key_U
;
119
case
0x56:
return
Qt::Key_V
;
120
case
0x57:
return
Qt::Key_W
;
121
case
0x58:
return
Qt::Key_X
;
122
case
0x59:
return
Qt::Key_Y
;
123
case
0x5a:
return
Qt::Key_Z
;
124
case
0x5b:
return
Qt::Key_BracketLeft
;
125
case
0x5c:
return
Qt::Key_Backslash
;
126
case
0x5d:
return
Qt::Key_BracketRight
;
127
case
0x5e:
return
Qt::Key_AsciiCircum
;
128
case
0x5f:
return
Qt::Key_Underscore
;
129
case
0x60:
return
Qt::Key_QuoteLeft
;
130
case
0x61:
return
Qt::Key_A
;
131
case
0x62:
return
Qt::Key_B
;
132
case
0x63:
return
Qt::Key_C
;
133
case
0x64:
return
Qt::Key_D
;
134
case
0x65:
return
Qt::Key_E
;
135
case
0x66:
return
Qt::Key_F
;
136
case
0x67:
return
Qt::Key_G
;
137
case
0x68:
return
Qt::Key_H
;
138
case
0x69:
return
Qt::Key_I
;
139
case
0x6a:
return
Qt::Key_J
;
140
case
0x6b:
return
Qt::Key_K
;
141
case
0x6c:
return
Qt::Key_L
;
142
case
0x6d:
return
Qt::Key_M
;
143
case
0x6e:
return
Qt::Key_N
;
144
case
0x6f:
return
Qt::Key_O
;
145
case
0x70:
return
Qt::Key_P
;
146
case
0x71:
return
Qt::Key_Q
;
147
case
0x72:
return
Qt::Key_R
;
148
case
0x73:
return
Qt::Key_S
;
149
case
0x74:
return
Qt::Key_T
;
150
case
0x75:
return
Qt::Key_U
;
151
case
0x76:
return
Qt::Key_V
;
152
case
0x77:
return
Qt::Key_W
;
153
case
0x78:
return
Qt::Key_X
;
154
case
0x79:
return
Qt::Key_Y
;
155
case
0x7a:
return
Qt::Key_Z
;
156
case
0x7b:
return
Qt::Key_BraceLeft
;
157
case
0x7c:
return
Qt::Key_Bar
;
158
case
0x7d:
return
Qt::Key_BraceRight
;
159
case
0x7e:
return
Qt::Key_AsciiTilde
;
160
161
// Latin 1 codes adapted from X: keysymdef.h,v 1.21 94/08/28 16:17:06
162
case
0xa0:
return
Qt::Key_nobreakspace
;
163
case
0xa1:
return
Qt::Key_exclamdown
;
164
case
0xa2:
return
Qt::Key_cent
;
165
case
0xa3:
return
Qt::Key_sterling
;
166
case
0xa4:
return
Qt::Key_currency
;
167
case
0xa5:
return
Qt::Key_yen
;
168
case
0xa6:
return
Qt::Key_brokenbar
;
169
case
0xa7:
return
Qt::Key_section
;
170
case
0xa8:
return
Qt::Key_diaeresis
;
171
case
0xa9:
return
Qt::Key_copyright
;
172
case
0xaa:
return
Qt::Key_ordfeminine
;
173
case
0xab:
return
Qt::Key_guillemotleft
;
174
case
0xac:
return
Qt::Key_notsign
;
175
case
0xad:
return
Qt::Key_hyphen
;
176
case
0xae:
return
Qt::Key_registered
;
177
case
0xaf:
return
Qt::Key_macron
;
178
case
0xb0:
return
Qt::Key_degree
;
179
case
0xb1:
return
Qt::Key_plusminus
;
180
case
0xb2:
return
Qt::Key_twosuperior
;
181
case
0xb3:
return
Qt::Key_threesuperior
;
182
case
0xb4:
return
Qt::Key_acute
;
183
case
0xb5:
return
Qt::Key_mu
;
184
case
0xb6:
return
Qt::Key_paragraph
;
185
case
0xb7:
return
Qt::Key_periodcentered
;
186
case
0xb8:
return
Qt::Key_cedilla
;
187
case
0xb9:
return
Qt::Key_onesuperior
;
188
case
0xba:
return
Qt::Key_masculine
;
189
case
0xbb:
return
Qt::Key_guillemotright
;
190
case
0xbc:
return
Qt::Key_onequarter
;
191
case
0xbd:
return
Qt::Key_onehalf
;
192
case
0xbe:
return
Qt::Key_threequarters
;
193
case
0xbf:
return
Qt::Key_questiondown
;
194
case
0xc0:
return
Qt::Key_Agrave
;
195
case
0xc1:
return
Qt::Key_Aacute
;
196
case
0xc2:
return
Qt::Key_Acircumflex
;
197
case
0xc3:
return
Qt::Key_Atilde
;
198
case
0xc4:
return
Qt::Key_Adiaeresis
;
199
case
0xc5:
return
Qt::Key_Aring
;
200
case
0xc6:
return
Qt::Key_AE
;
201
case
0xc7:
return
Qt::Key_Ccedilla
;
202
case
0xc8:
return
Qt::Key_Egrave
;
203
case
0xc9:
return
Qt::Key_Eacute
;
204
case
0xca:
return
Qt::Key_Ecircumflex
;
205
case
0xcb:
return
Qt::Key_Ediaeresis
;
206
case
0xcc:
return
Qt::Key_Igrave
;
207
case
0xcd:
return
Qt::Key_Iacute
;
208
case
0xce:
return
Qt::Key_Icircumflex
;
209
case
0xcf:
return
Qt::Key_Idiaeresis
;
210
case
0xd0:
return
Qt::Key_ETH
;
211
case
0xd1:
return
Qt::Key_Ntilde
;
212
case
0xd2:
return
Qt::Key_Ograve
;
213
case
0xd3:
return
Qt::Key_Oacute
;
214
case
0xd4:
return
Qt::Key_Ocircumflex
;
215
case
0xd5:
return
Qt::Key_Otilde
;
216
case
0xd6:
return
Qt::Key_Odiaeresis
;
217
case
0xd7:
return
Qt::Key_multiply
;
218
case
0xd8:
return
Qt::Key_Ooblique
;
219
case
0xd9:
return
Qt::Key_Ugrave
;
220
case
0xda:
return
Qt::Key_Uacute
;
221
case
0xdb:
return
Qt::Key_Ucircumflex
;
222
case
0xdc:
return
Qt::Key_Udiaeresis
;
223
case
0xdd:
return
Qt::Key_Yacute
;
224
case
0xde:
return
Qt::Key_THORN
;
225
case
0xdf:
return
Qt::Key_ssharp
;
226
case
0xe5:
return
Qt::Key_Aring
;
227
case
0xe6:
return
Qt::Key_AE
;
228
case
0xf7:
return
Qt::Key_division
;
229
case
0xf8:
return
Qt::Key_Ooblique
;
230
case
0xff:
return
Qt::Key_ydiaeresis
;
231
default
:
QTEST_ASSERT
(
false
);
return
Qt::Key
(0);
232
}
233
}
234
245
char
QTest::keyToAscii
(
Qt::Key
key
)
246
{
247
switch
(key) {
248
case
Qt::Key_Backspace
:
return
0x8;
//BS
249
case
Qt::Key_Tab
:
return
0x09;
// HT
250
case
Qt::Key_Backtab
:
return
0x0b;
// VT
251
case
Qt::Key_Enter
:
252
case
Qt::Key_Return
:
return
0x0d;
// CR
253
case
Qt::Key_Escape
:
return
0x1b;
// ESC
254
case
Qt::Key_Space
:
return
0x20;
// 7 bit printable ASCII
255
case
Qt::Key_Exclam
:
return
0x21;
256
case
Qt::Key_QuoteDbl
:
return
0x22;
257
case
Qt::Key_NumberSign
:
return
0x23;
258
case
Qt::Key_Dollar
:
return
0x24;
259
case
Qt::Key_Percent
:
return
0x25;
260
case
Qt::Key_Ampersand
:
return
0x26;
261
case
Qt::Key_Apostrophe
:
return
0x27;
262
case
Qt::Key_ParenLeft
:
return
0x28;
263
case
Qt::Key_ParenRight
:
return
0x29;
264
case
Qt::Key_Asterisk
:
return
0x2a;
265
case
Qt::Key_Plus
:
return
0x2b;
266
case
Qt::Key_Comma
:
return
0x2c;
267
case
Qt::Key_Minus
:
return
0x2d;
268
case
Qt::Key_Period
:
return
0x2e;
269
case
Qt::Key_Slash
:
return
0x2f;
270
case
Qt::Key_0
:
return
0x30;
271
case
Qt::Key_1
:
return
0x31;
272
case
Qt::Key_2
:
return
0x32;
273
case
Qt::Key_3
:
return
0x33;
274
case
Qt::Key_4
:
return
0x34;
275
case
Qt::Key_5
:
return
0x35;
276
case
Qt::Key_6
:
return
0x36;
277
case
Qt::Key_7
:
return
0x37;
278
case
Qt::Key_8
:
return
0x38;
279
case
Qt::Key_9
:
return
0x39;
280
case
Qt::Key_Colon
:
return
0x3a;
281
case
Qt::Key_Semicolon
:
return
0x3b;
282
case
Qt::Key_Less
:
return
0x3c;
283
case
Qt::Key_Equal
:
return
0x3d;
284
case
Qt::Key_Greater
:
return
0x3e;
285
case
Qt::Key_Question
:
return
0x3f;
286
case
Qt::Key_At
:
return
0x40;
287
case
Qt::Key_A
:
return
0x61;
// 0x41 == 'A', 0x61 == 'a'
288
case
Qt::Key_B
:
return
0x62;
289
case
Qt::Key_C
:
return
0x63;
290
case
Qt::Key_D
:
return
0x64;
291
case
Qt::Key_E
:
return
0x65;
292
case
Qt::Key_F
:
return
0x66;
293
case
Qt::Key_G
:
return
0x67;
294
case
Qt::Key_H
:
return
0x68;
295
case
Qt::Key_I
:
return
0x69;
296
case
Qt::Key_J
:
return
0x6a;
297
case
Qt::Key_K
:
return
0x6b;
298
case
Qt::Key_L
:
return
0x6c;
299
case
Qt::Key_M
:
return
0x6d;
300
case
Qt::Key_N
:
return
0x6e;
301
case
Qt::Key_O
:
return
0x6f;
302
case
Qt::Key_P
:
return
0x70;
303
case
Qt::Key_Q
:
return
0x71;
304
case
Qt::Key_R
:
return
0x72;
305
case
Qt::Key_S
:
return
0x73;
306
case
Qt::Key_T
:
return
0x74;
307
case
Qt::Key_U
:
return
0x75;
308
case
Qt::Key_V
:
return
0x76;
309
case
Qt::Key_W
:
return
0x77;
310
case
Qt::Key_X
:
return
0x78;
311
case
Qt::Key_Y
:
return
0x79;
312
case
Qt::Key_Z
:
return
0x7a;
313
case
Qt::Key_BracketLeft
:
return
0x5b;
314
case
Qt::Key_Backslash
:
return
0x5c;
315
case
Qt::Key_BracketRight
:
return
0x5d;
316
case
Qt::Key_AsciiCircum
:
return
0x5e;
317
case
Qt::Key_Underscore
:
return
0x5f;
318
case
Qt::Key_QuoteLeft
:
return
0x60;
319
320
case
Qt::Key_BraceLeft
:
return
0x7b;
321
case
Qt::Key_Bar
:
return
0x7c;
322
case
Qt::Key_BraceRight
:
return
0x7d;
323
case
Qt::Key_AsciiTilde
:
return
0x7e;
324
325
case
Qt::Key_Delete
:
return
0;
326
case
Qt::Key_Insert
:
return
0;
// = 0x1006,
327
case
Qt::Key_Pause
:
return
0;
// = 0x1008,
328
case
Qt::Key_Print
:
return
0;
// = 0x1009,
329
case
Qt::Key_SysReq
:
return
0;
// = 0x100a,
330
331
case
Qt::Key_Clear
:
return
0;
// = 0x100b,
332
333
case
Qt::Key_Home
:
return
0;
// = 0x1010, // cursor movement
334
case
Qt::Key_End
:
return
0;
// = 0x1011,
335
case
Qt::Key_Left
:
return
0;
// = 0x1012,
336
case
Qt::Key_Up
:
return
0;
// = 0x1013,
337
case
Qt::Key_Right
:
return
0;
// = 0x1014,
338
case
Qt::Key_Down
:
return
0;
// = 0x1015,
339
case
Qt::Key_PageUp
:
return
0;
// = 0x1016,
340
case
Qt::Key_PageDown
:
return
0;
// = 0x1017,
341
case
Qt::Key_Shift
:
return
0;
// = 0x1020, // modifiers
342
case
Qt::Key_Control
:
return
0;
// = 0x1021,
343
case
Qt::Key_Meta
:
return
0;
// = 0x1022,
344
case
Qt::Key_Alt
:
return
0;
// = 0x1023,
345
case
Qt::Key_CapsLock
:
return
0;
// = 0x1024,
346
case
Qt::Key_NumLock
:
return
0;
// = 0x1025,
347
case
Qt::Key_ScrollLock
:
return
0;
// = 0x1026,
348
case
Qt::Key_F1
:
return
0;
// = 0x1030, // function keys
349
case
Qt::Key_F2
:
return
0;
// = 0x1031,
350
case
Qt::Key_F3
:
return
0;
// = 0x1032,
351
case
Qt::Key_F4
:
return
0;
// = 0x1033,
352
case
Qt::Key_F5
:
return
0;
// = 0x1034,
353
case
Qt::Key_F6
:
return
0;
// = 0x1035,
354
case
Qt::Key_F7
:
return
0;
// = 0x1036,
355
case
Qt::Key_F8
:
return
0;
// = 0x1037,
356
case
Qt::Key_F9
:
return
0;
// = 0x1038,
357
case
Qt::Key_F10
:
return
0;
// = 0x1039,
358
case
Qt::Key_F11
:
return
0;
// = 0x103a,
359
case
Qt::Key_F12
:
return
0;
// = 0x103b,
360
case
Qt::Key_F13
:
return
0;
// = 0x103c,
361
case
Qt::Key_F14
:
return
0;
// = 0x103d,
362
case
Qt::Key_F15
:
return
0;
// = 0x103e,
363
case
Qt::Key_F16
:
return
0;
// = 0x103f,
364
case
Qt::Key_F17
:
return
0;
// = 0x1040,
365
case
Qt::Key_F18
:
return
0;
// = 0x1041,
366
case
Qt::Key_F19
:
return
0;
// = 0x1042,
367
case
Qt::Key_F20
:
return
0;
// = 0x1043,
368
case
Qt::Key_F21
:
return
0;
// = 0x1044,
369
case
Qt::Key_F22
:
return
0;
// = 0x1045,
370
case
Qt::Key_F23
:
return
0;
// = 0x1046,
371
case
Qt::Key_F24
:
return
0;
// = 0x1047,
372
case
Qt::Key_F25
:
return
0;
// = 0x1048, // F25 .. F35 only on X11
373
case
Qt::Key_F26
:
return
0;
// = 0x1049,
374
case
Qt::Key_F27
:
return
0;
// = 0x104a,
375
case
Qt::Key_F28
:
return
0;
// = 0x104b,
376
case
Qt::Key_F29
:
return
0;
// = 0x104c,
377
case
Qt::Key_F30
:
return
0;
// = 0x104d,
378
case
Qt::Key_F31
:
return
0;
// = 0x104e,
379
case
Qt::Key_F32
:
return
0;
// = 0x104f,
380
case
Qt::Key_F33
:
return
0;
// = 0x1050,
381
case
Qt::Key_F34
:
return
0;
// = 0x1051,
382
case
Qt::Key_F35
:
return
0;
// = 0x1052,
383
case
Qt::Key_Super_L
:
return
0;
// = 0x1053, // extra keys
384
case
Qt::Key_Super_R
:
return
0;
// = 0x1054,
385
case
Qt::Key_Menu
:
return
0;
// = 0x1055,
386
case
Qt::Key_Hyper_L
:
return
0;
// = 0x1056,
387
case
Qt::Key_Hyper_R
:
return
0;
// = 0x1057,
388
case
Qt::Key_Help
:
return
0;
// = 0x1058,
389
case
Qt::Key_Direction_L
:
return
0;
// = 0x1059,
390
case
Qt::Key_Direction_R
:
return
0;
// = 0x1060,
391
392
// Latin 1 codes adapted from X: keysymdef.h,v 1.21 94/08/28 16:17:06
393
case
Qt::Key_nobreakspace
:
return
char(0xa0);
394
case
Qt::Key_exclamdown
:
return
char(0xa1);
395
case
Qt::Key_cent
:
return
char(0xa2);
396
case
Qt::Key_sterling
:
return
char(0xa3);
397
case
Qt::Key_currency
:
return
char(0xa4);
398
case
Qt::Key_yen
:
return
char(0xa5);
399
case
Qt::Key_brokenbar
:
return
char(0xa6);
400
case
Qt::Key_section
:
return
char(0xa7);
401
case
Qt::Key_diaeresis
:
return
char(0xa8);
402
case
Qt::Key_copyright
:
return
char(0xa9);
403
case
Qt::Key_ordfeminine
:
return
char(0xaa);
404
case
Qt::Key_guillemotleft
:
return
char(0xab);
// left angle quotation mar
405
case
Qt::Key_notsign
:
return
char(0xac);
406
case
Qt::Key_hyphen
:
return
char(0xad);
407
case
Qt::Key_registered
:
return
char(0xae);
408
case
Qt::Key_macron
:
return
char(0xaf);
409
case
Qt::Key_degree
:
return
char(0xb0);
410
case
Qt::Key_plusminus
:
return
char(0xb1);
411
case
Qt::Key_twosuperior
:
return
char(0xb2);
412
case
Qt::Key_threesuperior
:
return
char(0xb3);
413
case
Qt::Key_acute
:
return
char(0xb4);
414
case
Qt::Key_mu
:
return
char(0xb5);
415
case
Qt::Key_paragraph
:
return
char(0xb6);
416
case
Qt::Key_periodcentered
:
return
char(0xb7);
417
case
Qt::Key_cedilla
:
return
char(0xb8);
418
case
Qt::Key_onesuperior
:
return
char(0xb9);
419
case
Qt::Key_masculine
:
return
char(0xba);
420
case
Qt::Key_guillemotright
:
return
char(0xbb);
// right angle quotation mar
421
case
Qt::Key_onequarter
:
return
char(0xbc);
422
case
Qt::Key_onehalf
:
return
char(0xbd);
423
case
Qt::Key_threequarters
:
return
char(0xbe);
424
case
Qt::Key_questiondown
:
return
char(0xbf);
425
case
Qt::Key_Agrave
:
return
char(0xc0);
426
case
Qt::Key_Aacute
:
return
char(0xc1);
427
case
Qt::Key_Acircumflex
:
return
char(0xc2);
428
case
Qt::Key_Atilde
:
return
char(0xc3);
429
case
Qt::Key_Adiaeresis
:
return
char(0xc4);
430
case
Qt::Key_Aring
:
return
char(0xe5);
431
case
Qt::Key_AE
:
return
char(0xe6);
432
case
Qt::Key_Ccedilla
:
return
char(0xc7);
433
case
Qt::Key_Egrave
:
return
char(0xc8);
434
case
Qt::Key_Eacute
:
return
char(0xc9);
435
case
Qt::Key_Ecircumflex
:
return
char(0xca);
436
case
Qt::Key_Ediaeresis
:
return
char(0xcb);
437
case
Qt::Key_Igrave
:
return
char(0xcc);
438
case
Qt::Key_Iacute
:
return
char(0xcd);
439
case
Qt::Key_Icircumflex
:
return
char(0xce);
440
case
Qt::Key_Idiaeresis
:
return
char(0xcf);
441
case
Qt::Key_ETH
:
return
char(0xd0);
442
case
Qt::Key_Ntilde
:
return
char(0xd1);
443
case
Qt::Key_Ograve
:
return
char(0xd2);
444
case
Qt::Key_Oacute
:
return
char(0xd3);
445
case
Qt::Key_Ocircumflex
:
return
char(0xd4);
446
case
Qt::Key_Otilde
:
return
char(0xd5);
447
case
Qt::Key_Odiaeresis
:
return
char(0xd6);
448
case
Qt::Key_multiply
:
return
char(0xd7);
449
case
Qt::Key_Ooblique
:
return
char(0xf8);
450
case
Qt::Key_Ugrave
:
return
char(0xd9);
451
case
Qt::Key_Uacute
:
return
char(0xda);
452
case
Qt::Key_Ucircumflex
:
return
char(0xdb);
453
case
Qt::Key_Udiaeresis
:
return
char(0xdc);
454
case
Qt::Key_Yacute
:
return
char(0xdd);
455
case
Qt::Key_THORN
:
return
char(0xde);
456
case
Qt::Key_ssharp
:
return
char(0xdf);
457
case
Qt::Key_division
:
return
char(0xf7);
458
case
Qt::Key_ydiaeresis
:
return
char(0xff);
459
460
// multimedia/internet keys - ignored by default - see QKeyEvent c'tor
461
462
case
Qt::Key_Back
:
return
0;
// = 0x1061,
463
case
Qt::Key_Forward
:
return
0;
// = 0x1062,
464
case
Qt::Key_Stop
:
return
0;
// = 0x1063,
465
case
Qt::Key_Refresh
:
return
0;
// = 0x1064,
466
467
case
Qt::Key_VolumeDown
:
return
0;
// = 0x1070,
468
case
Qt::Key_VolumeMute
:
return
0;
// = 0x1071,
469
case
Qt::Key_VolumeUp
:
return
0;
// = 0x1072,
470
case
Qt::Key_BassBoost
:
return
0;
// = 0x1073,
471
case
Qt::Key_BassUp
:
return
0;
// = 0x1074,
472
case
Qt::Key_BassDown
:
return
0;
// = 0x1075,
473
case
Qt::Key_TrebleUp
:
return
0;
// = 0x1076,
474
case
Qt::Key_TrebleDown
:
return
0;
// = 0x1077,
475
476
case
Qt::Key_MediaPlay
:
return
0;
// = 0x1080,
477
case
Qt::Key_MediaStop
:
return
0;
// = 0x1081,
478
case
Qt::Key_MediaPrevious
:
return
0;
// = 0x1082,
479
case
Qt::Key_MediaNext
:
return
0;
// = 0x1083,
480
case
Qt::Key_MediaRecord
:
return
0;
// = 0x1084,
481
482
case
Qt::Key_HomePage
:
return
0;
// = 0x1090,
483
case
Qt::Key_Favorites
:
return
0;
// = 0x1091,
484
case
Qt::Key_Search
:
return
0;
// = 0x1092,
485
case
Qt::Key_Standby
:
return
0;
// = 0x1093,
486
case
Qt::Key_OpenUrl
:
return
0;
// = 0x1094,
487
488
case
Qt::Key_LaunchMail
:
return
0;
// = 0x10a0,
489
case
Qt::Key_LaunchMedia
:
return
0;
// = 0x10a1,
490
case
Qt::Key_Launch0
:
return
0;
// = 0x10a2,
491
case
Qt::Key_Launch1
:
return
0;
// = 0x10a3,
492
case
Qt::Key_Launch2
:
return
0;
// = 0x10a4,
493
case
Qt::Key_Launch3
:
return
0;
// = 0x10a5,
494
case
Qt::Key_Launch4
:
return
0;
// = 0x10a6,
495
case
Qt::Key_Launch5
:
return
0;
// = 0x10a7,
496
case
Qt::Key_Launch6
:
return
0;
// = 0x10a8,
497
case
Qt::Key_Launch7
:
return
0;
// = 0x10a9,
498
case
Qt::Key_Launch8
:
return
0;
// = 0x10aa,
499
case
Qt::Key_Launch9
:
return
0;
// = 0x10ab,
500
case
Qt::Key_LaunchA
:
return
0;
// = 0x10ac,
501
case
Qt::Key_LaunchB
:
return
0;
// = 0x10ad,
502
case
Qt::Key_LaunchC
:
return
0;
// = 0x10ae,
503
case
Qt::Key_LaunchD
:
return
0;
// = 0x10af,
504
case
Qt::Key_LaunchE
:
return
0;
// = 0x10b0,
505
case
Qt::Key_LaunchF
:
return
0;
// = 0x10b1,
506
507
default
:
QTEST_ASSERT
(
false
);
return
0;
508
}
509
}
510
511
QT_END_NAMESPACE
Qt::Key_Atilde
Definition:
qnamespace.h:801
Qt::Key_A
Definition:
qnamespace.h:729
Qt::Key_J
Definition:
qnamespace.h:738
Qt::Key_registered
Definition:
qnamespace.h:780
Qt::Key_Launch1
Definition:
qnamespace.h:979
Qt::Key_MediaPlay
Definition:
qnamespace.h:961
Qt::Key_Less
Definition:
qnamespace.h:724
Qt::Key_periodcentered
Definition:
qnamespace.h:789
Qt::Key_BraceLeft
Definition:
qnamespace.h:761
Qt::Key_masculine
Definition:
qnamespace.h:792
Qt::Key_hyphen
Definition:
qnamespace.h:779
Qt::Key_F18
Definition:
qnamespace.h:669
Qt::Key_F23
Definition:
qnamespace.h:674
Qt::Key_yen
Definition:
qnamespace.h:771
Qt::Key_Idiaeresis
Definition:
qnamespace.h:813
Qt::Key_VolumeUp
Definition:
qnamespace.h:955
Qt::Key_Equal
Definition:
qnamespace.h:725
Qt::Key_AE
Definition:
qnamespace.h:804
Qt::Key_cent
Definition:
qnamespace.h:768
Qt::Key_Aring
Definition:
qnamespace.h:803
Qt::Key_F20
Definition:
qnamespace.h:671
QT_END_NAMESPACE
#define QT_END_NAMESPACE
This macro expands to.
Definition:
qglobal.h:90
Qt::Key_D
Definition:
qnamespace.h:732
Qt::Key_F17
Definition:
qnamespace.h:668
Qt::Key_End
Definition:
qnamespace.h:632
Qt::Key_At
Definition:
qnamespace.h:728
Qt::Key_F30
Definition:
qnamespace.h:681
Qt::Key_Agrave
Definition:
qnamespace.h:798
Qt::Key_F32
Definition:
qnamespace.h:683
Qt::Key_MediaNext
Definition:
qnamespace.h:967
Qt::Key_Meta
Definition:
qnamespace.h:647
Qt::Key_Direction_R
Definition:
qnamespace.h:694
Qt::Key_N
Definition:
qnamespace.h:742
Qt::Key_Y
Definition:
qnamespace.h:753
Qt::Key_3
Definition:
qnamespace.h:715
Qt::Key_Control
Definition:
qnamespace.h:646
Qt::Key_Slash
Definition:
qnamespace.h:711
Qt::Key_5
Definition:
qnamespace.h:717
Qt::Key_Asterisk
Definition:
qnamespace.h:706
Qt::Key_M
Definition:
qnamespace.h:741
Qt::Key_F27
Definition:
qnamespace.h:678
Qt::Key_6
Definition:
qnamespace.h:718
Qt::Key_Ecircumflex
Definition:
qnamespace.h:808
Qt::Key_Ampersand
Definition:
qnamespace.h:702
Qt::Key_Uacute
Definition:
qnamespace.h:824
Qt::Key_Hyper_L
Definition:
qnamespace.h:690
Qt::Key_F19
Definition:
qnamespace.h:670
Qt::Key_Egrave
Definition:
qnamespace.h:806
Qt::Key_mu
Definition:
qnamespace.h:787
Qt::Key_PageUp
Definition:
qnamespace.h:637
Qt::Key_Launch4
Definition:
qnamespace.h:982
Qt::Key_Acircumflex
Definition:
qnamespace.h:800
Qt::Key_F9
Definition:
qnamespace.h:660
Qt::Key_F5
Definition:
qnamespace.h:656
Qt::Key_Super_L
Definition:
qnamespace.h:687
Qt::Key_Udiaeresis
Definition:
qnamespace.h:826
Qt::Key_onesuperior
Definition:
qnamespace.h:791
Qt::Key_Ntilde
Definition:
qnamespace.h:815
Qt::Key_Ccedilla
Definition:
qnamespace.h:805
Qt::Key_7
Definition:
qnamespace.h:719
Qt::Key_Yacute
Definition:
qnamespace.h:827
Qt::Key_onequarter
Definition:
qnamespace.h:794
Qt::Key_BraceRight
Definition:
qnamespace.h:763
Qt::Key_Escape
Definition:
qnamespace.h:613
Qt::Key_Ucircumflex
Definition:
qnamespace.h:825
Qt::Key_ParenRight
Definition:
qnamespace.h:705
Qt::Key_LaunchF
Definition:
qnamespace.h:993
Qt::Key_Search
Definition:
qnamespace.h:973
Qt::Key_ParenLeft
Definition:
qnamespace.h:704
Qt::Key_OpenUrl
Definition:
qnamespace.h:975
Qt::Key_Enter
Definition:
qnamespace.h:624
Qt::Key_F24
Definition:
qnamespace.h:675
Qt::Key_Launch5
Definition:
qnamespace.h:983
Qt::Key_section
Definition:
qnamespace.h:773
Qt::Key_Backspace
Definition:
qnamespace.h:619
Qt::Key_ordfeminine
Definition:
qnamespace.h:776
Qt::Key_questiondown
Definition:
qnamespace.h:797
Qt::Key_Dollar
Definition:
qnamespace.h:700
Qt::Key_QuoteDbl
Definition:
qnamespace.h:698
Qt::Key_G
Definition:
qnamespace.h:735
Qt::Key_multiply
Definition:
qnamespace.h:821
Qt::Key_Favorites
Definition:
qnamespace.h:972
Qt::Key_Right
Definition:
qnamespace.h:635
Qt::Key_Exclam
Definition:
qnamespace.h:697
Qt::Key_MediaStop
Definition:
qnamespace.h:962
Qt::Key_Menu
Definition:
qnamespace.h:689
Qt::Key_Adiaeresis
Definition:
qnamespace.h:802
Qt::Key_NumLock
Definition:
qnamespace.h:650
Qt::Key_F22
Definition:
qnamespace.h:673
Qt::Key_F4
Definition:
qnamespace.h:655
Qt::Key_macron
Definition:
qnamespace.h:781
Qt::Key_BassUp
Definition:
qnamespace.h:957
Qt::Key_NumberSign
Definition:
qnamespace.h:699
Qt::Key_F6
Definition:
qnamespace.h:657
Qt::Key_O
Definition:
qnamespace.h:743
Qt::Key_diaeresis
Definition:
qnamespace.h:774
Qt::Key_LaunchB
Definition:
qnamespace.h:989
Qt::Key_F33
Definition:
qnamespace.h:684
QT_BEGIN_NAMESPACE
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition:
qglobal.h:89
Qt::Key_ydiaeresis
Definition:
qnamespace.h:865
Qt::Key_Underscore
Definition:
qnamespace.h:759
Qt::Key_Standby
Definition:
qnamespace.h:974
Qt::Key_brokenbar
Definition:
qnamespace.h:772
Qt::Key_F8
Definition:
qnamespace.h:659
Qt::Key_Down
Definition:
qnamespace.h:636
Qt::Key_Odiaeresis
Definition:
qnamespace.h:820
Qt::Key_Shift
Definition:
qnamespace.h:645
Qt::Key_HomePage
Definition:
qnamespace.h:971
Qt::Key_Minus
Definition:
qnamespace.h:709
Qt::Key_F10
Definition:
qnamespace.h:661
Qt::Key_Hyper_R
Definition:
qnamespace.h:691
Qt::Key_F34
Definition:
qnamespace.h:685
Qt::Key_BracketLeft
Definition:
qnamespace.h:755
Qt::Key_ETH
Definition:
qnamespace.h:814
Qt::Key_BassBoost
Definition:
qnamespace.h:956
Qt::Key_Ooblique
Definition:
qnamespace.h:822
Qt::Key_AsciiCircum
Definition:
qnamespace.h:758
Qt::Key_MediaRecord
Definition:
qnamespace.h:968
Qt::Key_AsciiTilde
Definition:
qnamespace.h:764
Qt::Key_C
Definition:
qnamespace.h:731
Qt::Key_copyright
Definition:
qnamespace.h:775
Qt::Key_currency
Definition:
qnamespace.h:770
Qt::Key_F
Definition:
qnamespace.h:734
Qt::Key_Launch8
Definition:
qnamespace.h:986
Qt::Key_Percent
Definition:
qnamespace.h:701
Qt::Key_BassDown
Definition:
qnamespace.h:958
Qt::Key_Aacute
Definition:
qnamespace.h:799
Qt::Key_F15
Definition:
qnamespace.h:666
Qt::Key_F29
Definition:
qnamespace.h:680
Qt::Key_Delete
Definition:
qnamespace.h:626
Qt::Key_Semicolon
Definition:
qnamespace.h:723
Qt::Key_Return
Definition:
qnamespace.h:623
Qt::Key_guillemotleft
Definition:
qnamespace.h:777
Qt::Key_0
Definition:
qnamespace.h:712
Qt::Key_Help
Definition:
qnamespace.h:692
Qt::Key_Eacute
Definition:
qnamespace.h:807
Qt::Key_Launch6
Definition:
qnamespace.h:984
Qt::Key_F14
Definition:
qnamespace.h:665
Qt::Key_V
Definition:
qnamespace.h:750
Qt::Key_LaunchMail
Definition:
qnamespace.h:976
Qt::Key_Q
Definition:
qnamespace.h:745
Qt::Key_notsign
Definition:
qnamespace.h:778
Qt::Key
Key
Definition:
qnamespace.h:612
Qt::Key_F7
Definition:
qnamespace.h:658
Qt::Key_Z
Definition:
qnamespace.h:754
Qt::Key_F28
Definition:
qnamespace.h:679
Qt::Key_plusminus
Definition:
qnamespace.h:783
Qt::Key_Otilde
Definition:
qnamespace.h:819
Qt::Key_TrebleDown
Definition:
qnamespace.h:960
Qt::Key_ScrollLock
Definition:
qnamespace.h:651
Qt::Key_Plus
Definition:
qnamespace.h:707
Qt::Key_threequarters
Definition:
qnamespace.h:796
Qt::Key_LaunchE
Definition:
qnamespace.h:992
Qt::Key_Iacute
Definition:
qnamespace.h:811
Qt::Key_T
Definition:
qnamespace.h:748
Qt::Key_Tab
Definition:
qnamespace.h:614
Qt::Key_Apostrophe
Definition:
qnamespace.h:703
Qt::Key_F21
Definition:
qnamespace.h:672
Qt::Key_CapsLock
Definition:
qnamespace.h:649
Qt::Key_paragraph
Definition:
qnamespace.h:788
Qt::Key_F12
Definition:
qnamespace.h:663
Qt::Key_TrebleUp
Definition:
qnamespace.h:959
Qt::Key_Launch2
Definition:
qnamespace.h:980
Qt::Key_S
Definition:
qnamespace.h:747
Qt::Key_1
Definition:
qnamespace.h:713
Qt::Key_Pause
Definition:
qnamespace.h:627
Qt::Key_9
Definition:
qnamespace.h:721
Qt::Key_Home
Definition:
qnamespace.h:631
Qt::Key_LaunchC
Definition:
qnamespace.h:990
Qt::Key_Icircumflex
Definition:
qnamespace.h:812
Qt::Key_W
Definition:
qnamespace.h:751
Qt::Key_SysReq
Definition:
qnamespace.h:629
Qt::Key_QuoteLeft
Definition:
qnamespace.h:760
Qt::Key_nobreakspace
Definition:
qnamespace.h:766
Qt::Key_PageDown
Definition:
qnamespace.h:641
Qt::Key_Ugrave
Definition:
qnamespace.h:823
Qt::Key_4
Definition:
qnamespace.h:716
Qt::Key_Period
Definition:
qnamespace.h:710
Qt::Key_Up
Definition:
qnamespace.h:634
QTEST_ASSERT
#define QTEST_ASSERT(cond)
Definition:
qtestassert.h:53
Qt::Key_F31
Definition:
qnamespace.h:682
Qt::Key_guillemotright
Definition:
qnamespace.h:793
key
int key
Definition:
qkeysequence.cpp:395
Qt::Key_F3
Definition:
qnamespace.h:654
Qt::Key_E
Definition:
qnamespace.h:733
Qt::Key_exclamdown
Definition:
qnamespace.h:767
Qt::Key_F25
Definition:
qnamespace.h:676
Qt::Key_LaunchMedia
Definition:
qnamespace.h:977
Qt::Key_Ocircumflex
Definition:
qnamespace.h:818
Qt::Key_R
Definition:
qnamespace.h:746
Qt::Key_Alt
Definition:
qnamespace.h:648
Qt::Key_Launch0
Definition:
qnamespace.h:978
QTest::keyToAscii
Q_TESTLIB_EXPORT char keyToAscii(Qt::Key key)
Convert a Qt Key to an ascii char value.
Definition:
qasciikey.cpp:245
Qt::Key_L
Definition:
qnamespace.h:740
Qt::Key_Direction_L
Definition:
qnamespace.h:693
Qt::Key_K
Definition:
qnamespace.h:739
Qt::Key_Backtab
Definition:
qnamespace.h:615
Qt::Key_MediaPrevious
Definition:
qnamespace.h:963
Qt::Key_Ediaeresis
Definition:
qnamespace.h:809
Qt::Key_P
Definition:
qnamespace.h:744
Qt::Key_F13
Definition:
qnamespace.h:664
Qt::Key_twosuperior
Definition:
qnamespace.h:784
Qt::Key_F26
Definition:
qnamespace.h:677
Qt::Key_Refresh
Definition:
qnamespace.h:952
Qt::Key_LaunchA
Definition:
qnamespace.h:988
Qt::Key_Clear
Definition:
qnamespace.h:630
Qt::Key_Forward
Definition:
qnamespace.h:950
Qt::Key_acute
Definition:
qnamespace.h:786
Qt::Key_Insert
Definition:
qnamespace.h:625
Qt::Key_F1
Definition:
qnamespace.h:652
Qt::Key_degree
Definition:
qnamespace.h:782
Qt::Key_ssharp
Definition:
qnamespace.h:829
QTest::asciiToKey
Q_TESTLIB_EXPORT Qt::Key asciiToKey(char ascii)
Convert an ascii char key value to a Qt Key value.
Definition:
qasciikey.cpp:57
Qt::Key_Question
Definition:
qnamespace.h:727
Qt::Key_Ograve
Definition:
qnamespace.h:816
Qt::Key_Backslash
Definition:
qnamespace.h:756
Qt::Key_Super_R
Definition:
qnamespace.h:688
Qt::Key_Colon
Definition:
qnamespace.h:722
Qt::Key_B
Definition:
qnamespace.h:730
Qt::Key_Bar
Definition:
qnamespace.h:762
Qt::Key_THORN
Definition:
qnamespace.h:828
Qt::Key_Launch7
Definition:
qnamespace.h:985
Qt::Key_Oacute
Definition:
qnamespace.h:817
Qt::Key_Comma
Definition:
qnamespace.h:708
Qt::Key_BracketRight
Definition:
qnamespace.h:757
Qt::Key_LaunchD
Definition:
qnamespace.h:991
Qt::Key_I
Definition:
qnamespace.h:737
Qt::Key_2
Definition:
qnamespace.h:714
Qt::Key_onehalf
Definition:
qnamespace.h:795
Qt::Key_Print
Definition:
qnamespace.h:628
Qt::Key_Back
Definition:
qnamespace.h:949
Qt::Key_U
Definition:
qnamespace.h:749
Qt::Key_VolumeDown
Definition:
qnamespace.h:953
Qt::Key_threesuperior
Definition:
qnamespace.h:785
Qt::Key_F16
Definition:
qnamespace.h:667
Qt::Key_Space
Definition:
qnamespace.h:695
Qt::Key_X
Definition:
qnamespace.h:752
Qt::Key_sterling
Definition:
qnamespace.h:769
Qt::Key_F35
Definition:
qnamespace.h:686
Qt::Key_division
Definition:
qnamespace.h:855
Qt::Key_8
Definition:
qnamespace.h:720
Qt::Key_H
Definition:
qnamespace.h:736
Qt::Key_cedilla
Definition:
qnamespace.h:790
Qt::Key_F2
Definition:
qnamespace.h:653
Qt::Key_Greater
Definition:
qnamespace.h:726
Qt::Key_Launch3
Definition:
qnamespace.h:981
Qt::Key_Igrave
Definition:
qnamespace.h:810
Qt::Key_F11
Definition:
qnamespace.h:662
Qt::Key_Launch9
Definition:
qnamespace.h:987
Qt::Key_VolumeMute
Definition:
qnamespace.h:954
Qt::Key_Left
Definition:
qnamespace.h:633
Qt::Key_Stop
Definition:
qnamespace.h:951
Qt 4.8 Source Code Browser