summaryrefslogtreecommitdiffstats
path: root/examples/scxml/trafficlight-widgets-dynamic/doc
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>2016-03-17 09:36:38 +0100
committerLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>2016-03-17 09:13:46 +0000
commit8463c9540f3ea842b6c653e9afea46d1a4da67b0 (patch)
tree35ebec160b69de1323c0b16ef4118fe0a9dace21 /examples/scxml/trafficlight-widgets-dynamic/doc
parent78b4524e71c1cd7f6f661222479b81901f98aa7a (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-widgets-dynamic/doc')
-rw-r--r--examples/scxml/trafficlight-widgets-dynamic/doc/src/trafficlight-widgets-dynamic.qdoc42
1 files changed, 40 insertions, 2 deletions
diff --git a/examples/scxml/trafficlight-widgets-dynamic/doc/src/trafficlight-widgets-dynamic.qdoc b/examples/scxml/trafficlight-widgets-dynamic/doc/src/trafficlight-widgets-dynamic.qdoc
index 236f410..de37ae0 100644
--- a/examples/scxml/trafficlight-widgets-dynamic/doc/src/trafficlight-widgets-dynamic.qdoc
+++ b/examples/scxml/trafficlight-widgets-dynamic/doc/src/trafficlight-widgets-dynamic.qdoc
@@ -27,8 +27,46 @@
/*!
\example trafficlight-widgets-dynamic
- \title Qt SCXML: Traffic Light Example (Dynamic)
+ \title Qt SCXML Traffic Light Example (Dynamic)
\ingroup examples-qtscxml
- \brief Demonstrates using a state-machine for a simple traffic light.
+ \brief A widget-based application that uses a dynamically loaded state
+ machine to implement a traffic light.
+
+ \image trafficlight.png
+
+ \e{Traffic Light Example (Dynamic)} demonstrates how to connect to the
+ active properties of a state in a dynamically loaded state machine.
+
+ The UI is created using Qt Widgets.
+
+ \include examples-run.qdocinc
+
+ \section1 Dynamically Loading the State Machine
+
+ We link against the Qt SCXML module by adding the following line to the
+ example \e .pro file:
+
+ \quotefromfile trafficlight-widgets-dynamic/trafficlight-widgets-dynamic.pro
+ \skipto QT
+ \printline scxml
+
+ We dynamically create the state machine in
+ \e trafficlight-widgets-dynamic.cpp:
+
+ \quotefromfile trafficlight-widgets-dynamic/trafficlight-widgets-dynamic.cpp
+ \skipto trafficlight.h
+ \printuntil /^ {4}\}/
+
+ And then instantiate it:
+
+ \printuntil /^\}/
+
+ \include trafficlight-state-machine.qdocinc
+
+ We connect to the states as follows:
+
+ \quotefromfile trafficlight-common/trafficlight.cpp
+ \skipto connectToState
+ \printuntil greenLight
*/