logsui/logsapp/tsrc/ut_logsapp/src/ut_logseffecthandler.cpp
changeset 16 c5af8598d22c
parent 11 64a47b97e1e1
child 21 2f0af9ba7665
equal deleted inserted replaced
14:f27aebe284bb 16:c5af8598d22c
    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