|
1 /* |
|
2 * Copyright (c) 2010 Ixonos Plc. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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 * Ixonos Plc |
|
14 * |
|
15 * Description: |
|
16 * Navipane control for SVE. |
|
17 * |
|
18 */ |
|
19 |
|
20 #ifndef C_CVEINAVIPANECONTROL_H |
|
21 #define C_CVEINAVIPANECONTROL_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <coecobs.h> // MCoeControlObserver |
|
25 #include "mtimelabelnaviobserver.h" |
|
26 |
|
27 class CEikStatusPane; |
|
28 class CAknNavigationDecorator; |
|
29 class CAknNavigationControlContainer; |
|
30 class CVeiTimeLabelNavi; |
|
31 class CAknVolumeControl; |
|
32 class CPeriodic; |
|
33 class MVeiNaviPaneControlObserver; |
|
34 |
|
35 /** |
|
36 * Navipane control. |
|
37 * |
|
38 * @code |
|
39 * ?good_class_usage_example(s) |
|
40 * @endcode |
|
41 * |
|
42 * @lib internal (VedSimpleCutVideo.exe) |
|
43 * @since S60 v5.0 |
|
44 */ |
|
45 class CVeiNaviPaneControl : public CBase, MCoeControlObserver, |
|
46 MTimeLabelNaviObserver |
|
47 { |
|
48 |
|
49 public: |
|
50 |
|
51 /** |
|
52 * Two-phased constructor. |
|
53 * @param aStatusPane aPointer to app status pane |
|
54 */ |
|
55 static CVeiNaviPaneControl* NewL( CEikStatusPane* aStatusPane ); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 ~CVeiNaviPaneControl(); |
|
61 |
|
62 /** |
|
63 * DrawTimeNaviL |
|
64 * |
|
65 * @since S60 v5.0 |
|
66 * @param aElapsed Elapsed time |
|
67 * @param aTotal Total time |
|
68 */ |
|
69 void DrawTimeNaviL( TTime aElapsed, TTime aTotal ); |
|
70 |
|
71 /** |
|
72 * SetObserver |
|
73 * |
|
74 * @since S60 v5.0 |
|
75 * @param aObserver Navi pane control observer. |
|
76 * See "mveinavipanecontrolobserver.h" |
|
77 */ |
|
78 void SetObserver( MVeiNaviPaneControlObserver* aObserver ) |
|
79 { |
|
80 ASSERT( aObserver ); |
|
81 iObserver = aObserver; |
|
82 }; |
|
83 |
|
84 /** |
|
85 * SetPauseIconVisibilityL |
|
86 * |
|
87 * @since S60 v5.0 |
|
88 * @param aVisible ETrue = visible |
|
89 */ |
|
90 void SetPauseIconVisibilityL( TBool aVisible ); |
|
91 |
|
92 /** |
|
93 * SetVolumeIconVisibilityL |
|
94 * |
|
95 * @since S60 v5.0 |
|
96 * @param aVisible ETrue = visible |
|
97 */ |
|
98 void SetVolumeIconVisibilityL( TBool aVisible ); |
|
99 |
|
100 /** |
|
101 * ShowVolumeLabelL |
|
102 * |
|
103 * @since S60 v5.0 |
|
104 * @param aVolume Volume level |
|
105 */ |
|
106 void ShowVolumeLabelL( TInt aVolume ); |
|
107 |
|
108 /** |
|
109 * HandleResourceChange |
|
110 * |
|
111 * @since S60 v5.0 |
|
112 * @param aType Type of the resource change. |
|
113 */ |
|
114 void HandleResourceChange( TInt aType ); |
|
115 |
|
116 // from base class MCoeControlObserver |
|
117 void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType); |
|
118 |
|
119 // from base class MTimeLabelNaviObserver |
|
120 void HandleNaviEventL(); |
|
121 |
|
122 private: |
|
123 |
|
124 CVeiNaviPaneControl( CEikStatusPane* aStatusPane ); |
|
125 void ConstructL(); |
|
126 |
|
127 // Implementation |
|
128 |
|
129 CAknNavigationDecorator* CreateTimeLabelNaviL(); |
|
130 CVeiTimeLabelNavi* GetTimeLabelControl(); |
|
131 CAknVolumeControl* GetVolumeControl(); |
|
132 static TInt HideVolumeCallbackL(TAny* aPtr); |
|
133 void HideVolume(); |
|
134 |
|
135 private: // data |
|
136 |
|
137 /** |
|
138 * Ref to StatusPane. |
|
139 * Not own. |
|
140 */ |
|
141 CEikStatusPane* iStatusPane; |
|
142 |
|
143 /** |
|
144 * Ref to NaviPane. |
|
145 * Not own. |
|
146 */ |
|
147 CAknNavigationControlContainer* iNaviPane; |
|
148 |
|
149 /** |
|
150 * Time Navi item. |
|
151 * Own. |
|
152 */ |
|
153 CAknNavigationDecorator* iTimeNavi; |
|
154 |
|
155 /** |
|
156 * Volume navi decorator. |
|
157 * Own. |
|
158 */ |
|
159 CAknNavigationDecorator* iVolumeNavi; |
|
160 |
|
161 /** |
|
162 * Volume navi decorator. |
|
163 * Own. |
|
164 */ |
|
165 CPeriodic* iVolumeHider; |
|
166 |
|
167 /** |
|
168 * Ref to observer. |
|
169 * Not own. |
|
170 */ |
|
171 MVeiNaviPaneControlObserver* iObserver; |
|
172 }; |
|
173 |
|
174 |
|
175 #endif // C_CVEINAVIPANECONTROL_H |