QwtEventPattern(3)
π QwtEventPattern(3) β Library Functions Manual π
πΈ NAME πΈ
QwtEventPattern β A collection of event patterns. π
β¨ SYNOPSIS β¨
#include <qwt_event_pattern.h>
Inherited by QwtPicker.
π Classes
class MousePatternβ A pattern for mouse events.class KeyPatternβ A pattern for key events.
π Public Types
enum MousePatternCode { MouseSelect1, MouseSelect2, MouseSelect3,
MouseSelect4, MouseSelect5, MouseSelect6, MousePatternCount }
Symbolic mouse input codes.
enum KeyPatternCode { KeySelect1, KeySelect2, KeyAbort, KeyLeft,
KeyRight, KeyUp, KeyDown, KeyRedo, KeyUndo, KeyHome, KeyPatternCount
}
Symbolic keyboard input codes.
π Public Member Functions
QwtEventPattern ()virtual ~QwtEventPattern ()β Destructor.void initMousePattern (int numButtons)void initKeyPattern ()void setMousePattern (MousePatternCode, Qt::MouseButton button, Qt::KeyboardModifiers=Qt::NoModifier)void setKeyPattern (KeyPatternCode, int key, Qt::KeyboardModifiers modifiers=Qt::NoModifier)void setMousePattern (const QVector< MousePattern > &)β Change the mouse event patterns.void setKeyPattern (const QVector< KeyPattern > &)β Change the key event patterns.const QVector< MousePattern > & mousePattern () constconst QVector< KeyPattern > & keyPattern () constQVector< MousePattern > & mousePattern ()QVector< KeyPattern > & keyPattern ()bool mouseMatch (MousePatternCode, const QMouseEvent *) constβ Compare a mouse event with an event pattern.bool keyMatch (KeyPatternCode, const QKeyEvent *) constβ Compare a key event with an event pattern.
π‘οΈ Protected Member Functions
virtual bool mouseMatch (const MousePattern &, const QMouseEvent *) constβ Compare a mouse event with an event pattern.virtual bool keyMatch (const KeyPattern &, const QKeyEvent *) constβ Compare a key event with an event pattern.
π«Ά Detailed Description π«Ά
A collection of event patterns. Periodt.
QwtEventPattern introduces a level of indirection for mouse and keyboard inputs. Those are represented by symbolic names, so the application code can be configured by individual mappings. Itβs giving main character energy for input handling, ngl.
See also: QwtPicker, QwtPickerMachine, QwtPlotZoomer
Definition at line 30 of file qwt_event_pattern.h.
π§ Member Enumeration Documentation π§
enum QwtEventPattern::KeyPatternCode
Symbolic keyboard input codes. Individual settings can be configured using setKeyPattern(). π
See also: setKeyPattern(), setMousePattern()
Enumerator:
KeySelect1βQt::Key_Return.KeySelect2βQt::Key_Space.KeyAbortβQt::Key_Escape.KeyLeftβQt::Key_Left.KeyRightβQt::Key_Right.KeyUpβQt::Key_Up.KeyDownβQt::Key_Down.KeyRedoβQt::Key_Plus.KeyUndoβQt::Key_Minus.KeyHomeβQt::Key_Escape.KeyPatternCountβ Number of key patterns.
Definition at line 112 of file qwt_event_pattern.h.
enum QwtEventPattern::MousePatternCode
Symbolic mouse input codes. QwtEventPattern implements 3 different settings for mice with 1, 2, or 3 buttons that can be activated using initMousePattern(). The default setting is for 3 button mice. π
Individual settings can be configured using setMousePattern().
See also: initMousePattern(), setMousePattern(), setKeyPattern()
Enumerator:
MouseSelect1β The default setting for 1, 2 and 3 button mice is:Qt::LeftButtonQt::LeftButtonQt::LeftButton
MouseSelect2β The default setting for 1, 2 and 3 button mice is:Qt::LeftButton + Qt::ControlModifierQt::RightButtonQt::RightButton
MouseSelect3β The default setting for 1, 2 and 3 button mice is:Qt::LeftButton + Qt::AltModifierQt::LeftButton + Qt::AltModifierQt::MidButton
MouseSelect4β The default setting for 1, 2 and 3 button mice is:Qt::LeftButton + Qt::ShiftModifierQt::LeftButton + Qt::ShiftModifierQt::LeftButton + Qt::ShiftModifier
MouseSelect5β The default setting for 1, 2 and 3 button mice is:Qt::LeftButton + Qt::ControlButton | Qt::ShiftModifierQt::RightButton + Qt::ShiftModifierQt::RightButton + Qt::ShiftModifier
MouseSelect6β The default setting for 1, 2 and 3 button mice is:Qt::LeftButton + Qt::AltModifier + Qt::ShiftModifierQt::LeftButton + Qt::AltModifier | Qt::ShiftModifierQt::MidButton + Qt::ShiftModifier
MousePatternCountβ Number of mouse patterns.
Definition at line 45 of file qwt_event_pattern.h.
π Constructor & Destructor Documentation π
QwtEventPattern::QwtEventPattern ()
Constructor. β¨
See also: MousePatternCode, KeyPatternCode
Definition at line 19 of file qwt_event_pattern.cpp.
QwtEventPattern::~QwtEventPattern () [virtual]
Destructor. π«Ά
Definition at line 28 of file qwt_event_pattern.cpp.
π₯ Member Function Documentation π₯
void QwtEventPattern::initKeyPattern ()
Set default mouse patterns. (Yes, bestie, thatβs what this page says for this one β Iβm keeping the facts exactly as printed.) π
See also: KeyPatternCode
Definition at line 81 of file qwt_event_pattern.cpp.
void QwtEventPattern::initMousePattern (int numButtons)
Set default mouse patterns, depending on the number of mouse buttons. π
Parameters:
numButtonsβ Number of mouse buttons ( <= 3 )
See also: MousePatternCode
Definition at line 38 of file qwt_event_pattern.cpp.
bool QwtEventPattern::keyMatch (const KeyPattern & pattern, const QKeyEvent * event) const [protected], [virtual]
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. π
Parameters:
patternβ Key event patterneventβ Key event
Returns: true if matches
See also: mouseMatch()
Definition at line 257 of file qwt_event_pattern.cpp.
bool QwtEventPattern::keyMatch (KeyPatternCode code, const QKeyEvent * event) const
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. π
Parameters:
codeβ Index of the event patterneventβ Key event
Returns: true if matches
See also: mouseMatch()
Definition at line 234 of file qwt_event_pattern.cpp.
QVector< QwtEventPattern::KeyPattern > & QwtEventPattern::keyPattern ()
Returns: Key pattern
Definition at line 170 of file qwt_event_pattern.cpp.
const QVector< QwtEventPattern::KeyPattern > & QwtEventPattern::keyPattern () const
Returns: Key pattern
Definition at line 158 of file qwt_event_pattern.cpp.
bool QwtEventPattern::mouseMatch (const MousePattern & pattern, const QMouseEvent * event) const [protected], [virtual]
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. π±οΈ
Parameters:
patternβ Mouse event patterneventβ Mouse event
Returns: true if matches
See also: keyMatch()
Definition at line 211 of file qwt_event_pattern.cpp.
bool QwtEventPattern::mouseMatch (MousePatternCode code, const QMouseEvent * event) const
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. π
Parameters:
codeβ Index of the event patterneventβ Mouse event
Returns: true if matches
See also: keyMatch()
Definition at line 188 of file qwt_event_pattern.cpp.
QVector< QwtEventPattern::MousePattern > & QwtEventPattern::mousePattern ()
Returns: Mouse pattern
Definition at line 164 of file qwt_event_pattern.cpp.
const QVector< QwtEventPattern::MousePattern > & QwtEventPattern::mousePattern () const
Returns: Mouse pattern
Definition at line 151 of file qwt_event_pattern.cpp.
void QwtEventPattern::setKeyPattern (const QVector< KeyPattern > & pattern)
Change the key event patterns. β¨οΈ
Definition at line 144 of file qwt_event_pattern.cpp.
void QwtEventPattern::setKeyPattern (KeyPatternCode pattern, int key, Qt::KeyboardModifiers modifiers = Qt::NoModifier)
Change one key pattern.
Parameters:
patternβ Index of the patternkeyβ Keymodifiersβ Keyboard modifiers
See also: QKeyEvent
Definition at line 127 of file qwt_event_pattern.cpp.
void QwtEventPattern::setMousePattern (const QVector< MousePattern > & pattern)
Change the mouse event patterns. π±οΈ
Definition at line 138 of file qwt_event_pattern.cpp.
void QwtEventPattern::setMousePattern (MousePatternCode pattern, Qt::MouseButton button, Qt::KeyboardModifiers modifiers = Qt::NoModifier)
Change one mouse pattern.
Parameters:
patternβ Index of the patternbuttonβ Buttonmodifiersβ Keyboard modifiers
See also: QMouseEvent
Definition at line 108 of file qwt_event_pattern.cpp.
π§ Author π§
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Footer cutie check: source/version vibes are Qwt Userβs Guide + QwtEventPattern(3), and the date slot is whatever your build stamped down there β this copy didnβt print a date, bestie. Mwah πβ¨
π¦ where this page comes from
- alpine 3.24: qwt-doc 6.3.0-r0 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms