Inherited by: QSignalTransition, QEventTransition, QMouseEventTransition, QKeyEventTransition
Note
This class was introduced in Qt 4.6
The PySide.QtCore.QAbstractTransition class is the base class of transitions between PySide.QtCore.QAbstractState objects.
The PySide.QtCore.QAbstractTransition class is the abstract base class of transitions between states ( PySide.QtCore.QAbstractState objects) of a PySide.QtCore.QStateMachine . PySide.QtCore.QAbstractTransition is part of The State Machine Framework .
The 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.
The PySide.QtCore.QAbstractTransition.triggered() signal is emitted when the transition has been triggered.
Transitions can cause animations to be played. Use the PySide.QtCore.QAbstractTransition.addAnimation() function to add an animation to the transition.
The 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.
The PySide.QtCore.QAbstractTransition.onTransition() function is called when the transition is triggered; reimplement this function to perform custom processing for the transition.
Parameters: | sourceState – PySide.QtCore.QState |
---|
Constructs a new PySide.QtCore.QAbstractTransition object with the given sourceState .
Parameters: | animation – PySide.QtCore.QAbstractAnimation |
---|
Adds the given animation to this transition. The transition does not take ownership of the animation.
Return type: |
---|
Returns the list of animations associated with this transition, or an empty list if it has no animations.
Parameters: | event – PySide.QtCore.QEvent |
---|---|
Return type: | 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.
Return type: | 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.
Parameters: | 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.
Parameters: | animation – PySide.QtCore.QAbstractAnimation |
---|
Removes the given animation from this transition.
Parameters: | 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).
Parameters: | 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.
Return type: | PySide.QtCore.QState |
---|
This property holds the source state (parent) of this transition.
Return type: | 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).
Return type: |
---|
This property holds the target states of this transition.
If multiple states are specified, all must be descendants of the same parallel group state.