diff options
author | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2016-07-26 13:17:15 +0200 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2016-07-26 11:23:17 +0000 |
commit | e81f5149ae4238256807fc165c98ef220a18496a (patch) | |
tree | 65494ae5e45081395684bfd6bc0fce82c9d8d5aa /examples/scxml | |
parent | 73630cb26cd8189571af17631a7f7a3fa9553ada (diff) |
Doc: Update Calculator example docs after API changes
- The load option was removed from the pro file.
- eventOccurred was replaced with connectToEvent.
- Added a code snippet that shows the DISPLAY.UPDATE
event in the SCXML file.
Change-Id: I41d29657f734a342393fcc25f83ca1e22514d53e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'examples/scxml')
-rw-r--r-- | examples/scxml/calculator-common/doc/src/calculator-compiling.qdocinc | 11 | ||||
-rw-r--r-- | examples/scxml/calculator-widgets/doc/src/calculator.qdoc | 13 |
2 files changed, 14 insertions, 10 deletions
diff --git a/examples/scxml/calculator-common/doc/src/calculator-compiling.qdocinc b/examples/scxml/calculator-common/doc/src/calculator-compiling.qdocinc index 54fe26b..3e5982f 100644 --- a/examples/scxml/calculator-common/doc/src/calculator-compiling.qdocinc +++ b/examples/scxml/calculator-common/doc/src/calculator-compiling.qdocinc @@ -9,11 +9,8 @@ We then specify the state machine to compile: \skipto STATECHARTS - \printline calculator + \printuntil statemachine.scxml - 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 + The Qt SCXML Compiler, \c qscxmlc, is run automatically to generate + \e statemachine.h and \e statemachine.cpp, and to add them to the \c HEADERS + and \c SOURCES variables for compilation. diff --git a/examples/scxml/calculator-widgets/doc/src/calculator.qdoc b/examples/scxml/calculator-widgets/doc/src/calculator.qdoc index 5055005..9463b53 100644 --- a/examples/scxml/calculator-widgets/doc/src/calculator.qdoc +++ b/examples/scxml/calculator-widgets/doc/src/calculator.qdoc @@ -66,9 +66,16 @@ \printuntil digit2 \printuntil } - To be notified when a state machine sends out an event, we connect to the - corresponding signal: + The state machine can notify other code when events occur: - \skipto eventOccurred + \quotefromfile calculator-common/statemachine.scxml + \skipto transition event="DISPLAY.UPDATE + \printuntil </transition + + We connect to the \c updateDisplay event to display the data passed by + the events: + + \quotefromfile calculator-widgets/mainwindow.cpp + \skipto connectToEvent \printuntil }); */ |