File: QwtEventPattern.3

package info (click to toggle)
qwt 6.1.2-6
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 23,848 kB
  • ctags: 15,811
  • sloc: cpp: 57,382; makefile: 41
file content (458 lines) | stat: -rw-r--r-- 9,865 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
.TH "QwtEventPattern" 3 "Thu Dec 11 2014" "Version 6.1.2" "Qwt User's Guide" \" -*- nroff -*-
.ad l
.nh
.SH NAME
QwtEventPattern \- 
.PP
A collection of event patterns\&.  

.SH SYNOPSIS
.br
.PP
.PP
\fC#include <qwt_event_pattern\&.h>\fP
.PP
Inherited by \fBQwtPicker\fP\&.
.SS "Classes"

.in +1c
.ti -1c
.RI "class \fBKeyPattern\fP"
.br
.RI "\fIA pattern for key events\&. \fP"
.ti -1c
.RI "class \fBMousePattern\fP"
.br
.RI "\fIA pattern for mouse events\&. \fP"
.in -1c
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBMousePatternCode\fP { \fBMouseSelect1\fP, \fBMouseSelect2\fP, \fBMouseSelect3\fP, \fBMouseSelect4\fP, \fBMouseSelect5\fP, \fBMouseSelect6\fP, \fBMousePatternCount\fP }"
.br
.RI "\fISymbolic mouse input codes\&. \fP"
.ti -1c
.RI "enum \fBKeyPatternCode\fP { \fBKeySelect1\fP, \fBKeySelect2\fP, \fBKeyAbort\fP, \fBKeyLeft\fP, \fBKeyRight\fP, \fBKeyUp\fP, \fBKeyDown\fP, \fBKeyRedo\fP, \fBKeyUndo\fP, \fBKeyHome\fP, \fBKeyPatternCount\fP }"
.br
.RI "\fISymbolic keyboard input codes\&. \fP"
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBQwtEventPattern\fP ()"
.br
.ti -1c
.RI "virtual \fB~QwtEventPattern\fP ()"
.br
.RI "\fIDestructor\&. \fP"
.ti -1c
.RI "void \fBinitMousePattern\fP (int numButtons)"
.br
.ti -1c
.RI "void \fBinitKeyPattern\fP ()"
.br
.ti -1c
.RI "void \fBsetMousePattern\fP (\fBMousePatternCode\fP, Qt::MouseButton button, Qt::KeyboardModifiers=Qt::NoModifier)"
.br
.ti -1c
.RI "void \fBsetKeyPattern\fP (\fBKeyPatternCode\fP, int keyCode, Qt::KeyboardModifiers modifierCodes=Qt::NoModifier)"
.br
.ti -1c
.RI "void \fBsetMousePattern\fP (const QVector< \fBMousePattern\fP > &)"
.br
.RI "\fIChange the mouse event patterns\&. \fP"
.ti -1c
.RI "void \fBsetKeyPattern\fP (const QVector< \fBKeyPattern\fP > &)"
.br
.RI "\fIChange the key event patterns\&. \fP"
.ti -1c
.RI "const QVector< \fBMousePattern\fP > & \fBmousePattern\fP () const "
.br
.ti -1c
.RI "const QVector< \fBKeyPattern\fP > & \fBkeyPattern\fP () const "
.br
.ti -1c
.RI "QVector< \fBMousePattern\fP > & \fBmousePattern\fP ()"
.br
.ti -1c
.RI "QVector< \fBKeyPattern\fP > & \fBkeyPattern\fP ()"
.br
.ti -1c
.RI "bool \fBmouseMatch\fP (\fBMousePatternCode\fP, const QMouseEvent *) const "
.br
.RI "\fICompare a mouse event with an event pattern\&. \fP"
.ti -1c
.RI "bool \fBkeyMatch\fP (\fBKeyPatternCode\fP, const QKeyEvent *) const "
.br
.RI "\fICompare a key event with an event pattern\&. \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual bool \fBmouseMatch\fP (const \fBMousePattern\fP &, const QMouseEvent *) const "
.br
.RI "\fICompare a mouse event with an event pattern\&. \fP"
.ti -1c
.RI "virtual bool \fBkeyMatch\fP (const \fBKeyPattern\fP &, const QKeyEvent *) const "
.br
.RI "\fICompare a key event with an event pattern\&. \fP"
.in -1c
.SH "Detailed Description"
.PP 
A collection of event patterns\&. 

\fBQwtEventPattern\fP introduces an level of indirection for mouse and keyboard inputs\&. Those are represented by symbolic names, so the application code can be configured by individual mappings\&.
.PP
\fBSee Also:\fP
.RS 4
\fBQwtPicker\fP, \fBQwtPickerMachine\fP, \fBQwtPlotZoomer\fP 
.RE
.PP

