|
1 /* |
|
2 * Copyright (c) 2009 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: AknConf setting item component |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_AKNCONFSETTINGITEM_H |
|
20 #define C_AKNCONFSETTINGITEM_H |
|
21 #include <aknsettingitemlist.h> |
|
22 |
|
23 class CAknConfSettingList; |
|
24 |
|
25 /** |
|
26 * AknConf integer setting item component |
|
27 */ |
|
28 class CAknConfSettingItem : public CAknIntegerEdwinSettingItem |
|
29 { |
|
30 |
|
31 public: |
|
32 |
|
33 /** |
|
34 * Constructor. |
|
35 */ |
|
36 CAknConfSettingItem( CAknConfSettingList* aList, |
|
37 TInt& aValue, |
|
38 const TInt& aId, |
|
39 const TInt& aCenRepKey); |
|
40 |
|
41 |
|
42 /** |
|
43 * Destructor. |
|
44 */ |
|
45 ~CAknConfSettingItem(); |
|
46 |
|
47 // from base class CAknIntegerEdwinSettingItem |
|
48 |
|
49 /** |
|
50 * Handles an event of type aEventType reported by the |
|
51 * Setting Page to this observer. |
|
52 * |
|
53 * @param aSettingPage Setting page |
|
54 * @param aEventType Event type |
|
55 */ |
|
56 void HandleSettingPageEventL( CAknSettingPage *aSettingPage, |
|
57 TAknSettingPageEvent aEventType ); |
|
58 private: |
|
59 |
|
60 /** |
|
61 * Parent list. |
|
62 * Not own. |
|
63 */ |
|
64 CAknConfSettingList* iList; |
|
65 |
|
66 /** |
|
67 * Pointer to this setting value. |
|
68 */ |
|
69 TInt* iValue; |
|
70 |
|
71 /** |
|
72 * Setting cenrep key. |
|
73 */ |
|
74 TInt iCenRepKey; |
|
75 |
|
76 }; |
|
77 |
|
78 |
|
79 /** |
|
80 * AknConf binary setting item component |
|
81 */ |
|
82 class CAknConfBinarySettingItem : public CAknBinaryPopupSettingItem |
|
83 { |
|
84 |
|
85 public: |
|
86 |
|
87 /** |
|
88 * Constructor. |
|
89 */ |
|
90 CAknConfBinarySettingItem( CAknConfSettingList* aList, |
|
91 TBool& aValue, |
|
92 const TInt& aId, |
|
93 const TInt& aCenRepKey); |
|
94 |
|
95 |
|
96 /** |
|
97 * Destructor. |
|
98 */ |
|
99 ~CAknConfBinarySettingItem(); |
|
100 |
|
101 // from base class CAknBinaryPopupSettingItem |
|
102 |
|
103 /** |
|
104 * This launches the setting page (or just toggles) the binary setting. |
|
105 * |
|
106 * @param aCalledFromMenu This flag determines if the setting page actually |
|
107 * launches or not. It does not if this flag is EFalse |
|
108 * - the value is just toggled. |
|
109 */ |
|
110 void EditItemL( TBool aCalledFromMenu ); |
|
111 |
|
112 /** |
|
113 * Handles an event of type aEventType reported by the |
|
114 * Setting Page to this observer. |
|
115 * |
|
116 * @param aSettingPage Setting page |
|
117 * @param aEventType Event type |
|
118 */ |
|
119 void HandleSettingPageEventL( CAknSettingPage *aSettingPage, |
|
120 TAknSettingPageEvent aEventType ); |
|
121 private: |
|
122 |
|
123 /** |
|
124 * Parent list. |
|
125 * Not own. |
|
126 */ |
|
127 CAknConfSettingList* iList; |
|
128 |
|
129 /** |
|
130 * Pointer to this setting value. |
|
131 */ |
|
132 TBool* iValue; |
|
133 |
|
134 /** |
|
135 * Setting cenrep key. |
|
136 */ |
|
137 TInt iCenRepKey; |
|
138 |
|
139 }; |
|
140 |
|
141 /** |
|
142 * AknConf slider setting item component |
|
143 */ |
|
144 class CAknConfSliderSettingItem : public CAknSliderSettingItem |
|
145 { |
|
146 |
|
147 public: |
|
148 |
|
149 /** |
|
150 * Constructor. |
|
151 */ |
|
152 CAknConfSliderSettingItem( CAknConfSettingList* aList, |
|
153 TInt& aValue, |
|
154 const TInt& aId, |
|
155 const TInt& aCenRepKey); |
|
156 |
|
157 |
|
158 /** |
|
159 * Destructor. |
|
160 */ |
|
161 ~CAknConfSliderSettingItem(); |
|
162 |
|
163 // from base class CAknSliderSettingItem |
|
164 |
|
165 /** |
|
166 * Handles an event of type aEventType reported by the |
|
167 * Setting Page to this observer. |
|
168 * |
|
169 * @param aSettingPage Setting page |
|
170 * @param aEventType Event type |
|
171 */ |
|
172 void HandleSettingPageEventL( CAknSettingPage *aSettingPage, |
|
173 TAknSettingPageEvent aEventType ); |
|
174 private: |
|
175 |
|
176 /** |
|
177 * Parent list. |
|
178 * Not own. |
|
179 */ |
|
180 CAknConfSettingList* iList; |
|
181 |
|
182 /** |
|
183 * Pointer to this setting value. |
|
184 */ |
|
185 TInt* iValue; |
|
186 |
|
187 /** |
|
188 * Setting cenrep key. |
|
189 */ |
|
190 TInt iCenRepKey; |
|
191 |
|
192 }; |
|
193 |
|
194 #endif // C_AKNCONFSETTINGITEM_H |
|
195 |