summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/animation/sub-attaq/states.cpp4
-rw-r--r--examples/statemachine/composition/main.cpp4
-rw-r--r--examples/statemachine/trafficlight/main.cpp8
3 files changed, 8 insertions, 8 deletions
diff --git a/examples/animation/sub-attaq/states.cpp b/examples/animation/sub-attaq/states.cpp
index f476f55..b381db7 100644
--- a/examples/animation/sub-attaq/states.cpp
+++ b/examples/animation/sub-attaq/states.cpp
@@ -140,10 +140,10 @@ void PlayState::onEntry()
QFinalState *final = new QFinalState(machine->rootState());
//We win we should reach the final state
- winState->addFinishedTransition(final);
+ winState->addTransition(winState, SIGNAL(finished()), final);
//We lost we should reach the final state
- lostState->addFinishedTransition(final);
+ lostState->addTransition(lostState, SIGNAL(finished()), final);
machine->start();
}
diff --git a/examples/statemachine/composition/main.cpp b/examples/statemachine/composition/main.cpp
index 927fc62..0afff66 100644
--- a/examples/statemachine/composition/main.cpp
+++ b/examples/statemachine/composition/main.cpp
@@ -86,11 +86,11 @@ int main(int argc, char **argv)
s2_timer->addTransition(&t2, SIGNAL(timeout()), s2_done);
s2->setInitialState(s2_timer);
- s1->addFinishedTransition(s2);
+ s1->addTransition(s1, SIGNAL(finished()), s2);
QFinalState *s3 = new QFinalState();
s3->setObjectName("s3");
- s2->addFinishedTransition(s3);
+ s2->addTransition(s2, SIGNAL(finished()), s3);
machine.addState(s1);
machine.addState(s2);
diff --git a/examples/statemachine/trafficlight/main.cpp b/examples/statemachine/trafficlight/main.cpp
index 115ecad..ed0eeea 100644
--- a/examples/statemachine/trafficlight/main.cpp
+++ b/examples/statemachine/trafficlight/main.cpp
@@ -157,14 +157,14 @@ public:
redGoingYellow->setObjectName("redGoingYellow");
LightState *yellowGoingGreen = new LightState(widget->yellowLight(), 1000);
yellowGoingGreen->setObjectName("yellowGoingGreen");
- redGoingYellow->addFinishedTransition(yellowGoingGreen);
+ redGoingYellow->addTransition(redGoingYellow, SIGNAL(finished()), yellowGoingGreen);
LightState *greenGoingYellow = new LightState(widget->greenLight(), 3000);
greenGoingYellow->setObjectName("greenGoingYellow");
- yellowGoingGreen->addFinishedTransition(greenGoingYellow);
+ yellowGoingGreen->addTransition(yellowGoingGreen, SIGNAL(finished()), greenGoingYellow);
LightState *yellowGoingRed = new LightState(widget->yellowLight(), 1000);
yellowGoingRed->setObjectName("yellowGoingRed");
- greenGoingYellow->addFinishedTransition(yellowGoingRed);
- yellowGoingRed->addFinishedTransition(redGoingYellow);
+ greenGoingYellow->addTransition(greenGoingYellow, SIGNAL(finished()), yellowGoingRed);
+ yellowGoingRed->addTransition(yellowGoingRed, SIGNAL(finished()), redGoingYellow);
machine->addState(redGoingYellow);
machine->addState(yellowGoingGreen);