|
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 * Name : CGSPredictiveSettingData from AknFepPredictiveSettingData.h |
|
20 * ============================================================================ |
|
21 */ |
|
22 |
|
23 #ifndef __DUALLANGUAGE_DATA_H |
|
24 #define __DUALLANGUAGE_DATA_H |
|
25 |
|
26 #include <e32base.h> |
|
27 #include <badesca.h> |
|
28 #include <aknsettingitemlist.h> |
|
29 |
|
30 /** |
|
31 * Class: CGSPredictiveSettingData |
|
32 * |
|
33 * Discussion: An aggregate class containing data for all editing controls |
|
34 * This class is used as a central respository for all data |
|
35 * to be displayed and editted within this app. |
|
36 */ |
|
37 class CGSDualLanguageData : public CBase |
|
38 { |
|
39 public: |
|
40 /** |
|
41 * Function: NewL |
|
42 * |
|
43 * Discussion: Factory function used to create a new instance of |
|
44 * CGSPredictiveSettingData |
|
45 * |
|
46 * Returns: A newly created instance of CGSPredictiveSettingData with all data |
|
47 * items valid |
|
48 */ |
|
49 static CGSDualLanguageData* NewL(); |
|
50 |
|
51 /** |
|
52 * Function: NewLC |
|
53 * |
|
54 * Discussion: Factory function used to create a new instance of |
|
55 * CGSPredictiveSettingData and leave a pointer to it on the cleanup |
|
56 * stack |
|
57 * |
|
58 * Returns: A newly created instance of CGSPredictiveSettingData with all data |
|
59 * items valid |
|
60 */ |
|
61 static CGSDualLanguageData* NewLC(); |
|
62 |
|
63 /** |
|
64 * Function: ~CGSPredictiveSettingData |
|
65 * |
|
66 * Discussion: Virtual destructor for CGSPredictiveSettingData. Ensures that all |
|
67 * allocated memory is returned to the heap before deletion |
|
68 * of object. |
|
69 * |
|
70 */ |
|
71 virtual ~CGSDualLanguageData(); |
|
72 |
|
73 /** |
|
74 * Function: LoadL |
|
75 * |
|
76 * Discussion: Loads itself with parameters passed. |
|
77 * |
|
78 */ |
|
79 void LoadL(CDesCArrayFlat* aItems, |
|
80 CDesCArrayFlat* aSecondaryItems, |
|
81 TInt aCurrentValue, |
|
82 TInt aCurrentSecondaryValue); |
|
83 |
|
84 |
|
85 /** |
|
86 * Function: SaveL |
|
87 * |
|
88 * Discussion: Saves itself. |
|
89 * |
|
90 */ |
|
91 void SaveL() const; |
|
92 |
|
93 /** |
|
94 * Function: Items |
|
95 * |
|
96 * Discussion: Trivial accessor function |
|
97 * |
|
98 * Returns: A reference to the iItems member |
|
99 */ |
|
100 inline CDesCArrayFlat* Items() {return iItems; } |
|
101 |
|
102 /** |
|
103 * Function: SecondaryItems |
|
104 * |
|
105 * Discussion: Trivial accessor function |
|
106 * |
|
107 * Returns: A reference to the iSecondaryItems member |
|
108 */ |
|
109 inline CDesCArrayFlat* SecondaryItems() { return iSecondaryItems; } |
|
110 |
|
111 /** |
|
112 * Function: CurrentValue |
|
113 * |
|
114 * Discussion: Trivial accessor function |
|
115 * |
|
116 * Returns: A reference to the iCurrentValue member |
|
117 */ |
|
118 inline TInt& CurrentValue() {return iCurrentValue; } |
|
119 |
|
120 /** |
|
121 * Function: CurrentSecondaryValue |
|
122 * |
|
123 * Discussion: Trivial accessor function |
|
124 * |
|
125 * Returns: A reference to the iCurrentSecondaryValue member |
|
126 */ |
|
127 inline TInt& CurrentSecondaryValue() {return iCurrentSecondaryValue; } |
|
128 |
|
129 private: |
|
130 /** |
|
131 * Function: CGSPredictiveSettingData |
|
132 * |
|
133 * Discussion: Hidden, first-stage non-leaving constructor. |
|
134 * |
|
135 */ |
|
136 CGSDualLanguageData(); |
|
137 |
|
138 /** |
|
139 * Function: ConstructL |
|
140 * |
|
141 * Discussion: Hidden, second-stage possibly-leaving constructor. |
|
142 * |
|
143 */ |
|
144 void ConstructL(); |
|
145 |
|
146 |
|
147 public: |
|
148 CDesCArrayFlat* iItems; |
|
149 CDesCArrayFlat* iSecondaryItems; |
|
150 TInt iCurrentValue; |
|
151 TInt iCurrentSecondaryValue; |
|
152 }; |
|
153 |
|
154 #endif // __DUALLANGUAGE_DATA_H |
|
155 |