![]() |
Home |
The QtTransition class provides an action-based transition. More...
#include <QtTransition>
Inherits QtAbstractTransition.
Inherited by QtEventTransition, QtSignalTransition, and QtStateFinishedTransition.
The QtTransition class provides an action-based transition.
QtTransition provides an action-based transition; you add actions with the addAction() function. The transition executes the actions when the transition is triggered. QtTransition is part of The State Machine Framework.
Built-in actions are provided for setting properties and invoking methods of QObjects. The setPropertyOnTransition() function is used for defining property assignments that should be performed when a transition is taken. The invokeMethodOnTransition() function is used for defining method invocations that should be performed when a transition is taken.
QtStateMachine machine; QtState *s1 = new QtState(); machine.addState(s1); QtTransition *t1 = new QtTransition(); QLabel label; t1->setPropertyOnTransition(&label, "text", "Transition t1 was triggered"); QtState *s2 = new QtState(); machine.addState(s2); s1->addTransition(t1, s2);
Actions are executed in the order in which they were added.
See also QtState::addTransition() and QtStateAction.
Constructs a new transition associated with the given eventTypes.
Constructs a new transition associated with the given eventType.
Destroys this transition.
Returns this transitions's actions, or an empty list if the transition has no actions.
See also addAction().
Adds the given action to this transition. The action will be executed when the transition is triggered. The transition takes ownership of the action.
See also removeAction().
Instructs this QtTransition to invoke the given method of the given object with the given arguments when the transition is taken. This function will create a QtStateInvokeMethodAction object and add it to the actions of the transition.
See also setPropertyOnTransition().
Removes the given action from this transition. The transition releases ownership of the action.
See also addAction().
Instructs this QtTransition to set the property with the given name of the given object to the given value when the transition is taken. This function will create a QtStateSetPropertyAction object and add it to the actions of the transition. If there is already an existing action associated with the property, the value of that action is updated.
See also invokeMethodOnTransition().
Copyright © 2009 Nokia | Trademarks | Qt Solutions |