13 * |
13 * |
14 * Description: Setting item list class for Video settings list view.* |
14 * Description: Setting item list class for Video settings list view.* |
15 */ |
15 */ |
16 |
16 |
17 |
17 |
18 // Version : %version: 6 % |
18 // Version : %version: 7 % |
19 |
19 |
20 |
20 |
21 |
21 |
22 |
22 |
23 #ifndef MPSETTINGSVIDEOSETTINGITEMLIST_H |
23 #ifndef MPSETTINGSVIDEOSETTINGITEMLIST_H |
24 #define MPSETTINGSVIDEOSETTINGITEMLIST_H |
24 #define MPSETTINGSVIDEOSETTINGITEMLIST_H |
25 |
25 |
26 // INCLUDES |
26 // INCLUDES |
27 #include <aknsettingitemlist.h> |
27 #include <aknsettingitemlist.h> |
28 #include "videosettingsdrivemonitor.h" |
|
29 #include "mvideosettingsdrivemonitorobserver.h" |
|
30 |
28 |
31 // CONSTANTS |
29 // CONSTANTS |
32 // VideoCenter SIS package UID |
|
33 const TUid KSisUid = { 0x200159B2 }; |
|
34 |
|
35 // formatting string for version number |
|
36 _LIT( KVersionNumberFormat, "%d.%d(%d)" ); |
|
37 |
|
38 // Max length of the above version number string, whose format is |
|
39 // major.minor(build). Header e32cmn.h states that their ranges are: |
|
40 // 1. the major version number, ranging from 0 to 127, inclusive |
|
41 // 2. the minor version number, ranging from 0 to 99 inclusive |
|
42 // 3. the build number, ranging from 0 to 32767 inclusive. |
|
43 // Which makes the total max length 3+1+2+1+5+1 = 13 |
|
44 const TInt KMaxVersionNumberLength( 13 ); |
|
45 |
30 |
46 |
31 |
47 // When video contrast is not drawn, we know to shift the contents |
32 // When video contrast is not drawn, we know to shift the contents |
48 const TInt KVideoContrastNotSupported ( -99 ); |
33 const TInt KVideoContrastNotSupported ( -99 ); |
49 |
34 |
50 // FORWARD DECLARATIONS |
35 // FORWARD DECLARATIONS |
51 class CMPSettingsModelForROP; |
36 class CMPSettingsModelForROP; |
52 class CVcxNsSettingsEngine; |
37 class CVcxNsSettingsEngine; |
53 class TIptvDriveMonitorEvent; |
|
54 |
38 |
55 // CLASS DECLARATION |
39 // CLASS DECLARATION |
56 |
40 |
57 /** |
41 /** |
58 * CMPSettingsVideoSettingItemList |
42 * CMPSettingsVideoSettingItemList |
59 * Setting item list class for Video settings list view. |
43 * Setting item list class for Video settings list view. |
60 * |
44 * |
61 * @lib MediaSettings.app |
45 * @lib MediaSettings.app |
62 * @since 2.0 |
46 * @since 2.0 |
63 */ |
47 */ |
64 class CMPSettingsVideoSettingItemList : public CAknSettingItemList, |
48 class CMPSettingsVideoSettingItemList : public CAknSettingItemList |
65 public MIptvDriveMonitorObserver |
|
66 { |
49 { |
67 public: // Constructors and destructor |
50 public: // Constructors and destructor |
68 |
51 |
69 /** |
52 /** |
70 * Setting listbox's item idexes |
53 * Setting listbox's item idexes |
89 * Destructor. |
72 * Destructor. |
90 */ |
73 */ |
91 virtual ~CMPSettingsVideoSettingItemList(); |
74 virtual ~CMPSettingsVideoSettingItemList(); |
92 |
75 |
93 public: |
76 public: |
94 |
77 |
95 /** |
|
96 * Edits thumbnail setting item. |
|
97 * |
|
98 * @param itemIndex Setting list index. |
|
99 * @param aCalledFromMenu ETrue if started from menu. |
|
100 */ |
|
101 void EditThumbnailItemL( TInt itemIndex, TBool aCalledFromMenu ); |
|
102 |
|
103 /** |
|
104 * Edits parent control settting item. |
|
105 * |
|
106 * @param itemIndex Setting list index. |
|
107 * @param aCalledFromMenu ETrue if started from menu. |
|
108 */ |
|
109 void EditParentControlItemL( TInt itemIndex, TBool aCalledFromMenu ); |
|
110 |
|
111 /** |
|
112 * Edits preferred memory settting item. |
|
113 * |
|
114 * @param itemIndex Setting list index. |
|
115 * @param aCalledFromMenu ETrue if started from menu. |
|
116 */ |
|
117 void EditPreferredMemoryItemL( TInt itemIndex, TBool aCalledFromMenu ); |
|
118 |
|
119 /** |
78 /** |
120 * Check if specified item is currently selected. |
79 * Check if specified item is currently selected. |
121 * |
80 * |
122 * @param aIndex Item index |
81 * @param aIndex Item index |
123 */ |
82 */ |
124 TBool IsCurrentItem( TInt aIndex ); |
83 TBool IsCurrentItem( TInt aIndex ); |
|
84 |
|
85 /** |
|
86 * Check wheter or not the Contrast settings item shold be drawn |
|
87 */ |
|
88 TBool VideoContrastIsSupportedL(); |
125 |
89 |
126 public: // Functions from base classes |
90 public: // Functions from base classes |
127 |
91 |
128 /** |
92 /** |
129 * From CAknSettingItemList |
93 * From CAknSettingItemList |
180 * @since 2.0 |
134 * @since 2.0 |
181 */ |
135 */ |
182 void LoadAllL(); |
136 void LoadAllL(); |
183 |
137 |
184 /** |
138 /** |
185 * Updates version number item to settings list. |
|
186 */ |
|
187 void UpdateVersionNumberTextL(); |
|
188 |
|
189 /** |
|
190 * Updates text of "parent control" setting item. |
|
191 */ |
|
192 void UpdateParentControlTextL(); |
|
193 |
|
194 /** |
|
195 * Fetch current parent control age and return corresponding index. |
|
196 * |
|
197 * @return Parent control age. |
|
198 */ |
|
199 TInt GetCurrentParentControl(); |
|
200 |
|
201 /** |
|
202 * Convert and save parent control index as age. |
|
203 * |
|
204 * @param aParentControlIndex Index of parent control selection. |
|
205 */ |
|
206 void SetCurrentParentControl( TInt aParentControlIndex ); |
|
207 |
|
208 /** |
|
209 * Updates text of "memory" setting item. |
|
210 */ |
|
211 void UpdateMemoryItemTextL(); |
|
212 |
|
213 /** |
|
214 * Adds phone memory descriptor to arrays. |
|
215 * |
|
216 * @param aIndex index in enumeration list. |
|
217 * @param aEnumeratedTextArray |
|
218 * @param aPoppedUpTextArray |
|
219 */ |
|
220 void AddPhoneMemoryDesToArraysL( TInt aIndex, |
|
221 CArrayPtrFlat<CAknEnumeratedText>& aEnumeratedTextArray, |
|
222 CArrayPtr<HBufC>& aPoppedUpTextArray ); |
|
223 |
|
224 /** |
|
225 * Adds memory card descriptor to arrays. |
|
226 * |
|
227 * @param aIndex index in enumeration list. |
|
228 * @param aEnumeratedTextArray |
|
229 * @param aPoppedUpTextArray |
|
230 */ |
|
231 void AddMemoryCardDesToArraysL( TInt aIndex, |
|
232 CArrayPtrFlat<CAknEnumeratedText>& aEnumeratedTextArray, |
|
233 CArrayPtr<HBufC>& aPoppedUpTextArray ); |
|
234 /** |
|
235 * Adds locked memory card descriptor to arrays. |
|
236 * |
|
237 * @param aIndex index in enumeration list. |
|
238 * @param aEnumeratedTextArray |
|
239 * @param aPoppedUpTextArray |
|
240 */ |
|
241 void AddLockedMemoryCardDesToArraysL( TInt aIndex, |
|
242 CArrayPtrFlat<CAknEnumeratedText>& aEnumeratedTextArray, |
|
243 CArrayPtr<HBufC>& aPoppedUpTextArray ); |
|
244 |
|
245 /** |
|
246 * Adds hard disk descriptor to arrays. |
|
247 * |
|
248 * @param aIndex index in enumeration list. |
|
249 * @param aEnumeratedTextArray |
|
250 * @param aPoppedUpTextArray |
|
251 */ |
|
252 void AddHardDiskDesToArraysL( TInt aIndex, |
|
253 CArrayPtrFlat<CAknEnumeratedText>& aEnumeratedTextArray, |
|
254 CArrayPtr<HBufC>& aPoppedUpTextArray ); |
|
255 |
|
256 /** |
|
257 * Adds descriptor to arrays. |
|
258 * |
|
259 * @param aIndex index in enumeration list. |
|
260 * @param aText Descriptor to add. Ownership moves. |
|
261 * @param aEnumeratedTextArray |
|
262 * @param aPoppedUpTextArray |
|
263 */ |
|
264 void AddDesToArraysL( TInt aIndex, |
|
265 HBufC* aText, |
|
266 CArrayPtrFlat<CAknEnumeratedText>& aEnumeratedTextArray, |
|
267 CArrayPtr<HBufC>& aPoppedUpTextArray ); |
|
268 |
|
269 /** |
|
270 * Check wheter or not the Contrast settings item shold be drawn |
|
271 */ |
|
272 TBool VideoContrastIsSupportedL(); |
|
273 |
|
274 /** |
|
275 * Event handling section, from MEikListBoxObserver. |
139 * Event handling section, from MEikListBoxObserver. |
276 */ |
140 */ |
277 void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aListBoxEvent); |
141 void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aListBoxEvent); |
278 |
142 |
279 private: |
143 private: |
280 CMPSettingsModelForROP* iModel; |
144 CMPSettingsModelForROP* iModel; |
281 CVcxNsSettingsEngine& iVideoSettingsEngine; // Video settings engine |
145 CVcxNsSettingsEngine& iVideoSettingsEngine; // Video settings engine |
282 |
146 |
283 CVideoSettingsDriveMonitor* iDriveMonitor; // Drive monitor |
|
284 |
|
285 TBuf< KMaxVersionNumberLength > iSettingVersionText; // version text |
|
286 CAknTextSettingItem* iSettingIadUpdateItem; // IAD update setting item |
|
287 |
|
288 CAknEnumeratedTextPopupSettingItem* iSettingThumbnailsItem; // Thumbnail setting item |
|
289 TInt iSettingThumbnails; // Selected thumbnail setting value |
|
290 |
|
291 CAknEnumeratedTextPopupSettingItem* iSettingParentControlItem; // Parent control setting item |
|
292 TInt iParentControlIndex; // Selected parent control setting value |
|
293 /** |
|
294 * Is the phone's lock code entered succesfully, |
|
295 * required for editing parent control settings. |
|
296 */ |
|
297 TBool iLockCodeAccepted; |
|
298 |
|
299 CAknEnumeratedTextPopupSettingItem* iSettingMemoryItem; // Memory setting item |
|
300 TInt iSettingMemory; // Selected memory setting value |
|
301 |
|
302 CAknEnumeratedTextPopupSettingItem* iSettingServiceItem; // Service selection item |
|
303 TInt iSettingTemp; // Dummy setting placeholder for settings sublist items |
147 TInt iSettingTemp; // Dummy setting placeholder for settings sublist items |
304 |
148 |
305 TInt iVideoContrast; |
149 TInt iVideoContrast; |
306 TBool iVideoRepeatMode; |
150 TBool iVideoRepeatMode; |
307 TBool iVideoDefaultViewMode; |
151 TBool iVideoDefaultViewMode; |