81 QVERIFY( mEffect->mMoveGroup->state() == QAbstractAnimation::Running ); |
81 QVERIFY( mEffect->mMoveGroup->state() == QAbstractAnimation::Running ); |
82 QVERIFY( mEffect->mMoveGroup2->state() == QAbstractAnimation::Running ); |
82 QVERIFY( mEffect->mMoveGroup2->state() == QAbstractAnimation::Running ); |
83 |
83 |
84 // Simulate animation progess, when dissappearing has completed effecthandler |
84 // Simulate animation progess, when dissappearing has completed effecthandler |
85 // sends signal, other progress in anim does not cause signal to be sent |
85 // sends signal, other progress in anim does not cause signal to be sent |
86 QSignalSpy spy(mEffect, SIGNAL(dissappearByMovingComplete())); |
86 QSignalSpy spyDissappearCompletion(mEffect, SIGNAL(dissappearByMovingComplete())); |
|
87 QSignalSpy spyAppearStarting(mEffect, SIGNAL(appearStarting())); |
87 mEffect->moveAnimationChanged(mEffect->mMoveGroup->animationAt(1)); |
88 mEffect->moveAnimationChanged(mEffect->mMoveGroup->animationAt(1)); |
88 QVERIFY(spy.count() == 1 ); |
89 QVERIFY(spyDissappearCompletion.count() == 1 ); |
|
90 QVERIFY(spyAppearStarting.count() == 0 ); |
|
91 mEffect->moveAnimationChanged(mEffect->mMoveGroup->animationAt(2)); |
|
92 QVERIFY(spyDissappearCompletion.count() == 1 ); |
|
93 QVERIFY(spyAppearStarting.count() == 1 ); |
89 mEffect->moveAnimationChanged(0); |
94 mEffect->moveAnimationChanged(0); |
90 QVERIFY(spy.count() == 1 ); |
95 QVERIFY(spyDissappearCompletion.count() == 1 ); |
|
96 QVERIFY(spyAppearStarting.count() == 1 ); |
91 |
97 |
92 // When effect is running and new effect is requested, previous effect is stopped |
98 // When effect is running and new effect is requested, previous effect is stopped |
93 mEffect->startDissappearAppearByMovingEffect(*mLabel, *mLabel2, true, 0, 0); |
99 mEffect->startDissappearAppearByMovingEffect(*mLabel, *mLabel2, true, 0, 0); |
94 } |
100 } |
95 |
101 |