diff options
author | Eskil Abrahamsen Blomfeldt <eblomfel@trolltech.com> | 2009-05-13 09:01:32 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eblomfel@trolltech.com> | 2009-05-13 09:01:32 (GMT) |
commit | 288de11968d4b71c97fc5d1a175d4c4ac7023552 (patch) | |
tree | 1de83db15fd5cc200ff9e7e8baa231a32434f3e0 /examples/statemachine | |
parent | 8589b7c526f8c7d436c6a7c3bfb39dc505eff78e (diff) | |
download | Qt-288de11968d4b71c97fc5d1a175d4c4ac7023552.zip Qt-288de11968d4b71c97fc5d1a175d4c4ac7023552.tar.gz Qt-288de11968d4b71c97fc5d1a175d4c4ac7023552.tar.bz2 |
doc: Correct names of snippets in docs for Tank Game example
Diffstat (limited to 'examples/statemachine')
-rw-r--r-- | examples/statemachine/tankgame/mainwindow.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/statemachine/tankgame/mainwindow.cpp b/examples/statemachine/tankgame/mainwindow.cpp index 3bc9bbe..870bc9c 100644 --- a/examples/statemachine/tankgame/mainwindow.cpp +++ b/examples/statemachine/tankgame/mainwindow.cpp @@ -135,8 +135,10 @@ void MainWindow::init() spawnsAvailable->addTransition(this, SIGNAL(mapFull()), noSpawnsAvailable); +//! [3] QHistoryState *hs = new QHistoryState(stoppedState); hs->setDefaultState(spawnsAvailable); +//! [3] stoppedState->setInitialState(hs); @@ -255,9 +257,11 @@ void MainWindow::addTank() // If the plugin has an error it is disabled +//! [4] QState *errorState = new QState(region); errorState->assignProperty(tankItem, "enabled", false); pluginState->setErrorState(errorState); +//! [4] } } } |