author | Pat Downey <patd@symbian.org> |
Wed, 01 Sep 2010 12:22:02 +0100 (2010-09-01) | |
branch | RCL_3 |
changeset 66 | 8b7f4e561641 |
parent 65 | 7333d7932ef7 |
permissions | -rw-r--r-- |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
66 | 2 |
* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
66 | 14 |
* Description: Header file of CIAUpdateSettingDialog class |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
66 | 18 |
|
19 |
||
20 |
||
21 |
#ifndef IAUPDATESETTINGDIALOG_H |
|
22 |
#define IAUPDATESETTINGDIALOG_H |
|
23 |
||
24 |
||
25 |
// INCLUDES |
|
26 |
#include "iaupdatedialogutil.h" |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
27 |
|
66 | 28 |
#include <e32base.h> |
29 |
#include <AknDialog.h> |
|
30 |
#include <aknsettingitemlist.h> |
|
31 |
||
32 |
||
33 |
// FORWARD DECLARATIONS |
|
34 |
class CAknSettingItemList; |
|
35 |
class CIAUpdateSettingItemList; |
|
36 |
class CIAUpdateAccessPointHandler; |
|
37 |
class CIAUpdateStatusPaneHandler; |
|
38 |
||
39 |
||
40 |
// CLASS DECLARATION |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
41 |
|
66 | 42 |
/** |
43 |
* CIAUpdateSettingDialog |
|
44 |
* |
|
45 |
* CIAUpdateSettingDialog is used for editing IA Update settings. |
|
46 |
*/ |
|
47 |
class CIAUpdateSettingDialog : public CAknDialog, public MEikListBoxObserver |
|
48 |
{ |
|
49 |
public: |
|
50 |
enum TAttributeKeys |
|
51 |
{ |
|
52 |
EAccessPoint = 0, |
|
53 |
EAutoUpdateCheck |
|
54 |
}; |
|
55 |
||
56 |
public: |
|
57 |
||
58 |
/** |
|
59 |
* Launches dialog. |
|
60 |
* @param aParam Class that contains dialog parameters. |
|
61 |
* @return Completion code. |
|
62 |
*/ |
|
63 |
static TBool ShowDialogL(); |
|
64 |
||
65 |
||
66 |
public:// Constructors and destructor |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
67 |
|
66 | 68 |
/** |
69 |
* Two-phased constructor. |
|
70 |
*/ |
|
71 |
static CIAUpdateSettingDialog* NewL(); |
|
72 |
||
73 |
/** |
|
74 |
* Destructor. |
|
75 |
*/ |
|
76 |
virtual ~CIAUpdateSettingDialog(); |
|
77 |
||
78 |
private: |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
79 |
|
66 | 80 |
/** |
81 |
* C++ default constructor. |
|
82 |
*/ |
|
83 |
CIAUpdateSettingDialog(); |
|
84 |
||
85 |
/** |
|
86 |
* By default Symbian OS constructor is private. |
|
87 |
*/ |
|
88 |
void ConstructL(); |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
89 |
|
66 | 90 |
private: |
91 |
SEikControlInfo CreateCustomControlL( TInt aControlType ); |
|
92 |
||
93 |
/** |
|
94 |
* From MEikListBoxObserver, called by framework. |
|
95 |
* @param aListBox. |
|
96 |
* @param aEventType. |
|
97 |
* @return None |
|
98 |
*/ |
|
99 |
void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType); |
|
100 |
||
101 |
/** |
|
102 |
* From the base class. |
|
103 |
* Called by framework before the dialog is shown. |
|
104 |
* @param None |
|
105 |
* @return None |
|
106 |
*/ |
|
107 |
void PreLayoutDynInitL(); |
|
108 |
||
109 |
/** |
|
110 |
* From the base class. |
|
111 |
* Called by framework before exiting the dialog. |
|
112 |
* @param aButtonId Button id. |
|
113 |
* @return ETrue to exit\ EFalse to not to exit. |
|
114 |
*/ |
|
115 |
TBool OkToExitL(TInt aButtonId); |
|
116 |
||
117 |
/** |
|
118 |
* From the base class. |
|
119 |
* Called by framework for key event handling. |
|
120 |
* @param aKeyEvent. |
|
121 |
* @param aType. |
|
122 |
* @return Return code. |
|
123 |
*/ |
|
124 |
TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); |
|
125 |
||
126 |
/** |
|
127 |
* From the base class. |
|
128 |
* Called by framework when dialog is activated. |
|
129 |
* @param None. |
|
130 |
* @return None. |
|
131 |
*/ |
|
132 |
void ActivateL(); |
|
133 |
||
134 |
/** |
|
135 |
* Method to get context sensitive help topic. |
|
136 |
* @param aContext Help topic to open. |
|
137 |
* @return None. |
|
138 |
*/ |
|
139 |
void GetHelpContext(TCoeHelpContext& aContext) const; |
|
140 |
||
141 |
/** |
|
142 |
* From the base class. |
|
143 |
* Called by framework before menu is shown. |
|
144 |
* @param aResourceId Menu resource id. |
|
145 |
* @param aMenuPane Pointer to the menu. |
|
146 |
* @return None. |
|
147 |
*/ |
|
148 |
void DynInitMenuPaneL(TInt aResourceID, CEikMenuPane* aMenuPane); |
|
149 |
||
150 |
/** |
|
151 |
* From the base class. |
|
152 |
* Handles menu events. |
|
153 |
* @param aCommandId Command id. |
|
154 |
* @return None. |
|
155 |
*/ |
|
156 |
void ProcessCommandL(TInt aCommandId); |
|
157 |
||
158 |
/** |
|
159 |
* From base class. |
|
160 |
* Called when UI layout changes. |
|
161 |
* @param aType. |
|
162 |
* @return None. |
|
163 |
*/ |
|
164 |
void HandleResourceChange(TInt aType); |
|
165 |
||
166 |
||
167 |
private: |
|
168 |
/** |
|
169 |
* Save settings to CR. |
|
170 |
*/ |
|
171 |
void SaveSettingsL(); |
|
172 |
||
173 |
/** |
|
174 |
* Read settings from CR. |
|
175 |
*/ |
|
176 |
void ReadSettingsL(); |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
177 |
|
66 | 178 |
private: |
179 |
/** |
|
180 |
* Opens setting editor. |
|
181 |
*/ |
|
182 |
void EditItemL(); |
|
183 |
||
184 |
/** |
|
185 |
* Set setting item visibility (normal/readonly/hidden). |
|
186 |
* @param None. |
|
187 |
* @return None. |
|
188 |
*/ |
|
189 |
void SetVisibility(); |
|
190 |
||
191 |
/** |
|
192 |
* Set all settings to read-only state. |
|
193 |
* @param None. |
|
194 |
* @return None. |
|
195 |
*/ |
|
196 |
void SetAllReadOnly(); |
|
197 |
||
198 |
||
199 |
private: |
|
200 |
CIAUpdateSettingItemList* iList; |
|
201 |
||
202 |
// for title and icon handling |
|
203 |
CIAUpdateStatusPaneHandler* iStatusPaneHandler; |
|
204 |
||
205 |
// dialog edit mode |
|
206 |
TInt iEditMode; |
|
207 |
||
208 |
}; |
|
209 |
||
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
210 |
|
66 | 211 |
/** |
212 |
* CIAUpdateSettingItemList |
|
213 |
* |
|
214 |
* Customized setting item list. |
|
215 |
*/ |
|
216 |
class CIAUpdateSettingItemList : public CAknSettingItemList |
|
217 |
{ |
|
218 |
public: |
|
219 |
TInt Attribute( TInt aKey ); |
|
220 |
void CheckSettings(); |
|
221 |
||
222 |
||
223 |
public: // from CAknSettingItemList |
|
224 |
/** |
|
225 |
* Load settings. |
|
226 |
*/ |
|
227 |
void LoadSettingsL(); |
|
228 |
||
229 |
/** |
|
230 |
* Launches the setting page for the current item by calling EditItemL on it |
|
231 |
* @param aIndex - current item's (Visible) index in the list |
|
232 |
* @param aCalledFromMenu- ignored in most classes; may alter the behaviour |
|
233 |
* of the setting page |
|
234 |
*/ |
|
235 |
void EditItemL( TInt aIndex, TBool aCalledFromMenu ); |
|
236 |
||
237 |
/** |
|
238 |
* Create setting item. |
|
239 |
* @param aSettingId Setting id. |
|
240 |
* @return Setting item. |
|
241 |
*/ |
|
242 |
CAknSettingItem* CreateSettingItemL( TInt aSettingId ); |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
243 |
|
66 | 244 |
private: |
245 |
TInt iAccessPoint; |
|
246 |
TInt iAutoUpdateCheck; |
|
247 |
}; |
|
248 |
||
249 |
||
250 |
class CIAUpdateAccessPointSettingItem : public CAknSettingItem |
|
251 |
{ |
|
252 |
public: |
|
253 |
static CIAUpdateAccessPointSettingItem* |
|
254 |
CIAUpdateAccessPointSettingItem::NewL( TInt aSettingId, TInt& aAccessPointId ); |
|
255 |
~CIAUpdateAccessPointSettingItem(); |
|
256 |
private: |
|
257 |
CIAUpdateAccessPointSettingItem ( TInt aSettingId, TInt& aAccessPointId ); |
|
258 |
void ConstructL(); |
|
259 |
||
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
260 |
|
66 | 261 |
public: // from CAknSettingItem |
262 |
void EditItemL( TBool aCalledFromMenu ); |
|
263 |
const TDesC& SettingTextL(); |
|
264 |
||
265 |
private: |
|
266 |
TBool EditAccessPointItemL(); |
|
267 |
||
268 |
private: |
|
269 |
HBufC* iSettingText; |
|
270 |
||
271 |
TInt& iAccessPointId; |
|
272 |
||
273 |
// for access point selection |
|
274 |
CIAUpdateAccessPointHandler* iApHandler; |
|
275 |
}; |
|
276 |
||
277 |
||
278 |
||
279 |
#endif // IAUPDATESETTINGDIALOG_H |
|
280 |
||
281 |
// End of File |