1 /* |
|
2 * Copyright (c) 2005 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: Device Encryption UI settings item list. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef DEVENCUI_SETTINGITEMLIST_H |
|
19 #define DEVENCUI_SETTINGITEMLIST_H |
|
20 |
|
21 // INCLUDES |
|
22 |
|
23 // System includes |
|
24 #include <aknsettingitemlist.h> // CAknSettingItemList |
|
25 |
|
26 // User includes |
|
27 #include "DevEnc.hrh" |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 class CDevEncUiSettingItemList : public CAknSettingItemList |
|
32 { |
|
33 public: // Constructors and destructor |
|
34 CDevEncUiSettingItemList(); |
|
35 ~CDevEncUiSettingItemList(); |
|
36 |
|
37 // From CAknSettingItemList |
|
38 /** |
|
39 * Creates the actual setting items for the list, passing |
|
40 * ownership of them to the calling class. Each setting |
|
41 * item has a piece of member data which it sets values in. |
|
42 */ |
|
43 CAknSettingItem* CreateSettingItemL( TInt identifier ); |
|
44 |
|
45 // From CAknSettingItemList |
|
46 virtual void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType); |
|
47 |
|
48 /** |
|
49 * Called by the framework whenever an item is selected. |
|
50 * Causes the edit page for the currently selected setting item to |
|
51 * be displayed and stores any changes made. |
|
52 * @param aIndex the index of the item to change |
|
53 * @param aCalledFromMenu If ETrue, opens a popup window to let the |
|
54 * user select the state of this item. Otherwise the item state |
|
55 * is just changed. |
|
56 */ |
|
57 void EditItemL ( TInt aIndex, TBool aCalledFromMenu ); |
|
58 |
|
59 // Members |
|
60 /** |
|
61 * Gets the index of the currently selected item. |
|
62 * @return the index |
|
63 */ |
|
64 TInt SelectedItem(); |
|
65 |
|
66 /** |
|
67 * Opens a popup window to let the user select the state of this item |
|
68 */ |
|
69 void ChangeSelectedItemL(); |
|
70 |
|
71 /** |
|
72 * Sets the text of a list item. Does not change the state. |
|
73 * @param aIndex the index of the item to change |
|
74 * @param aNewText the new text |
|
75 */ |
|
76 void SetItemTextL( TInt aIndex, const TDesC& aNewText ); |
|
77 |
|
78 /** |
|
79 * Sets the state of a list item. |
|
80 * @param aIndex the index of the item to change |
|
81 * @param aSetting the new state |
|
82 */ |
|
83 void SetItemStateL( TInt aIndex, TBool aSetting ); |
|
84 |
|
85 /** |
|
86 * Gets the state of a list item. |
|
87 * @param aIndex the index of the item to change |
|
88 * @param aSetting Contains the current setting when finished. |
|
89 */ |
|
90 void ItemState( TInt aIndex, TBool& aSetting ); |
|
91 |
|
92 /** |
|
93 * From CAknSettingItemList |
|
94 * |
|
95 * Handles a change to the control's resources of type aType |
|
96 * which are shared across the environment, e.g. colors or fonts. |
|
97 * |
|
98 * @since 2.0 |
|
99 * @param aType Reason for the "resource" change, usually an system event UID |
|
100 */ |
|
101 void HandleResourceChange( TInt aType ); |
|
102 |
|
103 private: |
|
104 // From CAknSettingItemList |
|
105 /** |
|
106 * Called by framework when the view size is changed. Resizes the |
|
107 * setting list accordingly. |
|
108 */ |
|
109 void SizeChanged(); |
|
110 |
|
111 // Member data |
|
112 /* Holds the UI representation of the current state of the phone |
|
113 * memory encryption. This does not always correlate to the real memory |
|
114 * state, as this variable often contains a new setting that has not |
|
115 * been validated yet. */ |
|
116 TBool iPhoneMemSetting; |
|
117 |
|
118 /* Holds the UI representation of the current state of the memory |
|
119 * card encryption. This does not always correlate to the real memory |
|
120 * state, as this variable often contains a new setting that has not |
|
121 * been validated yet. */ |
|
122 TBool iMmcSetting; |
|
123 |
|
124 /** Owned. Holds the current state text of the phone memory */ |
|
125 HBufC* iPhoneMemStateText; |
|
126 |
|
127 /** Owned. Holds the current state text of the memory card */ |
|
128 HBufC* iMmcStateText; |
|
129 }; |
|
130 |
|
131 #endif // #ifndef DEVENCUI_SETTINGITEMLIST_H |
|
132 |
|
133 // End of File |
|