QAbstractTransition Class ReferenceThe QAbstractTransition class is the base class of transitions between QAbstractState objects. More... #include <QAbstractTransition> Inherits: QObject. Inherited by: QEventTransition and QSignalTransition. This class was introduced in Qt 4.6. Properties
Public Functions
Signals
Protected Functions
Reimplemented Protected Functions
Additional Inherited MembersDetailed DescriptionThe QAbstractTransition class is the base class of transitions between QAbstractState objects. The QAbstractTransition class is the abstract base class of transitions between states (QAbstractState objects) of a QStateMachine. QAbstractTransition is part of The State Machine Framework. The sourceState() function returns the source of the transition. The targetStates() function returns the targets of the transition. The machine() function returns the state machine that the transition is part of. The triggered() signal is emitted when the transition has been triggered. Transitions can cause animations to be played. Use the addAnimation() function to add an animation to the transition. SubclassingThe 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 onTransition() function is called when the transition is triggered; reimplement this function to perform custom processing for the transition. Property Documentation
|
QState * | sourceState () const |
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).
Access functions:
QAbstractState * | targetState () const |
void | setTargetState ( QAbstractState * target ) |
This property holds the target states of this transition.
If multiple states are specified, all must be descendants of the same parallel group state.
Access functions:
QList<QAbstractState *> | targetStates () const |
void | setTargetStates ( const QList<QAbstractState *> & targets ) |
Constructs a new QAbstractTransition object with the given sourceState.
Destroys this transition.
Adds the given animation to this transition. The transition does not take ownership of the animation.
See also removeAnimation() and animations().
Returns the list of animations associated with this transition, or an empty list if it has no animations.
See also addAnimation().
Reimplemented from QObject::event().
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.
Returns the state machine that this transition is part of, or 0 if the transition is not part of a state machine.
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.
Removes the given animation from this transition.
See also addAnimation().
This signal is emitted when the transition has been triggered (after onTransition() has been called).
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.8 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com