.SH "Member Enumeration Documentation"
.PP 
.SS "enum \fBQwtEventPattern::KeyPatternCode\fP"

.PP
Symbolic keyboard input codes\&. Individual settings can be configured using \fBsetKeyPattern()\fP
.PP
\fBSee Also:\fP
.RS 4
\fBsetKeyPattern()\fP, \fBsetMousePattern()\fP 
.RE
.PP

.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fIKeySelect1 \fP\fP
Qt::Key_Return\&. 
.TP
\fB\fIKeySelect2 \fP\fP
Qt::Key_Space\&. 
.TP
\fB\fIKeyAbort \fP\fP
Qt::Key_Escape\&. 
.TP
\fB\fIKeyLeft \fP\fP
Qt::Key_Left\&. 
.TP
\fB\fIKeyRight \fP\fP
Qt::Key_Right\&. 
.TP
\fB\fIKeyUp \fP\fP
Qt::Key_Up\&. 
.TP
\fB\fIKeyDown \fP\fP
Qt::Key_Down\&. 
.TP
\fB\fIKeyRedo \fP\fP
Qt::Key_Plus\&. 
.TP
\fB\fIKeyUndo \fP\fP
Qt::Key_Minus\&. 
.TP
\fB\fIKeyHome \fP\fP
Qt::Key_Escape\&. 
.TP
\fB\fIKeyPatternCount \fP\fP
Number of key patterns\&. 
.SS "enum \fBQwtEventPattern::MousePatternCode\fP"

.PP
Symbolic mouse input codes\&. \fBQwtEventPattern\fP implements 3 different settings for mice with 1, 2, or 3 buttons that can be activated using \fBinitMousePattern()\fP\&. The default setting is for 3 button mice\&.
.PP
Individual settings can be configured using \fBsetMousePattern()\fP\&.
.PP
\fBSee Also:\fP
.RS 4
\fBinitMousePattern()\fP, \fBsetMousePattern()\fP, \fBsetKeyPattern()\fP 
.RE
.PP

.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fIMouseSelect1 \fP\fP
The default setting for 1, 2 and 3 button mice is:
.PP
.IP "\(bu" 2
Qt::LeftButton
.IP "\(bu" 2
Qt::LeftButton
.IP "\(bu" 2
Qt::LeftButton 
.PP

.TP
\fB\fIMouseSelect2 \fP\fP
The default setting for 1, 2 and 3 button mice is:
.PP
.IP "\(bu" 2
Qt::LeftButton + Qt::ControlModifier
.IP "\(bu" 2
Qt::RightButton
.IP "\(bu" 2
Qt::RightButton 
.PP

.TP
\fB\fIMouseSelect3 \fP\fP
The default setting for 1, 2 and 3 button mice is:
.PP
.IP "\(bu" 2
Qt::LeftButton + Qt::AltModifier
.IP "\(bu" 2
Qt::LeftButton + Qt::AltModifier
.IP "\(bu" 2
Qt::MidButton 
.PP

.TP
\fB\fIMouseSelect4 \fP\fP
The default setting for 1, 2 and 3 button mice is:
.PP
.IP "\(bu" 2
Qt::LeftButton + Qt::ShiftModifier
.IP "\(bu" 2
Qt::LeftButton + Qt::ShiftModifier
.IP "\(bu" 2
Qt::LeftButton + Qt::ShiftModifier 
.PP

.TP
\fB\fIMouseSelect5 \fP\fP
The default setting for 1, 2 and 3 button mice is:
.PP
.IP "\(bu" 2
Qt::LeftButton + Qt::ControlButton | Qt::ShiftModifier
.IP "\(bu" 2
Qt::RightButton + Qt::ShiftModifier
.IP "\(bu" 2
Qt::RightButton + Qt::ShiftModifier 
.PP

.TP
\fB\fIMouseSelect6 \fP\fP
The default setting for 1, 2 and 3 button mice is:
.PP
.IP "\(bu" 2
Qt::LeftButton + Qt::AltModifier + Qt::ShiftModifier
.IP "\(bu" 2
Qt::LeftButton + Qt::AltModifier | Qt::ShiftModifier
.IP "\(bu" 2
Qt::MidButton + Qt::ShiftModifier 
.PP

.TP
\fB\fIMousePatternCount \fP\fP
Number of mouse patterns\&. 
.SH "Constructor & Destructor Documentation"
.PP 
.SS "QwtEventPattern::QwtEventPattern ()"
Constructor
.PP
\fBSee Also:\fP
.RS 4
\fBMousePatternCode\fP, \fBKeyPatternCode\fP 
.RE
.PP

.SH "Member Function Documentation"
.PP 
.SS "void QwtEventPattern::initKeyPattern ()"
Set default mouse patterns\&.
.PP
\fBSee Also:\fP
.RS 4
\fBKeyPatternCode\fP 
.RE
.PP

