diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-07-29 13:45:39 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-07-29 13:45:39 (GMT) |
commit | 07c2b17276057a8b47c3be57ab7c2cf66dac0edd (patch) | |
tree | 48128509f60ff6d8a4bd129ccb3f29481529095a /examples/animation/sub-attaq/submarine.cpp | |
parent | 80bd3a13ee6f42a39d3d3c2985a648e2229778f6 (diff) | |
parent | 928eb3dee17f43d54262d1f3dfc5212f183e6ce9 (diff) | |
download | Qt-07c2b17276057a8b47c3be57ab7c2cf66dac0edd.zip Qt-07c2b17276057a8b47c3be57ab7c2cf66dac0edd.tar.gz Qt-07c2b17276057a8b47c3be57ab7c2cf66dac0edd.tar.bz2 |
Merge branch 'kinetic-graphicseffect' of git@scm.dev.nokia.troll.no:qt/kinetic into graphicseffects
Conflicts:
src/gui/graphicsview/qgraphicseffect.cpp
src/gui/graphicsview/qgraphicseffect_p.h
Diffstat (limited to 'examples/animation/sub-attaq/submarine.cpp')
-rw-r--r-- | examples/animation/sub-attaq/submarine.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/animation/sub-attaq/submarine.cpp b/examples/animation/sub-attaq/submarine.cpp index 04b7916..78a9539 100644 --- a/examples/animation/sub-attaq/submarine.cpp +++ b/examples/animation/sub-attaq/submarine.cpp @@ -115,7 +115,7 @@ SubMarine::SubMarine(int type, const QString &name, int points, QGraphicsItem * QStateMachine *machine = new QStateMachine(this); //This state is when the boat is moving/rotating - QState *moving = new QState(machine->rootState()); + QState *moving = new QState(machine); //This state is when the boat is moving from left to right MovementState *movement = new MovementState(this, moving); @@ -132,7 +132,7 @@ SubMarine::SubMarine(int type, const QString &name, int points, QGraphicsItem * machine->setInitialState(moving); //End - QFinalState *final = new QFinalState(machine->rootState()); + QFinalState *final = new QFinalState(machine); //If the moving animation is finished we move to the return state movement->addTransition(movement, SIGNAL(animationFinished()), rotation); @@ -141,7 +141,7 @@ SubMarine::SubMarine(int type, const QString &name, int points, QGraphicsItem * rotation->addTransition(rotation, SIGNAL(animationFinished()), movement); //This state play the destroyed animation - QAnimationState *destroyedState = new QAnimationState(machine->rootState()); + QAnimationState *destroyedState = new QAnimationState(machine); destroyedState->setAnimation(setupDestroyAnimation(this)); //Play a nice animation when the submarine is destroyed |