photosgallery/slideshow/engine/tsrc/t_cshwzoomandpaneffect/t_cshwzoomandpaneffect.cpp
equal
deleted
inserted
replaced
590 layout.StartZoom( TShwZoomAndPanLayout::EZoomIn, 1 ); |
590 layout.StartZoom( TShwZoomAndPanLayout::EZoomIn, 1 ); |
591 |
591 |
592 // create timer to give us callback |
592 // create timer to give us callback |
593 TShwAutoPtr< CPeriodic > timer = CPeriodic::NewL( CActive::EPriorityStandard ); |
593 TShwAutoPtr< CPeriodic > timer = CPeriodic::NewL( CActive::EPriorityStandard ); |
594 // wait for 1.5 seconds (to be sure the zoom completes) |
594 // wait for 1.5 seconds (to be sure the zoom completes) |
595 timer->Start( |
595 timer->Start(1.5 * 1000000, 1.5 * 1000000, TShwCallBack< |
596 1.5 * 1000000, |
596 T_CShwZoomAndPanEffect, &T_CShwZoomAndPanEffect::CancelAsyncL> ( |
597 1.5 * 1000000, |
597 this)); |
598 TShwCallBack< T_CShwZoomAndPanEffect, CancelAsyncL >( this ) ); |
|
599 // start async wait |
598 // start async wait |
600 iAsyncWait.Start(); |
599 iAsyncWait.Start(); |
601 |
600 |
602 // reset info |
601 // reset info |
603 info.iPosition.iX = -1;info.iPosition.iY = -1; |
602 info.iPosition.iX = -1;info.iPosition.iY = -1; |
618 // perform zoom out in one second |
617 // perform zoom out in one second |
619 layout.StartZoom( TShwZoomAndPanLayout::EZoomOut, 1 ); |
618 layout.StartZoom( TShwZoomAndPanLayout::EZoomOut, 1 ); |
620 // cancel old timer |
619 // cancel old timer |
621 timer->Cancel(); |
620 timer->Cancel(); |
622 // wait for 1.5 seconds (to be sure the zoom completes) |
621 // wait for 1.5 seconds (to be sure the zoom completes) |
623 timer->Start( |
622 timer->Start(1.5 * 1000000, 1.5 * 1000000, TShwCallBack< |
624 1.5 * 1000000, |
623 T_CShwZoomAndPanEffect, &T_CShwZoomAndPanEffect::CancelAsyncL> ( |
625 1.5 * 1000000, |
624 this)); |
626 TShwCallBack< T_CShwZoomAndPanEffect, CancelAsyncL >( this ) ); |
|
627 // start async wait |
625 // start async wait |
628 iAsyncWait.Start(); |
626 iAsyncWait.Start(); |
629 |
627 |
630 // reset info |
628 // reset info |
631 info.iPosition.iX = -1;info.iPosition.iY = -1; |
629 info.iPosition.iX = -1;info.iPosition.iY = -1; |
680 // next pause the effect |
678 // next pause the effect |
681 iCShwZoomAndPanEffect->PauseL(); |
679 iCShwZoomAndPanEffect->PauseL(); |
682 // create timer to give us callback |
680 // create timer to give us callback |
683 TShwAutoPtr< CPeriodic > timer = CPeriodic::NewL( CActive::EPriorityStandard ); |
681 TShwAutoPtr< CPeriodic > timer = CPeriodic::NewL( CActive::EPriorityStandard ); |
684 // start asynch wait for 1.5 second |
682 // start asynch wait for 1.5 second |
685 timer->Start( |
683 timer->Start(1.5 * 1000000, 1.5 * 1000000, TShwCallBack< |
686 1.5 * 1000000, |
684 T_CShwZoomAndPanEffect, &T_CShwZoomAndPanEffect::CancelAsyncL> ( |
687 1.5 * 1000000, |
685 this)); |
688 TShwCallBack< T_CShwZoomAndPanEffect, CancelAsyncL >( this ) ); |
|
689 // start async wait |
686 // start async wait |
690 iAsyncWait.Start(); |
687 iAsyncWait.Start(); |
691 // cancel the timer |
688 // cancel the timer |
692 timer->Cancel(); |
689 timer->Cancel(); |
693 |
690 |
714 |
711 |
715 // resume the effect |
712 // resume the effect |
716 iCShwZoomAndPanEffect->Resume(); |
713 iCShwZoomAndPanEffect->Resume(); |
717 |
714 |
718 // start timer for 1.5 seconds |
715 // start timer for 1.5 seconds |
719 timer->Start( |
716 timer->Start(1.5 * 1000000, 1.5 * 1000000, TShwCallBack< |
720 1.5 * 1000000, |
717 T_CShwZoomAndPanEffect, &T_CShwZoomAndPanEffect::CancelAsyncL> ( |
721 1.5 * 1000000, |
718 this)); |
722 TShwCallBack< T_CShwZoomAndPanEffect, CancelAsyncL >( this ) ); |
|
723 // start async wait |
719 // start async wait |
724 iAsyncWait.Start(); |
720 iAsyncWait.Start(); |
725 // cancel the timer |
721 // cancel the timer |
726 timer->Cancel(); |
722 timer->Cancel(); |
727 |
723 |
753 info.iSize.iX = -1; info.iSize.iY = -1; |
749 info.iSize.iX = -1; info.iSize.iY = -1; |
754 info.iOpacity = -1; |
750 info.iOpacity = -1; |
755 // run the layout to get values |
751 // run the layout to get values |
756 layout->SetLayoutValues( info ); |
752 layout->SetLayoutValues( info ); |
757 // start timer for .1 seconds, to make sure opacity does not run too fast |
753 // start timer for .1 seconds, to make sure opacity does not run too fast |
758 timer->Start( |
754 timer->Start(0.1 * 1000000, 0.1 * 1000000, TShwCallBack< |
759 0.1 * 1000000, |
755 T_CShwZoomAndPanEffect, &T_CShwZoomAndPanEffect::CancelAsyncL> ( |
760 0.1 * 1000000, |
756 this)); |
761 TShwCallBack< T_CShwZoomAndPanEffect, CancelAsyncL >( this ) ); |
|
762 // start async wait |
757 // start async wait |
763 iAsyncWait.Start(); |
758 iAsyncWait.Start(); |
764 // cancel the timer |
759 // cancel the timer |
765 timer->Cancel(); |
760 timer->Cancel(); |
766 |
761 |
781 // pause the effect |
776 // pause the effect |
782 iCShwZoomAndPanEffect->PauseL(); |
777 iCShwZoomAndPanEffect->PauseL(); |
783 // run the layout to get values |
778 // run the layout to get values |
784 layout->SetLayoutValues( info2 ); |
779 layout->SetLayoutValues( info2 ); |
785 // start timer for 1.0 seconds |
780 // start timer for 1.0 seconds |
786 timer->Start( |
781 timer->Start(1.0 * 1000000, 1.0 * 1000000, TShwCallBack< |
787 1.0 * 1000000, |
782 T_CShwZoomAndPanEffect, &T_CShwZoomAndPanEffect::CancelAsyncL> ( |
788 1.0 * 1000000, |
783 this)); |
789 TShwCallBack< T_CShwZoomAndPanEffect, CancelAsyncL >( this ) ); |
|
790 // start async wait |
784 // start async wait |
791 iAsyncWait.Start(); |
785 iAsyncWait.Start(); |
792 // cancel the timer |
786 // cancel the timer |
793 timer->Cancel(); |
787 timer->Cancel(); |
794 TGlxLayoutInfoResetter info3; |
788 TGlxLayoutInfoResetter info3; |
811 TReal2TInt( info2.iPosition.iY ), TReal2TInt( info3.iPosition.iY ), "position y" ); |
805 TReal2TInt( info2.iPosition.iY ), TReal2TInt( info3.iPosition.iY ), "position y" ); |
812 |
806 |
813 // now do the resume |
807 // now do the resume |
814 iCShwZoomAndPanEffect->Resume(); |
808 iCShwZoomAndPanEffect->Resume(); |
815 // start timer for 1.0 seconds |
809 // start timer for 1.0 seconds |
816 timer->Start( |
810 timer->Start(1.0 * 1000000, 1.0 * 1000000, TShwCallBack< |
817 1.0 * 1000000, |
811 T_CShwZoomAndPanEffect, &T_CShwZoomAndPanEffect::CancelAsyncL> ( |
818 1.0 * 1000000, |
812 this)); |
819 TShwCallBack< T_CShwZoomAndPanEffect, CancelAsyncL >( this ) ); |
|
820 // start async wait |
813 // start async wait |
821 iAsyncWait.Start(); |
814 iAsyncWait.Start(); |
822 // cancel the timer |
815 // cancel the timer |
823 timer->Cancel(); |
816 timer->Cancel(); |
824 |
817 |