diff options
author | Kevin Funk <kevin.funk@kdab.com> | 2014-10-09 16:05:33 +0200 |
---|---|---|
committer | Brett Stottlemyer <bstottle@ford.com> | 2014-10-21 02:13:33 +0200 |
commit | f830c109d09d835551c1325c4904fc9a490b3754 (patch) | |
tree | 6bb3c09cb44ed0a5446749701ac4281831a62967 /src/qml/doc/snippets/qml/statemachine/historystate.qml | |
parent | 5871f3e829f1f48995b5d6c03f7ad31fcda386e5 (diff) |
qmlstatemachine: Rename StateBase to State
As discussed with Brett Stottlmyer and Alan Alpert.
Add a section about the implications when importing both
QtQml.StateMachine
and QtQuick in one single QML file.
Change-Id: I8755f4b578e2a6ff4c2377c7a8a0b996ba9b7129
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/doc/snippets/qml/statemachine/historystate.qml')
-rw-r--r-- | src/qml/doc/snippets/qml/statemachine/historystate.qml | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/doc/snippets/qml/statemachine/historystate.qml b/src/qml/doc/snippets/qml/statemachine/historystate.qml index 237cf57175..7559bfe06c 100644 --- a/src/qml/doc/snippets/qml/statemachine/historystate.qml +++ b/src/qml/doc/snippets/qml/statemachine/historystate.qml @@ -39,38 +39,38 @@ ****************************************************************************/ //! [document] -import QtQml.StateMachine 1.0 import QtQuick 2.0 +import QtQml.StateMachine 1.0 as DSM Rectangle { Button { anchors.fill: parent id: button text: "Press me" - StateMachine { + DSM.StateMachine { id: stateMachine initialState: parentState running: true - StateBase { + DSM.State { id: parentState initialState: child2 onEntered: console.log("parentState entered") onExited: console.log("parentState exited") - StateBase { + DSM.State { id: child1 onEntered: console.log("child1 entered") onExited: console.log("child1 exited") } - StateBase { + DSM.State { id: child2 onEntered: console.log("child2 entered") onExited: console.log("child2 exited") } - HistoryState { + DSM.HistoryState { id: historyState defaultState: child1 } - SignalTransition { + DSM.SignalTransition { targetState: historyState // Clicking the button will cause the state machine to enter the child state |