QMouseEventTransition Class
The QMouseEventTransition class provides a transition for mouse events. 更多...
头文件: | #include <QMouseEventTransition> |
qmake: | QT += widgets |
开始支持版本: | Qt 4.6 |
基类: | QEventTransition |
属性
- button : Qt::MouseButton
- modifierMask : Qt::KeyboardModifiers
- 2 个属性继承自 QEventTransition
- 4 个属性继承自 QAbstractTransition
- 1 个属性继承自 QObject
公有函数
QMouseEventTransition(QState *sourceState = Q_NULLPTR) | |
QMouseEventTransition(QObject *object, QEvent::Type type, Qt::MouseButton button, QState *sourceState = Q_NULLPTR) | |
~QMouseEventTransition() | |
Qt::MouseButton | button() const |
QPainterPath | hitTestPath() const |
Qt::KeyboardModifiers | modifierMask() const |
void | setButton(Qt::MouseButton button) |
void | setHitTestPath(const QPainterPath &path) |
void | setModifierMask(Qt::KeyboardModifiers modifierMask) |
- 4 个公有函数继承自 QEventTransition
- 11 个公有函数继承自 QAbstractTransition
- 32 个公有函数继承自 QObject
重新实现的受保护函数
virtual bool | eventTest(QEvent *event) |
virtual void | onTransition(QEvent *event) |
- 3 个受保护的函数继承自 QEventTransition
- 3 个受保护的函数继承自 QAbstractTransition
- 9 个受保护的函数继承自 QObject
其他继承的成员
- 1 个公有槽函数继承自 QObject
- 3 个信号继承自 QAbstractTransition
- 2 个信号继承自 QObject
- 1 个公有变量继承自 QObject
- 10 个静态公有成员继承自 QObject
- 3 个受保护的函数继承自 QEventTransition
- 3 个受保护的函数继承自 QAbstractTransition
- 9 个受保护的函数继承自 QObject
- 2 个受保护的变量继承自 QObject
详细描述
The QMouseEventTransition class provides a transition for mouse events.
QMouseEventTransition is part of The State Machine Framework.
参见 QState::addTransition().
属性
button : Qt::MouseButton
This property holds the button that this mouse event transition is associated with
访问函数:
modifierMask : Qt::KeyboardModifiers
This property holds the keyboard modifier mask that this mouse event transition checks for
访问函数:
Qt::KeyboardModifiers | modifierMask() const |
void | setModifierMask(Qt::KeyboardModifiers modifierMask) |
成员函数
QMouseEventTransition::QMouseEventTransition(QState *sourceState = Q_NULLPTR)
Constructs a new mouse event transition with the given sourceState.
QMouseEventTransition::QMouseEventTransition(QObject *object, QEvent::Type type, Qt::MouseButton button, QState *sourceState = Q_NULLPTR)
Constructs a new mouse event transition for events of the given type for the given object, with the given button and sourceState.
QMouseEventTransition::~QMouseEventTransition()
Destroys this mouse event transition.
Qt::MouseButton QMouseEventTransition::button() const
Returns the button that this mouse event transition checks for.
Note: Getter function for property button.
参见 setButton().
[virtual protected]
bool QMouseEventTransition::eventTest(QEvent *event)
重新实现 QAbstractTransition::eventTest().
QPainterPath QMouseEventTransition::hitTestPath() const
Returns the hit test path for this mouse event transition.
参见 setHitTestPath().
Qt::KeyboardModifiers QMouseEventTransition::modifierMask() const
Returns the keyboard modifier mask that this mouse event transition checks for.
Note: Getter function for property modifierMask.
参见 setModifierMask().
[virtual protected]
void QMouseEventTransition::onTransition(QEvent *event)
重新实现 QAbstractTransition::onTransition().
void QMouseEventTransition::setButton(Qt::MouseButton button)
Sets the button that this mouse event transition will check for.
Note: Setter function for property button.
参见 button().
void QMouseEventTransition::setHitTestPath(const QPainterPath &path)
Sets the hit test path for this mouse event transition to path. If a valid path has been set, the transition will only trigger if the mouse event position (QMouseEvent::pos()) is inside the path.
参见 hitTestPath() and QPainterPath::contains().
void QMouseEventTransition::setModifierMask(Qt::KeyboardModifiers modifierMask)
Sets the keyboard modifier mask that this mouse event transition will check for to modifierMask.
Note: Setter function for property modifierMask.
参见 modifierMask().