|
1 /* |
|
2 * Copyright (c) 2008 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: Definition for MediaServant fill rule editor class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_MSSETTINGITEMS_H |
|
20 #define C_MSSETTINGITEMS_H |
|
21 |
|
22 #include <aknsettingitemlist.h> |
|
23 |
|
24 // CLASS DECLARATIONS |
|
25 |
|
26 /** |
|
27 * CMSTextSettingItem |
|
28 * Text setting item class |
|
29 * |
|
30 * @Since S60 5.1 |
|
31 */ |
|
32 class CMSTextSettingItem : public CAknTextSettingItem |
|
33 { |
|
34 public: |
|
35 /** |
|
36 * Constructor |
|
37 * |
|
38 * @Since S60 5.1 |
|
39 * @param aIdentifier, resource id |
|
40 * @param aText, setting item text |
|
41 * @return None |
|
42 */ |
|
43 CMSTextSettingItem( TInt aIdentifier, TDes& aText ); |
|
44 |
|
45 protected: |
|
46 |
|
47 // From base class MAknSettingPageObserver |
|
48 |
|
49 /** |
|
50 * From MAknSettingPageObserver |
|
51 * See base class definition |
|
52 */ |
|
53 void HandleSettingPageEventL ( CAknSettingPage* aSettingPage, |
|
54 TAknSettingPageEvent aEventType ); |
|
55 public: |
|
56 |
|
57 /* Setting page acceptance status |
|
58 * @since S60 5.1 |
|
59 * @param None |
|
60 * @return TBool, ETrue if accepted EFalse if cancelled |
|
61 */ |
|
62 TBool SettingAccepted(); |
|
63 |
|
64 /** |
|
65 * Sets setting page accept state |
|
66 * @since S60 5.1 |
|
67 * @param aState, ETrue if accepted |
|
68 * @return None |
|
69 */ |
|
70 void SetAcceptState( TBool aState ); |
|
71 |
|
72 /** |
|
73 * Gets settingitem text |
|
74 * @since S60 5.1 |
|
75 * @param None |
|
76 * @return TPtr&, setting item text |
|
77 */ |
|
78 TPtr& Text(); |
|
79 |
|
80 /** |
|
81 * Sets settingitem text |
|
82 * @since S60 5.1 |
|
83 * @param text, new text |
|
84 * @return None |
|
85 */ |
|
86 void SetText( TDesC& text ); |
|
87 |
|
88 private: |
|
89 |
|
90 /* |
|
91 * Setting page acceptance status |
|
92 */ |
|
93 TBool iOKPressed; |
|
94 }; |
|
95 |
|
96 /** |
|
97 * CMSEnumeratedTextPopupSettingItem |
|
98 * Enumerated text popup setting item class |
|
99 * |
|
100 * @Since S60 5.1 |
|
101 */ |
|
102 class CMSEnumeratedTextPopupSettingItem : |
|
103 public CAknEnumeratedTextPopupSettingItem |
|
104 { |
|
105 public: |
|
106 |
|
107 /* |
|
108 * Constructor |
|
109 * |
|
110 * @Since S60 5.1 |
|
111 * @param aIdentifier, resource id |
|
112 * @param aValue, selected value |
|
113 * @return None |
|
114 */ |
|
115 CMSEnumeratedTextPopupSettingItem( TInt aResourceId, TInt& aValue ); |
|
116 |
|
117 protected: |
|
118 |
|
119 // From base class MAknSettingPageObserver |
|
120 |
|
121 /** |
|
122 * From MAknSettingPageObserver |
|
123 * See base class definition |
|
124 */ |
|
125 void HandleSettingPageEventL ( CAknSettingPage* aSettingPage, |
|
126 TAknSettingPageEvent aEventType ); |
|
127 public: |
|
128 /* Setting page acceptance status |
|
129 * @since S60 5.1 |
|
130 * @return TBool, ETrue if accepted EFalse if cancelled |
|
131 */ |
|
132 TBool SettingAccepted(); |
|
133 |
|
134 /** |
|
135 * Sets setting page accept state |
|
136 * @since S60 5.1 |
|
137 * @param aState, ETrue if accepted |
|
138 */ |
|
139 void SetAcceptState( TBool aState ); |
|
140 |
|
141 private: |
|
142 /* |
|
143 * Setting page acceptance status |
|
144 */ |
|
145 TBool iOKPressed; |
|
146 }; |
|
147 |
|
148 /** |
|
149 * CMSTimeOrDateSettingItem |
|
150 * Time and date setting item class |
|
151 * |
|
152 * @since S60 5.1 |
|
153 */ |
|
154 class CMSTimeOrDateSettingItem : public CAknTimeOrDateSettingItem |
|
155 { |
|
156 public: |
|
157 /* |
|
158 * Constructor |
|
159 * |
|
160 * @Since S60 5.1 |
|
161 * @param aIdentifier, resource id |
|
162 * @param aMode, time or date mode |
|
163 * @param aTime, time value |
|
164 * @return None |
|
165 */ |
|
166 CMSTimeOrDateSettingItem( TInt aCMSIdentifier, |
|
167 TInt aIdentifier, |
|
168 CAknTimeOrDateSettingItem::TAknTimeOrDateSettingItemMode aMode, |
|
169 TTime& aTime ); |
|
170 |
|
171 protected: |
|
172 |
|
173 // From base class MAknSettingPageObserver |
|
174 |
|
175 /** |
|
176 * From MAknSettingPageObserver |
|
177 * See base class definition |
|
178 */ |
|
179 void HandleSettingPageEventL ( CAknSettingPage* aSettingPage, |
|
180 TAknSettingPageEvent aEventType ); |
|
181 public: |
|
182 /* Setting page acceptance status |
|
183 * @since S60 5.1 |
|
184 * @return TBool, ETrue if accepted EFalse if cancelled |
|
185 */ |
|
186 TBool SettingAccepted(); |
|
187 |
|
188 /** |
|
189 * Sets setting page accept state |
|
190 * @since S60 5.1 |
|
191 * @param aState, ETrue if accepted |
|
192 */ |
|
193 void SetAcceptState( TBool aState ); |
|
194 |
|
195 /** |
|
196 * This launches the setting page for Time or Date editing |
|
197 * @since S60 5.1 |
|
198 * @param aState, ETrue if from menu called |
|
199 */ |
|
200 void EditItemL( TBool aCalledFromMenu ); |
|
201 |
|
202 private: |
|
203 /* |
|
204 * Setting page acceptance status |
|
205 */ |
|
206 TBool iOKPressed; |
|
207 /* |
|
208 * Internal time |
|
209 */ |
|
210 TTime& iCMSInternalTime; |
|
211 /* |
|
212 * Resource identifier(From / Util) |
|
213 */ |
|
214 TInt iCMSIdentifier; |
|
215 |
|
216 }; |
|
217 |
|
218 #endif // C_MSSETTINGITEMS_H |