summaryrefslogtreecommitdiffstats
path: root/examples/scxml/trafficlight-widgets-static/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-static/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-static/doc')
-rw-r--r--examples/scxml/trafficlight-widgets-static/doc/src/trafficlight-widgets-static.qdoc33
1 files changed, 31 insertions, 2 deletions
diff --git a/examples/scxml/trafficlight-widgets-static/doc/src/trafficlight-widgets-static.qdoc b/examples/scxml/trafficlight-widgets-static/doc/src/trafficlight-widgets-static.qdoc
index 03e0680..a807f22 100644
--- a/examples/scxml/trafficlight-widgets-static/doc/src/trafficlight-widgets-static.qdoc
+++ b/examples/scxml/trafficlight-widgets-static/doc/src/trafficlight-widgets-static.qdoc
@@ -27,8 +27,37 @@
/*!
\example trafficlight-widgets-static
- \title Qt SCXML: Traffic Light Example (Static)
+ \title Qt SCXML Traffic Light Example (Static)
\ingroup examples-qtscxml
- \brief Demonstrates using a state-machine for a simple traffic light.
+ \brief A widget-based application that uses a compiled state machine to
+ implement a traffic light.
+
+ \image trafficlight.png
+
+ \e{Traffic Light 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 Widgets.
+
+ \include examples-run.qdocinc
+
+ \include trafficlight-compiling.qdocinc
+
+ \section1 Instantiating the State Machine
+
+ We instantiate the generated \c TrafficLightStateMachine class in the
+ \e trafficlight-widgets-static.cpp file, as follows:
+
+ \quotefromfile trafficlight-widgets-static/trafficlight-widgets-static.cpp
+ \skipto #include
+ \printuntil }
+
+ \include trafficlight-state-machine.qdocinc
+
+ We connect to the states as follows:
+
+ \quotefromfile trafficlight-common/trafficlight.cpp
+ \skipto connectToState
+ \printuntil greenLight
*/