|
1 /* |
|
2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Zoom popup definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_VTUIZOOMPOPUP_H |
|
20 #define C_VTUIZOOMPOPUP_H |
|
21 |
|
22 #include "tvtuicomponentstate.h" |
|
23 #include "cvtuipopupbase.h" |
|
24 |
|
25 class CVtUiFeatureManager; |
|
26 class MVtEngMedia; |
|
27 |
|
28 /** |
|
29 * CVtUiZoomPopup |
|
30 * |
|
31 * Zoom popup definition. |
|
32 * |
|
33 * @since S60 v3.2 |
|
34 */ |
|
35 class CVtUiZoomPopup : public CVtUiPopupBase |
|
36 { |
|
37 |
|
38 public: |
|
39 |
|
40 /** |
|
41 * Static constructor |
|
42 * @param aFeatureManager Reference to feature manager. |
|
43 */ |
|
44 static CVtUiZoomPopup* NewL( CVtUiFeatureManager& aFeatureManager ); |
|
45 |
|
46 /** |
|
47 * Destructor |
|
48 */ |
|
49 ~CVtUiZoomPopup(); |
|
50 |
|
51 /** |
|
52 * Refresh zoom popup status. |
|
53 */ |
|
54 void RefreshL(); |
|
55 |
|
56 private: // from CVtUiPopupBase |
|
57 |
|
58 /** |
|
59 * @see CVtUiPopupBase::DoActivateL |
|
60 */ |
|
61 void DoActivateL(); |
|
62 |
|
63 private: // from base class |
|
64 |
|
65 /** |
|
66 * @see CVtUiPopupBase::OfferKeyEventL |
|
67 */ |
|
68 TKeyResponse OfferKeyEventL( const TKeyEvent& aEvent, |
|
69 TEventCode aCode ); |
|
70 |
|
71 /** |
|
72 * @see CVtUiPopupBase::HandleControlEventL |
|
73 */ |
|
74 void HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType ); |
|
75 |
|
76 private: |
|
77 |
|
78 /** |
|
79 * Constructor |
|
80 */ |
|
81 CVtUiZoomPopup( CVtUiFeatureManager& aFeatureManager ); |
|
82 |
|
83 /* |
|
84 * 2nd constructor |
|
85 */ |
|
86 void ConstructL(); |
|
87 |
|
88 /* |
|
89 * Updates zoom adjust range according to current active provider. |
|
90 */ |
|
91 void UpdateAdjustRangeL(); |
|
92 |
|
93 /** |
|
94 * Returns current zoom step or KErrNotFound if an error happens. |
|
95 */ |
|
96 TInt CurrentZoomStep() const; |
|
97 |
|
98 /** |
|
99 * Returns maximum zoom step or KErrNotFound if an error happens. |
|
100 */ |
|
101 TInt MaxZoomStep() const; |
|
102 |
|
103 void ScaleAndSetZoomFactorL( TInt aValue ); |
|
104 |
|
105 private: |
|
106 |
|
107 // Reference to feature manager |
|
108 CVtUiFeatureManager& iFeatureManager; |
|
109 |
|
110 // Engine media |
|
111 MVtEngMedia& iMedia; |
|
112 |
|
113 // Current zoom |
|
114 TInt iCurrent; |
|
115 |
|
116 // Maximum zoom value |
|
117 TInt iMax; |
|
118 |
|
119 }; |
|
120 |
|
121 #endif // C_VTUIZOOMPOPUP_H |