1
.TH "QwtEventPattern" 3 "22 Mar 2009" "Version 5.1.2" "Qwt User's Guide" \" -*- nroff -*-
9
Inherited by \fBQwtPicker\fP.
11
.SH "Detailed Description"
13
A collection of event patterns.
15
\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.
19
\fBQwtPicker\fP, \fBQwtPickerMachine\fP, \fBQwtPlotZoomer\fP
24
Definition at line 28 of file qwt_event_pattern.h.
29
.RI "enum \fBMousePatternCode\fP { \fBMouseSelect1\fP, \fBMouseSelect2\fP, \fBMouseSelect3\fP, \fBMouseSelect4\fP, \fBMouseSelect5\fP, \fBMouseSelect6\fP, \fBMousePatternCount\fP }"
32
.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 }"
35
.SS "Public Member Functions"
39
.RI "\fBQwtEventPattern\fP ()"
42
.RI "virtual \fB~QwtEventPattern\fP ()"
45
.RI "void \fBinitMousePattern\fP (int numButtons)"
48
.RI "void \fBinitKeyPattern\fP ()"
51
.RI "void \fBsetMousePattern\fP (uint pattern, int button, int state=Qt::NoButton)"
54
.RI "void \fBsetKeyPattern\fP (uint pattern, int key, int state=Qt::NoButton)"
57
.RI "void \fBsetMousePattern\fP (const QwtArray< \fBMousePattern\fP > &)"
60
.RI "void \fBsetKeyPattern\fP (const QwtArray< \fBKeyPattern\fP > &)"
63
.RI "const QwtArray< \fBMousePattern\fP > & \fBmousePattern\fP () const"
66
.RI "const QwtArray< \fBKeyPattern\fP > & \fBkeyPattern\fP () const"
69
.RI "QwtArray< \fBMousePattern\fP > & \fBmousePattern\fP ()"
72
.RI "QwtArray< \fBKeyPattern\fP > & \fBkeyPattern\fP ()"
75
.RI "bool \fBmouseMatch\fP (uint pattern, const QMouseEvent *) const"
78
.RI "bool \fBkeyMatch\fP (uint pattern, const QKeyEvent *) const"
81
.SS "Protected Member Functions"
85
.RI "virtual bool \fBmouseMatch\fP (const \fBMousePattern\fP &, const QMouseEvent *) const"
88
.RI "virtual bool \fBkeyMatch\fP (const \fBKeyPattern\fP &, const QKeyEvent *) const"
95
.RI "class \fBKeyPattern\fP"
97
.RI "\fIA pattern for key events. \fP"
99
.RI "class \fBMousePattern\fP"
101
.RI "\fIA pattern for mouse events. \fP"
103
.SH "Member Enumeration Documentation"
105
.SS "enum \fBQwtEventPattern::MousePatternCode\fP"
107
Symbolic mouse input codes.
109
The default initialization for 3 button mice is:
125
Qt::LeftButton + Qt::ShiftButton
129
Qt::RightButton + Qt::ShiftButton
133
Qt::MidButton + Qt::ShiftButton
136
The default initialization for 2 button mice is:
148
Qt::LeftButton + Qt::AltButton
152
Qt::LeftButton + Qt::ShiftButton
156
Qt::RightButton + Qt::ShiftButton
160
Qt::LeftButton + Qt::AltButton + Qt::ShiftButton
163
The default initialization for 1 button mice is:
171
Qt::LeftButton + Qt::ControlButton
175
Qt::LeftButton + Qt::AltButton
179
Qt::LeftButton + Qt::ShiftButton
183
Qt::LeftButton + Qt::ControlButton + Qt::ShiftButton
187
Qt::LeftButton + Qt::AltButton + Qt::ShiftButton
192
\fBinitMousePattern()\fP
197
Definition at line 79 of file qwt_event_pattern.h.
198
.SS "enum \fBQwtEventPattern::KeyPatternCode\fP"
200
Symbolic keyboard input codes.
202
Default initialization:
250
Definition at line 118 of file qwt_event_pattern.h.
251
.SH "Constructor & Destructor Documentation"
253
.SS "QwtEventPattern::QwtEventPattern ()"
259
\fBMousePatternCode\fP, \fBKeyPatternCode\fP
264
Definition at line 19 of file qwt_event_pattern.cpp.
266
References initKeyPattern(), and initMousePattern().
267
.SS "QwtEventPattern::~QwtEventPattern ()\fC [virtual]\fP"
271
Definition at line 28 of file qwt_event_pattern.cpp.
272
.SH "Member Function Documentation"
274
.SS "void QwtEventPattern::initMousePattern (int numButtons)"
276
Set default mouse patterns, depending on the number of mouse buttons
280
\fInumButtons\fP Number of mouse buttons ( <= 3 )
285
\fBMousePatternCode\fP
290
Definition at line 38 of file qwt_event_pattern.cpp.
292
References setMousePattern().
294
Referenced by QwtEventPattern().
295
.SS "void QwtEventPattern::initKeyPattern ()"
297
Set default mouse patterns.
306
Definition at line 88 of file qwt_event_pattern.cpp.
308
References setKeyPattern().
310
Referenced by QwtEventPattern().
311
.SS "void QwtEventPattern::setMousePattern (uint pattern, int button, int state = \fCQt::NoButton\fP)"
313
Change one mouse pattern
317
\fIpattern\fP Index of the pattern
331
Definition at line 115 of file qwt_event_pattern.cpp.
333
Referenced by initMousePattern().
334
.SS "void QwtEventPattern::setKeyPattern (uint pattern, int key, int state = \fCQt::NoButton\fP)"
336
Change one key pattern
340
\fIpattern\fP Index of the pattern
354
Definition at line 133 of file qwt_event_pattern.cpp.
356
Referenced by initKeyPattern().
357
.SS "void QwtEventPattern::setMousePattern (const QwtArray< \fBMousePattern\fP > &)"
359
Change the mouse event patterns.
361
Definition at line 143 of file qwt_event_pattern.cpp.
362
.SS "void QwtEventPattern::setKeyPattern (const QwtArray< \fBKeyPattern\fP > &)"
364
Change the key event patterns.
366
Definition at line 149 of file qwt_event_pattern.cpp.
367
.SS "const QwtArray< \fBQwtEventPattern::MousePattern\fP > & QwtEventPattern::mousePattern () const"
369
Return mouse patterns.
371
Definition at line 156 of file qwt_event_pattern.cpp.
372
.SS "const QwtArray< \fBQwtEventPattern::KeyPattern\fP > & QwtEventPattern::keyPattern () const"
376
Definition at line 163 of file qwt_event_pattern.cpp.
377
.SS "QwtArray< \fBQwtEventPattern::MousePattern\fP > & QwtEventPattern::mousePattern ()"
379
Return ,ouse patterns.
381
Definition at line 169 of file qwt_event_pattern.cpp.
382
.SS "QwtArray< \fBQwtEventPattern::KeyPattern\fP > & QwtEventPattern::keyPattern ()"
386
Definition at line 175 of file qwt_event_pattern.cpp.
387
.SS "bool QwtEventPattern::mouseMatch (uint pattern, const QMouseEvent * e) const"
389
Compare a mouse event with an event pattern.
391
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.
395
\fIpattern\fP Index of the event pattern
412
Definition at line 193 of file qwt_event_pattern.cpp.
414
Referenced by QwtPickerPolygonMachine::transition(), QwtPickerDragRectMachine::transition(), QwtPickerClickRectMachine::transition(), QwtPickerDragPointMachine::transition(), QwtPickerClickPointMachine::transition(), and QwtPlotZoomer::widgetMouseReleaseEvent().
415
.SS "bool QwtEventPattern::keyMatch (uint pattern, const QKeyEvent * e) const"
417
Compare a key event with an event pattern.
419
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.
423
\fIpattern\fP Index of the event pattern
440
Definition at line 248 of file qwt_event_pattern.cpp.
442
Referenced by QwtPickerPolygonMachine::transition(), QwtPickerDragRectMachine::transition(), QwtPickerClickRectMachine::transition(), QwtPickerDragPointMachine::transition(), QwtPickerClickPointMachine::transition(), QwtPlotZoomer::widgetKeyPressEvent(), and QwtPicker::widgetKeyPressEvent().
443
.SS "bool QwtEventPattern::mouseMatch (const \fBMousePattern\fP & pattern, const QMouseEvent * e) const\fC [protected, virtual]\fP"
445
Compare a mouse event with an event pattern.
447
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.
451
\fIpattern\fP Mouse event pattern
468
Definition at line 217 of file qwt_event_pattern.cpp.
470
References QwtEventPattern::MousePattern::button, and QwtEventPattern::MousePattern::state.
471
.SS "bool QwtEventPattern::keyMatch (const \fBKeyPattern\fP & pattern, const QKeyEvent * e) const\fC [protected, virtual]\fP"
473
Compare a key event with an event pattern.
475
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.
479
\fIpattern\fP Key event pattern
496
Definition at line 272 of file qwt_event_pattern.cpp.
498
References QwtEventPattern::KeyPattern::key, and QwtEventPattern::KeyPattern::state.
502
Generated automatically by Doxygen for Qwt User's Guide from the source code.