QwtEventPattern 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.
Definition at line 27 of file qwt_event_pattern.h.
Public Types | |
enum | MousePatternCode { MouseSelect1, MouseSelect2, MouseSelect3, MouseSelect4, MouseSelect5, MouseSelect6, MousePatternCount } |
enum | KeyPatternCode { KeySelect1, KeySelect2, KeyAbort, KeyLeft, KeyRight, KeyUp, KeyDown, KeyRedo, KeyUndo, KeyHome, KeyPatternCount } |
Public Member Functions | |
QwtEventPattern () | |
virtual | ~QwtEventPattern () |
void | initMousePattern (int numButtons) |
void | initKeyPattern () |
void | setMousePattern (uint pattern, int button, int state=Qt::NoButton) |
void | setKeyPattern (uint pattern, int key, int state=Qt::NoButton) |
void | setMousePattern (const QwtArray< MousePattern > &) |
void | setKeyPattern (const QwtArray< KeyPattern > &) |
const QwtArray< MousePattern > & | mousePattern () const |
const QwtArray< KeyPattern > & | keyPattern () const |
QwtArray< MousePattern > & | mousePattern () |
QwtArray< KeyPattern > & | keyPattern () |
bool | mouseMatch (uint pattern, const QMouseEvent *) const |
bool | keyMatch (uint pattern, const QKeyEvent *) const |
Protected Member Functions | |
virtual bool | mouseMatch (const MousePattern &, const QMouseEvent *) const |
virtual bool | keyMatch (const KeyPattern &, const QKeyEvent *) const |
|
Symbolic keyboard input codes. Default initialization:
Definition at line 117 of file qwt_event_pattern.h. |
|
Symbolic mouse input codes. The default initialization for 3 button mice is:
The default initialization for 2 button mice is:
The default initialization for 1 button mice is:
Definition at line 78 of file qwt_event_pattern.h. |
|
Constructor
Definition at line 19 of file qwt_event_pattern.cpp. References initKeyPattern(), and initMousePattern(). |
|
Destructor.
Definition at line 28 of file qwt_event_pattern.cpp. |
|
Set default mouse patterns.
Definition at line 78 of file qwt_event_pattern.cpp. References setKeyPattern(). Referenced by QwtEventPattern(). |
|
Set default mouse patterns, depending on the number of mouse buttons
Definition at line 38 of file qwt_event_pattern.cpp. References setMousePattern(). Referenced by QwtEventPattern(). |
|
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.
Definition at line 251 of file qwt_event_pattern.cpp. |
|
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.
Definition at line 227 of file qwt_event_pattern.cpp. Referenced by QwtPickerPolygonMachine::transition(), QwtPickerDragRectMachine::transition(), QwtPickerClickRectMachine::transition(), QwtPickerDragPointMachine::transition(), QwtPickerClickPointMachine::transition(), QwtPlotZoomer::widgetKeyPressEvent(), and QwtPicker::widgetKeyPressEvent(). |
|
Return Key patterns.
Definition at line 165 of file qwt_event_pattern.cpp. |
|
Return key patterns.
Definition at line 153 of file qwt_event_pattern.cpp. |
|
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.
Definition at line 207 of file qwt_event_pattern.cpp. |
|
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.
Definition at line 183 of file qwt_event_pattern.cpp. Referenced by QwtPickerPolygonMachine::transition(), QwtPickerDragRectMachine::transition(), QwtPickerClickRectMachine::transition(), QwtPickerDragPointMachine::transition(), QwtPickerClickPointMachine::transition(), and QwtPlotZoomer::widgetMouseReleaseEvent(). |
|
Return ,ouse patterns.
Definition at line 159 of file qwt_event_pattern.cpp. |
|
Return mouse patterns.
Definition at line 146 of file qwt_event_pattern.cpp. |
|
Change the key event patterns.
Definition at line 139 of file qwt_event_pattern.cpp. |
|
Change one key pattern
Definition at line 123 of file qwt_event_pattern.cpp. Referenced by initKeyPattern(). |
|
Change the mouse event patterns.
Definition at line 133 of file qwt_event_pattern.cpp. |
|
Change one mouse pattern
Definition at line 105 of file qwt_event_pattern.cpp. Referenced by initMousePattern(). |