|
1 /* |
|
2 * Copyright (c) 2006 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 the License "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: Video on Demand setting item class for dowload time selection.* |
|
15 */ |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CVCXNSSCHEDULESETTINGSDLTIMEITEM_H |
|
21 #define CVCXNSSCHEDULESETTINGSDLTIMEITEM_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <aknsettingitemlist.h> |
|
25 #include <akncheckboxsettingpage.h> |
|
26 |
|
27 // CLASS DECLARATION |
|
28 |
|
29 /** |
|
30 * |
|
31 * Video on Demand setting item for download time. |
|
32 * |
|
33 */ |
|
34 class CVcxNsScheduleSettingsDlTimeItem : public CAknSettingItem |
|
35 { |
|
36 public: // constructors and destructor |
|
37 |
|
38 /** |
|
39 * C++ constructor. |
|
40 * |
|
41 * @param aIdentifier Resource identifier. |
|
42 * @param aDlTimes Download times. |
|
43 */ |
|
44 CVcxNsScheduleSettingsDlTimeItem( TInt aIdentifier, |
|
45 TUint& aDlTimes ); |
|
46 |
|
47 /** |
|
48 * Destructor |
|
49 */ |
|
50 virtual ~CVcxNsScheduleSettingsDlTimeItem(); |
|
51 |
|
52 public: // From CAknSettingItem |
|
53 |
|
54 /** |
|
55 * Load setting from given external variable. |
|
56 */ |
|
57 void LoadL(); |
|
58 |
|
59 /** |
|
60 * Store current setting to given external variable. |
|
61 */ |
|
62 void StoreL(); |
|
63 |
|
64 public: // New methods |
|
65 |
|
66 /** |
|
67 * Generates the popup array for download time selections. |
|
68 * |
|
69 */ |
|
70 void InitializePopupArrayL(); |
|
71 |
|
72 /** |
|
73 * Populates the popup array with correct values. |
|
74 * |
|
75 */ |
|
76 void PopulatePopupArrayL(); |
|
77 |
|
78 /** |
|
79 * Saves the current selected download times from popup array. |
|
80 * |
|
81 */ |
|
82 void SaveSelectionsL(); |
|
83 |
|
84 private: // From CAknSettingItem |
|
85 |
|
86 /** |
|
87 * Completes construction of setting item. |
|
88 * |
|
89 */ |
|
90 void CompleteConstructionL(); |
|
91 |
|
92 /** |
|
93 * Opens item for editing. |
|
94 * |
|
95 * @param aCalledFromMenu Is iten called from menu. |
|
96 */ |
|
97 void EditItemL( TBool aCalledFromMenu ); |
|
98 |
|
99 /** |
|
100 * Called to get text for this setting item. |
|
101 * |
|
102 * @return Text for this setting item. |
|
103 */ |
|
104 const TDesC& SettingTextL(); |
|
105 |
|
106 private: // From MAknSettingPageObserver |
|
107 |
|
108 /** |
|
109 * Called on setting page events |
|
110 * (when editing). |
|
111 * |
|
112 * @param aSettingPage Setting page to be observed. |
|
113 * @param aEventType Event type. |
|
114 */ |
|
115 void HandleSettingPageEventL( CAknSettingPage* aSettingPage, |
|
116 TAknSettingPageEvent aEventType ); |
|
117 |
|
118 private: |
|
119 |
|
120 /** |
|
121 * Popup array for for download time selection. |
|
122 */ |
|
123 CSelectionItemList iPopupArray; |
|
124 |
|
125 /** |
|
126 * Text for this setting item. |
|
127 * Own. |
|
128 */ |
|
129 HBufC* iSettingText; |
|
130 |
|
131 /** |
|
132 * Number of selected items. |
|
133 */ |
|
134 TInt iSelectedItems; |
|
135 |
|
136 /** |
|
137 * Combined internal download times. |
|
138 */ |
|
139 TUint iDownloadTimes; |
|
140 |
|
141 /** |
|
142 * Combined external download times. |
|
143 */ |
|
144 TUint& iExtDlTimes; |
|
145 }; |
|
146 |
|
147 #endif /* CVCXNSSCHEDULESETTINGSDLTIMEITEM_H */ |
|
148 |
|
149 // End of File |