45 |
45 |
46 // CONSTANTS |
46 // CONSTANTS |
47 const TInt KDivisorFactor = 10000; // integer scaling factor to avoid the |
47 const TInt KDivisorFactor = 10000; // integer scaling factor to avoid the |
48 // use of floating point arithmetic |
48 // use of floating point arithmetic |
49 const TInt KTouchAreaExpansion = 35; // Pixels to grow touchable area |
49 const TInt KTouchAreaExpansion = 35; // Pixels to grow touchable area |
|
50 const TInt KFastZoomMultiplier = 4; // Multiplier to skip some zoom levels |
|
51 // to make zooming faster. Used with double tap. |
50 |
52 |
51 // ============================ MEMBER FUNCTIONS =============================== |
53 // ============================ MEMBER FUNCTIONS =============================== |
52 |
54 |
53 // ----------------------------------------------------------------------------- |
55 // ----------------------------------------------------------------------------- |
54 // CCamZoomPane::CCamZoomPane |
56 // CCamZoomPane::CCamZoomPane |
524 TBool CCamZoomPane::IsZoomAtMinimum() const |
526 TBool CCamZoomPane::IsZoomAtMinimum() const |
525 { |
527 { |
526 PRINT2(_L("Camera =><= CCamZoomPane::IsZoomAtMinimum iCurZoom = %d, iMinZoom = %d"), iCurZoom, iMinZoom); |
528 PRINT2(_L("Camera =><= CCamZoomPane::IsZoomAtMinimum iCurZoom = %d, iMinZoom = %d"), iCurZoom, iMinZoom); |
527 return iCurZoom == iMinZoom; |
529 return iCurZoom == iMinZoom; |
528 } |
530 } |
529 |
531 |
|
532 // ----------------------------------------------------------------------------- |
|
533 // CCamZoomPane::IsZoomAtMaximum |
|
534 // Returns whether the current zoom value is the maximum zoom |
|
535 // ----------------------------------------------------------------------------- |
|
536 // |
|
537 TBool CCamZoomPane::IsZoomAtMaximum() const |
|
538 { |
|
539 PRINT2(_L("Camera =><= CCamZoomPane::IsZoomAtMaximum iCurZoom = %d, iMaxZoom = %d"), iCurZoom, iMaxZoom); |
|
540 return iCurZoom == iMaxZoom; |
|
541 } |
|
542 |
530 // ----------------------------------------------------------------------------- |
543 // ----------------------------------------------------------------------------- |
531 // CCamZoomPane::OkToShowPane |
544 // CCamZoomPane::OkToShowPane |
532 // Returns whether or not the Zoom Pane can currently be shown. |
545 // Returns whether or not the Zoom Pane can currently be shown. |
533 // ----------------------------------------------------------------------------- |
546 // ----------------------------------------------------------------------------- |
534 // |
547 // |
1209 ETouchFeedbackNone : ETouchFeedbackBasic ); |
1222 ETouchFeedbackNone : ETouchFeedbackBasic ); |
1210 } |
1223 } |
1211 PRINT( _L( "Camera <= CCamZoomPane::Touchfeedback" ) ); |
1224 PRINT( _L( "Camera <= CCamZoomPane::Touchfeedback" ) ); |
1212 } |
1225 } |
1213 |
1226 |
|
1227 // ----------------------------------------------------------------------------- |
|
1228 // CCamZoomPane::ZoomToMinimum |
|
1229 // Zooms out to min zoom level. Should be stopped by StopZoom(), if needed |
|
1230 // ----------------------------------------------------------------------------- |
|
1231 // |
|
1232 void CCamZoomPane::ZoomToMinimum() |
|
1233 { |
|
1234 iModel->SetZoomMultiplier( KFastZoomMultiplier ); |
|
1235 iModel->ZoomOut(); |
|
1236 } |
|
1237 |
|
1238 // ----------------------------------------------------------------------------- |
|
1239 // CCamZoomPane::ZoomToMaximum |
|
1240 // Zooms in to max zoom level. Should be stopped by StopZoom(), if needed |
|
1241 // ----------------------------------------------------------------------------- |
|
1242 // |
|
1243 void CCamZoomPane::ZoomToMaximum() |
|
1244 { |
|
1245 iModel->SetZoomMultiplier( KFastZoomMultiplier ); |
|
1246 iModel->ZoomIn(); |
|
1247 } |
|
1248 |
1214 // End of File |
1249 // End of File |