diff options
author | Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> | 2016-03-17 09:36:38 +0100 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> | 2016-03-17 09:13:46 +0000 |
commit | 8463c9540f3ea842b6c653e9afea46d1a4da67b0 (patch) | |
tree | 35ebec160b69de1323c0b16ef4118fe0a9dace21 /examples/scxml/trafficlight-qml-static | |
parent | 78b4524e71c1cd7f6f661222479b81901f98aa7a (diff) |
Doc: Add docs for the Traffic Light example
Change-Id: Id51e2cb7eaf04179efe5379ac82f596ede3f6b04
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'examples/scxml/trafficlight-qml-static')
-rw-r--r-- | examples/scxml/trafficlight-qml-static/doc/src/trafficlight-qml-static.qdoc | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/examples/scxml/trafficlight-qml-static/doc/src/trafficlight-qml-static.qdoc b/examples/scxml/trafficlight-qml-static/doc/src/trafficlight-qml-static.qdoc index 6932dbc..77e7aa7 100644 --- a/examples/scxml/trafficlight-qml-static/doc/src/trafficlight-qml-static.qdoc +++ b/examples/scxml/trafficlight-qml-static/doc/src/trafficlight-qml-static.qdoc @@ -27,8 +27,38 @@ /*! \example trafficlight-qml-static - \title Qt SCXML: Traffic Light QML Example (Static) + \title Qt SCXML Traffic Light QML Example (Static) \ingroup examples-qtscxml - \brief Demonstrates using a state-machine for a simple traffic light. + \brief A Qt Quick application that uses a compiled state machine to + implement a traffic light. + + \image trafficlight.png + + \e{Traffic Light QML Example (Static)} demonstrates how to connect to the + active properties of a state in a state machine that is compiled to a class. + + The UI is created using Qt Quick. + + \include examples-run.qdocinc + + \include trafficlight-compiling.qdocinc + + \section1 Instantiating the State Machine + + We instantiate the state machine as follows: + + \quotefromfile trafficlight-qml-static/trafficlight-qml-static.qml + + \skipto TrafficLight + \printuntil } + + \include trafficlight-state-machine.qdocinc + + We connect to the states as follows: + + \quotefromfile trafficlight-common/TrafficLight.qml + \skipto Light + \printuntil greenLight + \printuntil /^ {4}\}/ */ |