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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 /* |
|
28 * ============================================================================ |
|
29 * Name : CAknFepPredictiveSettingList from SettingExampleSettingList.h |
|
30 * ============================================================================ |
|
31 */ |
|
32 |
|
33 #ifndef __AKN_FEP_PREDICTIVESETTING_LIST_H |
|
34 #define __AKN_FEP_PREDICTIVESETTING_LIST_H |
|
35 |
|
36 |
|
37 #include <coecntrl.h> |
|
38 #include <aknsettingitemlist.h> |
|
39 #include <akncheckboxsettingpage.h> |
|
40 |
|
41 //class CAknFepPredictiveSettingData; |
|
42 #include "AknFepPredictiveSettingData.h" |
|
43 |
|
44 class CAknFepPredictiveSettingDialog; |
|
45 /** |
|
46 * Class: CAknFepMultiSelectionSettingItem |
|
47 * |
|
48 * Discussion: An implementation of CAknBigSettingItemBase, providing a |
|
49 * big setting item that opens a multiselection (checkbox) |
|
50 * setting page. Specialized implementation to show |
|
51 * word autocompletion settings. |
|
52 * |
|
53 */ |
|
54 class CAknFepMultiSelectionSettingItem : public CAknBigSettingItemBase |
|
55 { |
|
56 public: |
|
57 CAknFepMultiSelectionSettingItem( TInt aResourceId, CAknFepPredictiveSettingData &aData, |
|
58 CCoeEnv* aCoeEnv ); |
|
59 virtual ~CAknFepMultiSelectionSettingItem(); |
|
60 virtual void EditItemL( TBool aCalledFromMenu ); |
|
61 virtual void StoreL(); |
|
62 virtual void LoadL(); |
|
63 |
|
64 private: |
|
65 CSelectionItemList* CreateSelectionItemListL(); |
|
66 |
|
67 CAknFepPredictiveSettingData &iData; // not owned |
|
68 CSelectionItemList* iSelection; |
|
69 CCoeEnv* iCoeEnv; |
|
70 TInt iItutIndex; |
|
71 TInt iHalfQwertyIndex; |
|
72 TInt iQwertyIndex; |
|
73 }; |
|
74 |
|
75 /** |
|
76 * Class: CAknFepPredictiveSettingList |
|
77 * |
|
78 * Discussion: A specialised subclass of CAknSettingItemList. This class is |
|
79 * the control used to both display the current values of the |
|
80 * settings and to launch the relevant editor for those items. |
|
81 * |
|
82 */ |
|
83 class CAknFepPredictiveSettingList : public CAknSettingItemList |
|
84 { |
|
85 public: |
|
86 /** |
|
87 * Function: NewL |
|
88 * |
|
89 * Discussion: Factory function used to create a new instance of |
|
90 * CAknFepPredictiveSettingList |
|
91 * |
|
92 * Params: aData - reference to the data to be displayed and edited. |
|
93 * |
|
94 * Returns: A newly created instance of CAknFepPredictiveSettingList |
|
95 */ |
|
96 static CAknFepPredictiveSettingList* NewL(CAknFepPredictiveSettingData &aData, CAknFepPredictiveSettingDialog &aDialog); |
|
97 |
|
98 /** |
|
99 * Function: NewLC |
|
100 * |
|
101 * Discussion: Factory function used to create a new instance of |
|
102 * CAknFepPredictiveSettingList and leave a pointer to it on the |
|
103 * cleanup stack. |
|
104 * |
|
105 * Params: aData - reference to the data to be displayed and edited. |
|
106 * |
|
107 * Returns: A newly created instance of CAknFepPredictiveSettingList |
|
108 */ |
|
109 static CAknFepPredictiveSettingList* NewLC(CAknFepPredictiveSettingData &aData, CAknFepPredictiveSettingDialog &aDialog); |
|
110 |
|
111 /** |
|
112 * Function: ~CAknFepPredictiveSettingList |
|
113 * |
|
114 * Discussion: Virtual destructor for CAknFepPredictiveSettingList. Ensures that |
|
115 * all allocated memory is returned to the heap before |
|
116 * deletion of object. |
|
117 * |
|
118 */ |
|
119 virtual ~CAknFepPredictiveSettingList(); |
|
120 |
|
121 |
|
122 /** |
|
123 * Function: SizeChanged |
|
124 * |
|
125 * Discussion: Inherited from CCoeControl. Calculates size based on |
|
126 * contained control required sizes. |
|
127 * |
|
128 */ |
|
129 void SizeChanged(); |
|
130 |
|
131 /** |
|
132 * Function: EditCurrentItemL |
|
133 * Params: aCalledFromMenu - ETrue if called from menu, EFalse otherwise. |
|
134 * |
|
135 * |
|
136 * Discussion: Starts the setting page for the currently selected item |
|
137 * in the list. |
|
138 */ |
|
139 void EditCurrentItemL(TBool aCalledFromMenu); |
|
140 |
|
141 TBool DeviceHasMultipleKeyboards(); |
|
142 |
|
143 |
|
144 private: |
|
145 /** |
|
146 * Function: CAknFepPredictiveSettingList |
|
147 * |
|
148 * Discussion: Hidden, first-stage non-leaving constructor. |
|
149 * |
|
150 * Params: aData - reference to the data to be displayed and edited. |
|
151 * |
|
152 */ |
|
153 CAknFepPredictiveSettingList(CAknFepPredictiveSettingData &aData, CAknFepPredictiveSettingDialog &aDialog); |
|
154 |
|
155 /** |
|
156 * Function: CreateSettingItemL |
|
157 * |
|
158 * Discussion: Factory function for creating CAknSettingItem derived |
|
159 * SettingItem classes used t display current values |
|
160 * |
|
161 * Params: aSettingId - the id of the control which should be created |
|
162 * |
|
163 */ |
|
164 CAknSettingItem* CreateSettingItemL (TInt aSettingId); |
|
165 |
|
166 |
|
167 void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType); |
|
168 |
|
169 void HandleResourceChange(TInt aType); |
|
170 |
|
171 private: |
|
172 CAknFepPredictiveSettingData &iSettingsData; /* Reference to data owned by Dialog */ |
|
173 CAknFepPredictiveSettingDialog &iSettingsDialog; |
|
174 }; |
|
175 |
|
176 #endif // __AKN_FEP_PREDICTIVESETTING_LIST_H |
|
177 |
|