![]() |
Home |
The QtAbstractState class is the base class of states of a QtStateMachine. More...
#include <QtAbstractState>
Inherits QObject.
Inherited by QtActionState and QtHistoryState.
The QtAbstractState class is the base class of states of a QtStateMachine.
The QtAbstractState class is the abstract base class of states that are part of a QtStateMachine. It defines the interface that all state objects have in common. QtAbstractState is part of The State Machine Framework.
The assignProperty() function is used for defining property assignments that should be performed when a state is entered.
The parentState() function returns the state's parent state.
The onEntry() function is called when the state is entered; reimplement this function to perform custom processing when the state is entered.
The onExit() function is called when the state is exited; reimplement this function to perform custom processing when the state is exited.
This enum specifies the restore policy type for a state. The restore policy takes effect when the machine enters a state which sets one or more properties. If the restore policy of the state is set to RestoreProperties, the state machine will save the original value of the property before the new value is set.
Later, when the machine either enters a state which has its restore policy set to DoNotRestoreProperties or when it enters a state which does not set a value for the given property, the property will automatically be restored to its initial value.
Only one initial value will be saved for any given property. If a value for a property has already been saved by the state machine, it will not be overwritten until the property has been successfully restored. Once the property has been restored, the state machine will clear the initial value until it enters a new state which sets the property and which has RestoreProperties as its restore policy.
Constant | Value | Description |
---|---|---|
QtAbstractState::GlobalRestorePolicy | 0 | The restore policy for the state should be retrieved using QtStateMachine::globalRestorePolicy() |
QtAbstractState::DoNotRestoreProperties | 1 | The state machine should not save the initial values of properties set in the state and restore them later. |
QtAbstractState::RestoreProperties | 2 | The state machine should save the initial values of properties set in the state and restore them later. |
See also setRestorePolicy(), restorePolicy(), and QtAbstractState::assignProperty().
This property holds the restore policy of this state.
Access functions:
Constructs a new state with the given parent state.
Destroys this state.
Instructs this state to set the property with the given name of the given object to the given value when the state is entered.
This function is called when the state is entered. Reimplement this function to perform custom processing when the state is entered.
This function is called when the state is exited. Reimplement this function to perform custom processing when the state is exited.
Returns this state's parent state, or 0 if the state has no parent state.
Copyright © 2009 Nokia | Trademarks | Qt Solutions |