The QKeyEventTransition class provides a transition for key events. 更多...
头: | #include <QKeyEventTransition> |
qmake: | QT += widgets |
Since: | Qt 4.6 |
继承: | QEventTransition |
QKeyEventTransition (QState * sourceState = Q_NULLPTR) | |
QKeyEventTransition (QObject * object , QEvent::Type type , int key , QState * sourceState = Q_NULLPTR) | |
~QKeyEventTransition () | |
int | key () const |
Qt::KeyboardModifiers | modifierMask () const |
void | setKey (int key ) |
void | setModifierMask (Qt::KeyboardModifiers modifierMask ) |
virtual bool | eventTest (QEvent * event ) |
virtual void | onTransition (QEvent * event ) |
The QKeyEventTransition class provides a transition for key events.
QKeyEventTransition 属于 状态机框架 .
另请参阅 QState::addTransition ().
This property holds the key that this key event transition is associated with
访问函数:
int | key () const |
void | setKey (int key ) |
This property holds the keyboard modifier mask that this key event transition checks for
访问函数:
Qt::KeyboardModifiers | modifierMask () const |
void | setModifierMask (Qt::KeyboardModifiers modifierMask ) |
Constructs a new key event transition with the given sourceState .
Constructs a new key event transition for events of the given type 为给定 object ,采用给定 key and sourceState .
Destroys this key event transition.
[virtual protected]
bool
QKeyEventTransition::
eventTest
(
QEvent
*
event
)
重实现自 QAbstractTransition::eventTest ().
Returns the key that this key event transition checks for.
注意: Getter 函数对于特性 key .
另请参阅 setKey ().
Returns the keyboard modifier mask that this key event transition checks for.
注意: Getter 函数对于特性 modifierMask .
另请参阅 setModifierMask ().
[virtual protected]
void
QKeyEventTransition::
onTransition
(
QEvent
*
event
)
重实现自 QAbstractTransition::onTransition ().
设置 key that this key event transition will check for.
注意: Setter 函数对于特性 key .
另请参阅 key ().
Sets the keyboard modifier mask that this key event transition will check for to modifierMask .
注意: Setter 函数对于特性 modifierMask .
另请参阅 modifierMask ().