summaryrefslogtreecommitdiffstats
path: root/examples/scxml/calculator-widgets/doc
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>2016-04-01 10:45:41 +0200
committerLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>2016-04-01 10:54:11 +0000
commitdb0267082c31e82b7079819efcfa1782b52f4f4f (patch)
tree0fd2d37227b2e125e5bff9b3eaaa0140ddf74f41 /examples/scxml/calculator-widgets/doc
parent4deeb7ac30a3a5423fb8063e1b2c835bd50f018b (diff)
Doc: Add docs for Calculator QML example
- Use a .qdocinc include file for compilation instructions - Add screenshot - Fix related issues in the widget version docs Change-Id: Ia1de27f81a45e23ab37158cb66b537c95810c28b Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Diffstat (limited to 'examples/scxml/calculator-widgets/doc')
-rw-r--r--examples/scxml/calculator-widgets/doc/src/calculator.qdoc32
1 files changed, 7 insertions, 25 deletions
diff --git a/examples/scxml/calculator-widgets/doc/src/calculator.qdoc b/examples/scxml/calculator-widgets/doc/src/calculator.qdoc
index f92fbbd..5055005 100644
--- a/examples/scxml/calculator-widgets/doc/src/calculator.qdoc
+++ b/examples/scxml/calculator-widgets/doc/src/calculator.qdoc
@@ -32,43 +32,25 @@
\image calculator.png
- \brief Implements the Calculator example presented in the SCXML
- Specification.
+ \brief A widget-based application that implements the Calculator example
+ presented in the SCXML Specification.
\e {Calculator} uses Qt SCXML to implement the
\l{SCXML Specification - Calculator Example}{Calculator Example}
presented in the SCXML Specification.
- The state machine is specified in the \e calculator.scxml file and compiled
- into the \c Calculator class. The user interface is created using
- Qt Widgets.
+ The state machine is specified in the \e statemachine.scxml file and
+ compiled into the \c CalculatorStateMachine class. The user interface is
+ created using Qt Widgets.
\include examples-run.qdocinc
- \section1 Compiling the State Machine
-
- We link against the Qt SCXML module by adding the following line to the
- \e calculator.pro file:
-
- \quotefromfile calculator-widgets/calculator-widgets.pro
- \printuntil scxml
-
- We then specify the state machine to compile:
-
- \skipto STATECHARTS
- \printline calculator
-
- We also tell qmake to run \c qscxmlc, which generates \e statemachine.h and
- \e statemachine.cpp, and adds them to the \c HEADERS and \c SOURCES variables
- for compilation:
-
- \skipto load
- \printline qscxmlc
+ \include calculator-compiling.qdocinc
\section1 Instantiating the State Machine
We instantiate the generated \c CalculatorStateMachine class in the
- \e main.cpp file, as follows:
+ \e calculator-widgets.cpp file, as follows:
\quotefromfile calculator-widgets/calculator-widgets.cpp
\skipto #include