| childrenprivate_p.h |
|
4921 |
- |
| CMakeLists.txt |
|
842 |
- |
| finalstate.cpp |
!
\qmltype FinalState
\inqmlmodule QtQml.StateMachine
\inherits QAbstractState
\ingroup statemachine-qmltypes
\since 5.4
\brief Provides a final state.
A final state is used to communicate that (part of) a StateMachine has
finished its work. When a final top-level state is entered, the state
machine's \l{State::finished}{finished}() signal is emitted. In
general, when a final substate (a child of a State) is entered, the parent
state's \l{State::finished}{finished}() signal is emitted. FinalState
is part of \l{Qt State Machine QML Guide}{Qt State Machine QML API}
To use a final state, you create a FinalState object and add a transition
to it from another state.
\section1 Example Usage
\snippet qml/statemachine/finalstate.qml document
\clearfloat
\sa StateMachine, State
|
2067 |
- |
| finalstate_p.h |
|
1747 |
- |
| qstatemachineqmlglobals_p.h |
|
732 |
- |
| signaltransition.cpp |
|
10985 |
- |
| signaltransition_p.h |
!
\internal
|
3250 |
- |
| state.cpp |
!
\qmltype QAbstractState
\inqmlmodule QtQml.StateMachine
\ingroup statemachine-qmltypes
\since 5.4
\brief The QAbstractState type is the base type of States of a StateMachine.
Do not use QAbstractState directly; use State, FinalState or
StateMachine instead.
\sa StateMachine, State
|
6583 |
- |
| state_p.h |
|
1843 |
- |
| statemachine.cpp |
!
\qmltype StateMachine
\inqmlmodule QtQml.StateMachine
\inherits State
\ingroup statemachine-qmltypes
\since 5.4
\brief Provides a hierarchical finite state machine.
StateMachine is based on the concepts and notation of
\l{http://www.wisdom.weizmann.ac.il/~dharel/SCANNED.PAPERS/Statecharts.pdf}{Statecharts}.
StateMachine is part of \l{Qt State Machine QML Guide}{Qt State Machine QML API}
A state machine manages a set of states and transitions between those
states; these states and transitions define a state graph. Once a state
graph has been built, the state machine can execute it. StateMachine's
execution algorithm is based on the \l{http://www.w3.org/TR/scxml/}{State Chart XML (SCXML)}
algorithm. The framework's \l{Qt State Machine QML Guide}{overview}
gives several state graphs and the code to build them.
Before the machine can be started, the \l{State::initialState}{initialState}
must be set. The initial state is the state that the
machine enters when started. You can then set running property to true
or start() the state machine. The started signal is emitted when the
initial state is entered.
The state machine processes events and takes transitions until a
top-level final state is entered; the state machine then emits the
finished() signal. You can also stop() the state machine
explicitly (you can also set running property to false).
The stopped signal is emitted in this case.
\section1 Example Usage
The following snippet shows a state machine that will finish when a button
is clicked:
\snippet qml/statemachine/simplestatemachine.qml document
If an error is encountered, the machine will look for an
\l{State::errorState}{errorState}, and if one is available, it will
enter this state. After the error state is entered, the type of the error
can be retrieved with error(). The execution of the state graph will not
stop when the error state is entered. If no error state applies to the
erroneous state, the machine will stop executing and an error message will
be printed to the console.
\warning Setting the childMode of a StateMachine to anything else than QState::ExclusiveStates
will result in an invalid state machine, and can lead to incorrect behavior.
\clearfloat
\sa QAbstractState, State, SignalTransition, TimeoutTransition, HistoryState {Qt State Machine QML Guide}
|
7461 |
- |
| statemachine_p.h |
!
\internal
|
2286 |
- |
| statemachineforeign_p.h |
|
1612 |
- |
| timeouttransition.cpp |
!
\qmltype TimeoutTransition
\inqmlmodule QtQml.StateMachine
\inherits QSignalTransition
\ingroup statemachine-qmltypes
\since 5.4
\brief The TimeoutTransition type provides a transition based on a timer.
\l {QtQml::Timer}{Timer} type can be combined with SignalTransition to enact more complex
timeout based transitions.
TimeoutTransition is part of \l{Qt State Machine QML Guide}{Qt State Machine QML API}
\section1 Example Usage
\snippet qml/statemachine/timeouttransition.qml document
\clearfloat
\sa StateMachine, SignalTransition, FinalState, HistoryState
|
1941 |
- |
| timeouttransition_p.h |
|
1294 |
- |