QTfrontend/hwform.cpp
changeset 7860 a90936219ffa
parent 7842 d1c0e4341165
child 7902 a82b1bf2eca1
equal deleted inserted replaced
7858:2566fc2621d4 7860:a90936219ffa
   691         animationOldOpacity->setStartValue(1);
   691         animationOldOpacity->setStartValue(1);
   692         animationOldOpacity->setEndValue(0.01);
   692         animationOldOpacity->setEndValue(0.01);
   693         animationOldOpacity->setEasingCurve(QEasingCurve::OutExpo);
   693         animationOldOpacity->setEasingCurve(QEasingCurve::OutExpo);
   694 #endif
   694 #endif
   695 
   695 
   696         QParallelAnimationGroup *group = new QParallelAnimationGroup;
   696         // let's hide the old slide after its animation has finished
   697         group->addAnimation(animationOldSlide);
       
   698         group->addAnimation(animationNewSlide);
       
   699 #ifdef false
       
   700         group->addAnimation(animationOldOpacity);
       
   701         group->addAnimation(animationNewOpacity);
       
   702 #endif
       
   703 
       
   704         connect(animationOldSlide, SIGNAL(finished()), ui.Pages->widget(lastid), SLOT(hide()));
   697         connect(animationOldSlide, SIGNAL(finished()), ui.Pages->widget(lastid), SLOT(hide()));
   705         group->start();
   698 
       
   699         // start animations
       
   700         animationOldSlide->start(QAbstractAnimation::DeleteWhenStopped);
       
   701         animationNewSlide->start(QAbstractAnimation::DeleteWhenStopped);
   706 
   702 
   707     	/* this is for the situation when the animation below is interrupted by a new animation.  For some reason, finished is not being fired */ 	
   703     	/* this is for the situation when the animation below is interrupted by a new animation.  For some reason, finished is not being fired */ 	
   708     	for(int i=0;i<MAX_PAGE;i++) if (i!=id && i!=lastid) ui.Pages->widget(i)->hide();
   704     	for(int i=0;i<MAX_PAGE;i++) if (i!=id && i!=lastid) ui.Pages->widget(i)->hide();
   709     }
   705     }
   710 #endif
   706 #endif
   805         animationNewOpacity->setStartValue(0.01);
   801         animationNewOpacity->setStartValue(0.01);
   806         animationNewOpacity->setEndValue(1);
   802         animationNewOpacity->setEndValue(1);
   807         animationNewOpacity->setEasingCurve(QEasingCurve::OutExpo);
   803         animationNewOpacity->setEasingCurve(QEasingCurve::OutExpo);
   808 #endif
   804 #endif
   809 
   805 
   810         QParallelAnimationGroup *group = new QParallelAnimationGroup;
   806         // let's hide the old slide after its animation has finished
   811         group->addAnimation(animationOldSlide);
       
   812         group->addAnimation(animationNewSlide);
       
   813 #ifdef false
       
   814         group->addAnimation(animationOldOpacity);
       
   815         group->addAnimation(animationNewOpacity);
       
   816 #endif
       
   817 
       
   818         connect(animationNewSlide, SIGNAL(finished()), ui.Pages->widget(curid), SLOT(hide()));
   807         connect(animationNewSlide, SIGNAL(finished()), ui.Pages->widget(curid), SLOT(hide()));
   819         group->start();
   808 
       
   809         // start animations
       
   810         animationOldSlide->start(QAbstractAnimation::DeleteWhenStopped);
       
   811         animationNewSlide->start(QAbstractAnimation::DeleteWhenStopped);
   820     }
   812     }
   821 #endif
   813 #endif
   822 
   814 
   823     if (stopAnim)
   815     if (stopAnim)
   824         ui.Pages->widget(curid)->hide();
   816         ui.Pages->widget(curid)->hide();