diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-04-22 04:52:44 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-04-22 04:52:44 (GMT) |
commit | f2c5ea07b2ed5f96bd32f9a1d71ec9613c240fa6 (patch) | |
tree | 390ae15f24cd5b6af85b9bc74c39fd90ba03144b /examples/animation/sub-attaq/boat.cpp | |
parent | 1139eb432a18d556efb4ecfc079e82c2e2093b96 (diff) | |
parent | 3f39c3380f97339a1ffb9d13d7b184a8315d3821 (diff) | |
download | Qt-f2c5ea07b2ed5f96bd32f9a1d71ec9613c240fa6.zip Qt-f2c5ea07b2ed5f96bd32f9a1d71ec9613c240fa6.tar.gz Qt-f2c5ea07b2ed5f96bd32f9a1d71ec9613c240fa6.tar.bz2 |
Merge branch 'kinetic-animations' of ../../qt/kinetic into kinetic-declarativeui
Conflicts:
src/gui/graphicsview/qgraphicsitem.cpp
Diffstat (limited to 'examples/animation/sub-attaq/boat.cpp')
-rw-r--r-- | examples/animation/sub-attaq/boat.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/animation/sub-attaq/boat.cpp b/examples/animation/sub-attaq/boat.cpp index 6824f17..633e1b1 100644 --- a/examples/animation/sub-attaq/boat.cpp +++ b/examples/animation/sub-attaq/boat.cpp @@ -47,6 +47,7 @@ #include "graphicsscene.h" #include "animationmanager.h" #include "custompropertyanimation.h" +#include "qanimationstate.h" //Qt #if defined(QT_EXPERIMENTAL_SOLUTION) @@ -56,7 +57,6 @@ # include "qfinalstate.h" # include "qstate.h" #include "qsequentialanimationgroup.h" -#include "qanimationstate.h" #else #include <QPropertyAnimation> #include <QStateMachine> @@ -64,7 +64,6 @@ #include <QFinalState> #include <QState> #include <QSequentialAnimationGroup> -#include <QAnimationState> #endif static QAbstractAnimation *setupDestroyAnimation(Boat *boat) @@ -208,13 +207,13 @@ Boat::Boat(QGraphicsItem * parent, Qt::WindowFlags wFlags) //This state play the destroyed animation QAnimationState *destroyedState = new QAnimationState(machine->rootState()); - destroyedState->addAnimation(setupDestroyAnimation(this)); + destroyedState->setAnimation(setupDestroyAnimation(this)); //Play a nice animation when the boat is destroyed moving->addTransition(this, SIGNAL(boatDestroyed()),destroyedState); //Transition to final state when the destroyed animation is finished - destroyedState->addFinishedTransition(final); + destroyedState->addTransition(destroyedState, SIGNAL(animationFinished()), final); //The machine has finished to be executed, then the boat is dead connect(machine,SIGNAL(finished()),this, SIGNAL(boatExecutionFinished())); |