1 /* |
|
2 * Copyright (c) 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: Setting item type for CAknEnumeratedItems.* |
|
15 */ |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CAMCONTEXTAWARESETTINGITEM_H |
|
21 #define CAMCONTEXTAWARESETTINGITEM_H |
|
22 |
|
23 // INCLUDES |
|
24 |
|
25 #include <AknSettingItemList.h> |
|
26 |
|
27 // CONSTANTS |
|
28 |
|
29 // MACROS |
|
30 |
|
31 // DATA TYPES |
|
32 |
|
33 // FUNCTION PROTOTYPES |
|
34 |
|
35 // FORWARD DECLARATIONS |
|
36 class CCamAppController; |
|
37 |
|
38 // CLASS DECLARATION |
|
39 |
|
40 /** |
|
41 * Setting item class similar to standard avkon CAknEnumeratedTextPopupSettingItem. |
|
42 * Allows the text array to be updated dynamically on construction according |
|
43 * to any limitations on available items imposed by other setting values or available |
|
44 * memory |
|
45 * |
|
46 * @since 2.8 |
|
47 */ |
|
48 |
|
49 class CCamContextAwareSettingItem : public CAknEnumeratedTextPopupSettingItem |
|
50 { |
|
51 public: |
|
52 /** |
|
53 * Construct a list, storing in it a resource (to be read at 2nd stage construction) |
|
54 * and a reference to an externally owned integer - the value to be manipulated |
|
55 * @since 2.8 |
|
56 * @param aController reference the the application controller |
|
57 * provides access to query for a revised resource id |
|
58 * @param aSettingItemId the setting item being constructed |
|
59 * @param aValue the current value of the item |
|
60 */ |
|
61 CCamContextAwareSettingItem( CCamAppController& aController, |
|
62 TInt aSettingItemId, |
|
63 TInt& aValue ); |
|
64 |
|
65 |
|
66 |
|
67 private: // Functions from base classes |
|
68 |
|
69 /** |
|
70 * From CAknEnumeratedTextPopupSettingItem |
|
71 * Virtual Method called by framework to create the setting page. |
|
72 * Creates setting page that switches cba depending on setting value |
|
73 * that user navigates to. |
|
74 * @since 2.8 |
|
75 */ |
|
76 CAknSettingPage* CreateSettingPageL(); |
|
77 |
|
78 /** |
|
79 * From CAknEnumeratedTextPopupSettingItem |
|
80 * Virtual Method called by framework to complete construction of |
|
81 * the setting page. |
|
82 * Determines whether or not the value list is to be limited (visually) |
|
83 * and replaces the popup text array with a new array created from the |
|
84 * revised resource id. |
|
85 * @since 2.8 |
|
86 */ |
|
87 void CompleteConstructionL(); |
|
88 |
|
89 private: // data |
|
90 |
|
91 // Used to determine whether a particular setting value can be |
|
92 // set by the user. |
|
93 CCamAppController& iController; |
|
94 |
|
95 }; |
|
96 |
|
97 #endif // CAMCONTEXTAWARESETTINGITEM_H |
|
98 |
|
99 // End of File |
|