.SS "void QwtEventPattern::initMousePattern (intnumButtons)"
Set default mouse patterns, depending on the number of mouse buttons
.PP
\fBParameters:\fP
.RS 4
\fInumButtons\fP Number of mouse buttons ( <= 3 ) 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBMousePatternCode\fP 
.RE
.PP

.SS "bool QwtEventPattern::keyMatch (\fBKeyPatternCode\fPcode, const QKeyEvent *event) const"

.PP
Compare a key event with an event pattern\&. A key event matches the pattern when both have the same key value and in the state value the same key flags (Qt::KeyButtonMask) are set\&.
.PP
\fBParameters:\fP
.RS 4
\fIcode\fP Index of the event pattern 
.br
\fIevent\fP Key event 
.RE
.PP
\fBReturns:\fP
.RS 4
true if matches
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBmouseMatch()\fP 
.RE
.PP

.SS "bool QwtEventPattern::keyMatch (const \fBKeyPattern\fP &pattern, const QKeyEvent *event) const\fC [protected]\fP, \fC [virtual]\fP"

.PP
Compare a key event with an event pattern\&. A key event matches the pattern when both have the same key value and in the state value the same key flags (Qt::KeyButtonMask) are set\&.
.PP
\fBParameters:\fP
.RS 4
\fIpattern\fP Key event pattern 
.br
\fIevent\fP Key event 
.RE
.PP
\fBReturns:\fP
.RS 4
true if matches
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBmouseMatch()\fP 
.RE
.PP

.SS "const QVector< \fBQwtEventPattern::KeyPattern\fP > & QwtEventPattern::keyPattern () const"

.PP
\fBReturns:\fP
.RS 4
Key pattern 
.RE
.PP

.SS "QVector< \fBQwtEventPattern::KeyPattern\fP > & QwtEventPattern::keyPattern ()"

.PP
\fBReturns:\fP
.RS 4
Key pattern 
.RE
.PP

.SS "bool QwtEventPattern::mouseMatch (\fBMousePatternCode\fPcode, const QMouseEvent *event) const"

.PP
Compare a mouse event with an event pattern\&. A mouse event matches the pattern when both have the same button value and in the state value the same key flags(Qt::KeyButtonMask) are set\&.
.PP
\fBParameters:\fP
.RS 4
\fIcode\fP Index of the event pattern 
.br
\fIevent\fP Mouse event 
.RE
.PP
\fBReturns:\fP
.RS 4
true if matches
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBkeyMatch()\fP 
.RE
.PP

.SS "bool QwtEventPattern::mouseMatch (const \fBMousePattern\fP &pattern, const QMouseEvent *event) const\fC [protected]\fP, \fC [virtual]\fP"

.PP
Compare a mouse event with an event pattern\&. A mouse event matches the pattern when both have the same button value and in the state value the same key flags(Qt::KeyButtonMask) are set\&.
.PP
\fBParameters:\fP
.RS 4
\fIpattern\fP Mouse event pattern 
.br
\fIevent\fP Mouse event 
.RE
.PP
\fBReturns:\fP
.RS 4
true if matches
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBkeyMatch()\fP 
.RE
.PP

.SS "const QVector< \fBQwtEventPattern::MousePattern\fP > & QwtEventPattern::mousePattern () const"

.PP
\fBReturns:\fP
.RS 4
Mouse pattern 
.RE
.PP

.SS "QVector< \fBQwtEventPattern::MousePattern\fP > & QwtEventPattern::mousePattern ()"

.PP
\fBReturns:\fP
.RS 4
Mouse pattern 
.RE
.PP

.SS "void QwtEventPattern::setKeyPattern (\fBKeyPatternCode\fPpattern, intkey, Qt::KeyboardModifiersmodifiers = \fCQt::NoModifier\fP)"
Change one key pattern
.PP
\fBParameters:\fP
.RS 4
\fIpattern\fP Index of the pattern 
.br
\fIkey\fP Key 
.br
\fImodifiers\fP Keyboard modifiers
.RE
.PP
\fBSee Also:\fP
.RS 4
QKeyEvent 
.RE
.PP

.SS "void QwtEventPattern::setMousePattern (\fBMousePatternCode\fPpattern, Qt::MouseButtonbutton, Qt::KeyboardModifiersmodifiers = \fCQt::NoModifier\fP)"
Change one mouse pattern
.PP
\fBParameters:\fP
.RS 4
\fIpattern\fP Index of the pattern 
.br
\fIbutton\fP Button 
.br
\fImodifiers\fP Keyboard modifiers
.RE
.PP
\fBSee Also:\fP
.RS 4
QMouseEvent 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for Qwt User's Guide from the source code\&.