photosgallery/viewframework/views/zoomview/src/glxzoomeventhandler.cpp
branchRCL_3
changeset 32 78ad99c24f08
parent 30 a60acebbbd9d
child 35 420f6808bf21
equal deleted inserted replaced
30:a60acebbbd9d 32:78ad99c24f08
   251     {
   251     {
   252     TRACER("CGlxZoomPanEventHandler::StartPanTimer ");
   252     TRACER("CGlxZoomPanEventHandler::StartPanTimer ");
   253 
   253 
   254     //After Panning in one direction for a long time by holding the key and 
   254     //After Panning in one direction for a long time by holding the key and 
   255     //then if panning is started in another direction,the panning will be done in more pixels.
   255     //then if panning is started in another direction,the panning will be done in more pixels.
   256     iPanTime.HomeTime();
       
   257     
   256     
   258     GLX_LOG_INFO("CGlxZoomPanEventHandler::StartPanTimer: Cancelling timers ");
   257     GLX_LOG_INFO("CGlxZoomPanEventHandler::StartPanTimer: Cancelling timers ");
   259 
   258 
   260     if (iZoomPanTimer->IsActive())
   259     if (iZoomPanTimer->IsActive())
   261         {
   260         {
   828     if ( atPanThreshold )
   827     if ( atPanThreshold )
   829         {
   828         {
   830         CancelZoomPanTimer();
   829         CancelZoomPanTimer();
   831         }
   830         }
   832     
   831     
   833     iMathsEngine.UpdatePanFactor(iPanTime);
   832     iMathsEngine.UpdatePanFactor();
   834     }
   833     }
   835 
   834 
   836 
   835 
   837 //----------------------------------------------------------------------------------
   836 //----------------------------------------------------------------------------------
   838 // OrientationChanged 
   837 // OrientationChanged 
   840 //    
   839 //    
   841 void CGlxZoomPanEventHandler::OrientationChanged(const TRect& aNewScreenRect)
   840 void CGlxZoomPanEventHandler::OrientationChanged(const TRect& aNewScreenRect)
   842     {
   841     {
   843     TRACER("CGlxZoomPanEventHandler::OrientationChanged ");
   842     TRACER("CGlxZoomPanEventHandler::OrientationChanged ");
   844     
   843     
   845     iMathsEngine.OrientationChanged(aNewScreenRect); // Needs to be called before Call to Zoom() inorder to Update the iScreenSize.
   844     iMathsEngine.OrientationChanged(aNewScreenRect);
   846     
   845     iMinZoomRatio = iMathsEngine.MinimumZoomRatio(); 
   847     Zoom(0, 0, iZoomMode) ;
   846     Zoom(0, 0, iZoomMode) ;
   848     }
   847     }
   849 
   848 
   850 // -----------------------------------------------------------------------------
   849 // -----------------------------------------------------------------------------
   851 // ShowSlider
   850 // ShowSlider
  1121             viewPortTopLeft, 
  1120             viewPortTopLeft, 
  1122             viewPortDimension, 
  1121             viewPortDimension, 
  1123             &atZoomThreshold,
  1122             &atZoomThreshold,
  1124             aZoomFocus, 
  1123             aZoomFocus, 
  1125             aRelativeZoomFactor);
  1124             aRelativeZoomFactor);
  1126     
  1125 
       
  1126     if( atZoomThreshold )
       
  1127         {
       
  1128         CancelZoomPanTimer();
       
  1129         if (iZoomRatio <= iMinZoomRatio)
       
  1130             {
       
  1131             CallZoomOutL();
       
  1132             return;
       
  1133             }
       
  1134         }
  1127     iZoomEventHandler.HandleViewPortParametersChanged(viewPortTopLeft, 0, 
  1135     iZoomEventHandler.HandleViewPortParametersChanged(viewPortTopLeft, 0, 
  1128             &viewPortDimension, iZoomRatio);
  1136             &viewPortDimension, iZoomRatio);
  1129     
       
  1130     if( atZoomThreshold )
       
  1131         {
       
  1132         CancelZoomPanTimer();
       
  1133         if (iZoomRatio <= iMinZoomRatio)
       
  1134             {
       
  1135             CallZoomOutL();
       
  1136             }
       
  1137         }
       
  1138     }
  1137     }
  1139 
  1138 
  1140 // -----------------------------------------------------------------------------
  1139 // -----------------------------------------------------------------------------
  1141 // ZoomIsActivated
  1140 // ZoomIsActivated
  1142 // -----------------------------------------------------------------------------
  1141 // -----------------------------------------------------------------------------