1 /* |
|
2 * Copyright (c) 2004-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: |
|
15 * Declaration of class CWlanSettingsUiSettingItemList. |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef WLAN_SETTINGS_UI_SETTING_ITEM_LIST_H |
|
22 #define WLAN_SETTINGS_UI_SETTING_ITEM_LIST_H |
|
23 |
|
24 // INCLUDES |
|
25 |
|
26 #include <aknsettingitemlist.h> |
|
27 #include "wlansettingsuibinarypopupsettingitem.h" |
|
28 |
|
29 // CLASS DECLARATION |
|
30 class CWlanSettingsUiModel; |
|
31 |
|
32 /** |
|
33 * WLAN settings item list. |
|
34 * Added functionality: |
|
35 * - Creates proper type setting items, based on setting id. |
|
36 */ |
|
37 NONSHARABLE_CLASS( CWlanSettingsUiSettingItemList ) |
|
38 : public CAknSettingItemList, |
|
39 public MWlanSettingsUiBinaryPopupSettingObserver |
|
40 { |
|
41 |
|
42 public: // Constructors |
|
43 |
|
44 /** |
|
45 * Constructor. |
|
46 * @param aModel Data model. |
|
47 */ |
|
48 inline CWlanSettingsUiSettingItemList |
|
49 ( CWlanSettingsUiModel* aModel ); |
|
50 |
|
51 public: // New methods |
|
52 |
|
53 /** |
|
54 * Edit current item. |
|
55 * @param aCalledFromMenu ETrue if called from menu. |
|
56 */ |
|
57 void EditCurrentItemL( TBool aCalledFromMenu ); |
|
58 |
|
59 public: // From CAknSettingItemList & base classes |
|
60 |
|
61 /** |
|
62 * Activate. |
|
63 */ |
|
64 void ActivateL(); |
|
65 |
|
66 /** |
|
67 * Load settings. |
|
68 */ |
|
69 void LoadSettingsL(); |
|
70 |
|
71 /** |
|
72 * Handle resource change |
|
73 * @param aType message UID value |
|
74 */ |
|
75 void HandleResourceChange( TInt aType ); |
|
76 |
|
77 /** |
|
78 * Launches the setting page for the current item by calling |
|
79 * EditItemL on it |
|
80 * @param aIndex Current item's (Visible) index in the list |
|
81 * @param aCalledFromMenu Ignored in most classes; may alter |
|
82 * the behaviour of the setting page |
|
83 */ |
|
84 void EditItemL( TInt aIndex, TBool aCalledFromMenu ); |
|
85 |
|
86 /** |
|
87 * Create setting item. |
|
88 * @param aSettingId Setting id. |
|
89 * @return Setting item. |
|
90 */ |
|
91 CAknSettingItem* CreateSettingItemL( TInt aSettingId ); |
|
92 |
|
93 /** |
|
94 * Set view (hide / show items as appropriate). |
|
95 */ |
|
96 void RefreshViewL(); |
|
97 |
|
98 private: // From MWlanSettingsUiBinaryPopupSettingObserver |
|
99 |
|
100 /** |
|
101 * Binary setting internal value has changed. |
|
102 * @param aItem Changed item. |
|
103 * @param aNewInternalVal New internal value. |
|
104 */ |
|
105 void BinarySettingChangedL |
|
106 ( |
|
107 CWlanSettingsUiBinaryPopupSettingItem* aItem, |
|
108 TBool aNewInternalVal |
|
109 ); |
|
110 |
|
111 private: // New methods |
|
112 |
|
113 /** |
|
114 * Sets the drawing rectangle for the listbox. |
|
115 */ |
|
116 void SetListBoxRect(); |
|
117 |
|
118 |
|
119 private: // Data |
|
120 |
|
121 CWlanSettingsUiModel* iModel;///< Data model. |
|
122 |
|
123 TBool iShowWlanAvail; ///< Show WLAN availablility on/off |
|
124 |
|
125 ///< Scan networks mode selection (automatic/user-defined) |
|
126 TInt iScanMode; |
|
127 |
|
128 ///< User selected scan interval needs to be checked if in PSM mode |
|
129 TInt iScanInterval; |
|
130 |
|
131 TInt iPowerSaving; |
|
132 |
|
133 // Old scan networks value is reverted back if |
|
134 // user turns PSM mode on and then off in settings UI |
|
135 TBool iChangeScanNetworksValueBack; |
|
136 |
|
137 // Back up for the scan networks value |
|
138 TUint iScanNetworksBackUp; |
|
139 |
|
140 }; |
|
141 |
|
142 #include "wlansettingsuisettingitemlist.inl" |
|
143 |
|
144 #endif |
|