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 #ifndef __AKNFEPDUALLANGUAGESETTINGLIST_H |
|
28 #define __AKNFEPDUALLANGUAGESETTINGLIST_H |
|
29 |
|
30 |
|
31 #include <coecntrl.h> |
|
32 #include <aknsettingitemlist.h> |
|
33 #include <akncheckboxsettingpage.h> |
|
34 #include "AknFepUIAvkonCtrlDualLanguageSettingModel.h" |
|
35 #include "AknFepUIAvkonCtrlDualLanguageSettingData.h" |
|
36 |
|
37 class CAknFepDualLanguageSettingDialog; |
|
38 |
|
39 class CAknFepDualLanguageSettingItem : public CAknEnumeratedTextPopupSettingItem |
|
40 { |
|
41 public: |
|
42 CAknFepDualLanguageSettingItem( TInt aResourceId, TBool aPrimary, CAknFepDualLanguageSettingData* aData ); |
|
43 virtual ~CAknFepDualLanguageSettingItem(); |
|
44 protected: |
|
45 virtual void CompleteConstructionL(); |
|
46 private: |
|
47 CAknFepDualLanguageSettingData* iData; |
|
48 TBool iPrimary; |
|
49 }; |
|
50 |
|
51 /** |
|
52 * Class: CAknFepDualLanguageSettingList |
|
53 * |
|
54 * Discussion: A specialised subclass of CAknSettingItemList. This class is |
|
55 * the control used to both display the current values of the |
|
56 * settings and to launch the relevant editor for those items. |
|
57 * |
|
58 */ |
|
59 class CAknFepDualLanguageSettingList : public CAknSettingItemList |
|
60 { |
|
61 public: |
|
62 /** |
|
63 * Function: NewL |
|
64 * |
|
65 * Discussion: Factory function used to create a new instance of |
|
66 * CAknFepDualLanguageSettingList |
|
67 * |
|
68 * Params: aData - reference to the data to be displayed and edited. |
|
69 * |
|
70 * Returns: A newly created instance of CAknFepDualLanguageSettingList |
|
71 */ |
|
72 static CAknFepDualLanguageSettingList* NewL(CAknFepDualLanguageSettingData* aData, CAknFepDualLanguageSettingDialog* aDialog); |
|
73 |
|
74 /** |
|
75 * Function: NewLC |
|
76 * |
|
77 * Discussion: Factory function used to create a new instance of |
|
78 * CAknFepDualLanguageSettingList and leave a pointer to it on the |
|
79 * cleanup stack. |
|
80 * |
|
81 * Params: aData - reference to the data to be displayed and edited. |
|
82 * |
|
83 * Returns: A newly created instance of CAknFepDualLanguageSettingList |
|
84 */ |
|
85 static CAknFepDualLanguageSettingList* NewLC(CAknFepDualLanguageSettingData* aData, CAknFepDualLanguageSettingDialog* aDialog); |
|
86 |
|
87 /** |
|
88 * Function: ~CAknFepDualLanguageSettingList |
|
89 * |
|
90 * Discussion: Virtual destructor for CAknFepDualLanguageSettingList. Ensures that |
|
91 * all allocated memory is returned to the heap before |
|
92 * deletion of object. |
|
93 * |
|
94 */ |
|
95 virtual ~CAknFepDualLanguageSettingList(); |
|
96 |
|
97 |
|
98 /** |
|
99 * Function: SizeChanged |
|
100 * |
|
101 * Discussion: Inherited from CCoeControl. Calculates size based on |
|
102 * contained control required sizes. |
|
103 * |
|
104 */ |
|
105 void SizeChanged(); |
|
106 |
|
107 /** |
|
108 * Function: EditCurrentItemL |
|
109 * Params: aCalledFromMenu - ETrue if called from menu, EFalse otherwise. |
|
110 * |
|
111 * |
|
112 * Discussion: Starts the setting page for the currently selected item |
|
113 * in the list. |
|
114 */ |
|
115 void EditCurrentItemL(TBool aCalledFromMenu); |
|
116 |
|
117 // Toggle whether secondary input item is visible |
|
118 void HideSecondaryInputL(TBool aHidden); |
|
119 |
|
120 private: |
|
121 /** |
|
122 * Function: CAknFepDualLanguageSettingList |
|
123 * |
|
124 * Discussion: Hidden, first-stage non-leaving constructor. |
|
125 * |
|
126 * Params: aData - reference to the data to be displayed and edited. |
|
127 * |
|
128 */ |
|
129 CAknFepDualLanguageSettingList(CAknFepDualLanguageSettingData* aData, CAknFepDualLanguageSettingDialog* aDialog); |
|
130 |
|
131 /** |
|
132 * Function: CreateSettingItemL |
|
133 * |
|
134 * Discussion: Factory function for creating CAknSettingItem derived |
|
135 * SettingItem classes used t display current values |
|
136 * |
|
137 * Params: aSettingId - the id of the control which should be created |
|
138 * |
|
139 */ |
|
140 CAknSettingItem* CreateSettingItemL (TInt aSettingId); |
|
141 |
|
142 void HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType); |
|
143 |
|
144 private: |
|
145 CAknFepDualLanguageSettingData* iData; |
|
146 CAknFepDualLanguageSettingDialog* iDialog; |
|
147 TInt iPrimaryValue; |
|
148 TInt iSecondaryValue; |
|
149 }; |
|
150 |
|
151 #endif // __AKNFEPDUALLANGUAGESETTINGLIST_H |
|
152 |
|