QBasicKeyEventTransition Class

The QBasicKeyEventTransition class provides a transition for Qt key events. More...

Header: #include <QBasicKeyEventTransition>
Inherits: QAbstractTransition

Public Functions

QBasicKeyEventTransition(QState *sourceState = nullptr)
QBasicKeyEventTransition(QEvent::Type type, int key, QState *sourceState = nullptr)
QBasicKeyEventTransition(QEvent::Type type, int key, Qt::KeyboardModifiers modifierMask, QState *sourceState = nullptr)
virtual ~QBasicKeyEventTransition()
QEvent::Type eventType() const
int key() const
Qt::KeyboardModifiers modifierMask() const
void setEventType(QEvent::Type type)
void setKey(int key)
void setModifierMask(Qt::KeyboardModifiers modifierMask)

Reimplemented Protected Functions

virtual bool eventTest(QEvent *event) override
virtual void onTransition(QEvent *) override

Detailed Description

\internal \since 4.6 \ingroup statemachine

Member Function Documentation

QBasicKeyEventTransition::QBasicKeyEventTransition(QState *sourceState = nullptr)

Constructs a new key event transition with the given sourceState.

QBasicKeyEventTransition::QBasicKeyEventTransition(QEvent::Type type, int key, QState *sourceState = nullptr)

Constructs a new event transition for events of the given type for the given key, with the given sourceState.

QBasicKeyEventTransition::QBasicKeyEventTransition(QEvent::Type type, int key, Qt::KeyboardModifiers modifierMask, QState *sourceState = nullptr)

Constructs a new event transition for events of the given type for the given key, with the given modifierMask and sourceState.

[virtual noexcept] QBasicKeyEventTransition::~QBasicKeyEventTransition()

Destroys this event transition.

[override virtual protected] bool QBasicKeyEventTransition::eventTest(QEvent *event)

Reimplements: QAbstractTransition::eventTest(QEvent *event).

QEvent::Type QBasicKeyEventTransition::eventType() const

Returns the event type that this key event transition is associated with.

See also setEventType().

int QBasicKeyEventTransition::key() const

Returns the key that this key event transition checks for.

See also setKey().

Qt::KeyboardModifiers QBasicKeyEventTransition::modifierMask() const

Returns the keyboard modifier mask that this key event transition checks for.

See also setModifierMask().

[override virtual protected] void QBasicKeyEventTransition::onTransition(QEvent *)

Reimplements: QAbstractTransition::onTransition(QEvent *event).

void QBasicKeyEventTransition::setEventType(QEvent::Type type)

Sets the event type that this key event transition is associated with.

See also eventType().

void QBasicKeyEventTransition::setKey(int key)

Sets the key that this key event transition will check for.

See also key().

void QBasicKeyEventTransition::setModifierMask(Qt::KeyboardModifiers modifierMask)

Sets the keyboard modifier mask that this key event transition will check for.

See also modifierMask().