继承者: QSignalTransition , QEventTransition , QMouseEventTransition , QKeyEventTransition
注意
该类在 Qt4.6 引入
PySide.QtCore.QAbstractTransition class is the base class of transitions between PySide.QtCore.QAbstractState 对象。
PySide.QtCore.QAbstractTransition class is the abstract base class of transitions between states ( PySide.QtCore.QAbstractState 对象) 的 PySide.QtCore.QStateMachine . PySide.QtCore.QAbstractTransition is part of 状态机框架 .
PySide.QtCore.QAbstractTransition.sourceState() function returns the source of the transition. The PySide.QtCore.QAbstractTransition.targetStates() function returns the targets of the transition. The PySide.QtCore.QAbstractTransition.machine() function returns the state machine that the transition is part of.
PySide.QtCore.QAbstractTransition.triggered() signal is emitted when the transition has been triggered.
过渡可以导致动画播放。使用 PySide.QtCore.QAbstractTransition.addAnimation() function to add an animation to the transition.
PySide.QtCore.QAbstractTransition.eventTest() function is called by the state machine to determine whether an event should trigger the transition. In your reimplementation you typically check the event type and cast the event object to the proper type, and check that one or more properties of the event meet your criteria.
PySide.QtCore.QAbstractTransition.onTransition() function is called when the transition is triggered; reimplement this function to perform custom processing for the transition.
| 参数: | sourceState – PySide.QtCore.QState |
|---|
构造新 PySide.QtCore.QAbstractTransition 对象采用给定 sourceState .
| 参数: | animation – PySide.QtCore.QAbstractAnimation |
|---|
添加给定 animation to this transition. The transition does not take ownership of the animation.
| 返回类型: |
|---|
Returns the list of animations associated with this transition, or an empty list if it has no animations.
| 参数: | event – PySide.QtCore.QEvent |
|---|---|
| 返回类型: | PySide.QtCore.bool |
This function is called to determine whether the given event should cause this transition to trigger. Reimplement this function and return true if the event should trigger the transition, otherwise return false.
| 返回类型: | PySide.QtCore.QStateMachine |
|---|
Returns the state machine that this transition is part of, or 0 if the transition is not part of a state machine.
| 参数: | event – PySide.QtCore.QEvent |
|---|
This function is called when the transition is triggered. The given event is what caused the transition to trigger. Reimplement this function to perform custom processing when the transition is triggered.
| 参数: | animation – PySide.QtCore.QAbstractAnimation |
|---|
移除给定 animation from this transition.
| 参数: | target – PySide.QtCore.QAbstractState |
|---|
This property holds the target state of this transition.
If a transition has no target state, the transition may still be triggered, but this will not cause the state machine's configuration to change (i.e. the current state will not be exited and re-entered).
| 参数: | targets – |
|---|
This property holds the target states of this transition.
If multiple states are specified, all must be descendants of the same parallel group state.
| 返回类型: | PySide.QtCore.QState |
|---|
This property holds the source state (parent) of this transition.
| 返回类型: | PySide.QtCore.QAbstractState |
|---|
This property holds the target state of this transition.
If a transition has no target state, the transition may still be triggered, but this will not cause the state machine's configuration to change (i.e. the current state will not be exited and re-entered).
| 返回类型: |
|---|
This property holds the target states of this transition.
If multiple states are specified, all must be descendants of the same parallel group state.