diff options
Diffstat (limited to 'examples/widgets/animation/sub-attaq/bomb.cpp')
-rw-r--r-- | examples/widgets/animation/sub-attaq/bomb.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/widgets/animation/sub-attaq/bomb.cpp b/examples/widgets/animation/sub-attaq/bomb.cpp index a80d2d46c5..76e4575293 100644 --- a/examples/widgets/animation/sub-attaq/bomb.cpp +++ b/examples/widgets/animation/sub-attaq/bomb.cpp @@ -83,8 +83,8 @@ void Bomb::launch(Bomb::Direction direction) anim->setEndValue(QPointF(x() + delta*2,scene()->height())); anim->setDuration(y()/2*60); launchAnimation->addAnimation(anim); - connect(anim,SIGNAL(valueChanged(QVariant)),this,SLOT(onAnimationLaunchValueChanged(QVariant))); - connect(this, SIGNAL(bombExploded()), launchAnimation, SLOT(stop())); + connect(anim,&QVariantAnimation::valueChanged,this,&Bomb::onAnimationLaunchValueChanged); + connect(this, &Bomb::bombExploded, launchAnimation, &QAbstractAnimation::stop); //We setup the state machine of the bomb QStateMachine *machine = new QStateMachine(this); @@ -98,13 +98,13 @@ void Bomb::launch(Bomb::Direction direction) machine->setInitialState(launched); //### Add a nice animation when the bomb is destroyed - launched->addTransition(this, SIGNAL(bombExploded()),final); + launched->addTransition(this, &Bomb::bombExploded,final); //If the animation is finished, then we move to the final state - launched->addTransition(launched, SIGNAL(animationFinished()), final); + launched->addTransition(launched, &QAnimationState::animationFinished, final); //The machine has finished to be executed, then the boat is dead - connect(machine,SIGNAL(finished()),this, SIGNAL(bombExecutionFinished())); + connect(machine,&QState::finished,this, &Bomb::bombExecutionFinished); machine->start(); |