QKeyEventTransition Class

The QKeyEventTransition class provides a transition for key events. 更多...

头: #include <QKeyEventTransition>
qmake: QT += widgets
Since: Qt 4.6
继承: QEventTransition

特性

公共函数

QKeyEventTransition (QState * sourceState = nullptr)
QKeyEventTransition (QObject * object , QEvent::Type type , int key , QState * sourceState = nullptr)
virtual ~QKeyEventTransition ()
int key () const
Qt::KeyboardModifiers modifierMask () const
void setKey (int key )
void setModifierMask (Qt::KeyboardModifiers modifierMask )

静态公共成员

const QMetaObject staticMetaObject

重实现保护函数

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

额外继承成员

详细描述

The QKeyEventTransition class provides a transition for key events.

QKeyEventTransition 属于 状态机框架 .

另请参阅 QState::addTransition ().

特性文档编制

key : int

This property holds the key that this key event transition is associated with

访问函数:

int key () const
void setKey (int key )

modifierMask : Qt::KeyboardModifiers

This property holds the keyboard modifier mask that this key event transition checks for

访问函数:

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

成员函数文档编制

QKeyEventTransition:: QKeyEventTransition ( QState * sourceState = nullptr)

Constructs a new key event transition with the given sourceState .

QKeyEventTransition:: QKeyEventTransition ( QObject * object , QEvent::Type type , int key , QState * sourceState = nullptr)

Constructs a new key event transition for events of the given type 为给定 object ,采用给定 key and sourceState .

[虚拟] QKeyEventTransition:: ~QKeyEventTransition ()

Destroys this key event transition.

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

重实现自 QEventTransition::eventTest ().

int QKeyEventTransition:: key () const

Returns the key that this key event transition checks for.

注意: getter 函数对于特性 key .

另请参阅 setKey ().

Qt::KeyboardModifiers QKeyEventTransition:: modifierMask () const

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

注意: getter 函数对于特性 modifierMask .

另请参阅 setModifierMask ().

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

重实现自 QEventTransition::onTransition ().

void QKeyEventTransition:: setKey ( int key )

设置 key that this key event transition will check for.

注意: setter 函数对于特性 key .

另请参阅 key ().

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

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

注意: setter 函数对于特性 modifierMask .

另请参阅 modifierMask ().