44 #ifndef QT_NO_STATEMACHINE 46 #include <QtGui/qevent.h> 48 #include <private/qabstracttransition_p.h> 175 return d->modifierMask;
194 if (event->
type() ==
d->eventType) {
196 return (ke->
key() ==
d->key)
197 && ((ke->
modifiers() &
d->modifierMask) ==
d->modifierMask);
211 #endif //QT_NO_STATEMACHINE
static QBasicKeyEventTransitionPrivate * get(QBasicKeyEventTransition *q)
int key() const
Returns the key that this key event transition checks for.
The QKeyEvent class describes a key event.
#define QT_END_NAMESPACE
This macro expands to.
bool eventTest(QEvent *event)
Reimplemented Function
The QAbstractTransition class is the base class of transitions between QAbstractState objects...
Qt::KeyboardModifiers modifierMask
QState * sourceState() const
void setKey(int key)
Sets the key that this key event transition will check for.
The QBasicKeyEventTransition class provides a transition for Qt key events.
The QState class provides a general-purpose state for QStateMachine.
Qt::KeyboardModifiers modifiers() const
Returns the keyboard modifier flags that existed immediately after the event occurred.
int key() const
Returns the code of the key that was pressed or released.
QBasicKeyEventTransition(QState *sourceState=0)
Constructs a new key event transition with the given sourceState.
#define QT_BEGIN_NAMESPACE
This macro expands to.
QBasicKeyEventTransitionPrivate()
QState * sourceState() const
void onTransition(QEvent *)
Reimplemented Function
#define Q_DECLARE_PUBLIC(Class)
Type
This enum type defines the valid event types in Qt.
bool event(QEvent *e)
Reimplemented Function
void setEventType(QEvent::Type type)
Sets the event type that this key event transition is associated with.
QEvent::Type eventType() const
Returns the event type that this key event transition is associated with.
void setModifierMask(Qt::KeyboardModifiers modifiers)
Sets the keyboard modifier mask that this key event transition will check for.
The QEvent class is the base class of all event classes.
Type type() const
Returns the event type.
~QBasicKeyEventTransition()
Destroys this event transition.
Qt::KeyboardModifiers modifierMask() const
Returns the keyboard modifier mask that this key event transition checks for.