equal
deleted
inserted
replaced
90 * @return ETrue if button is pressed |
90 * @return ETrue if button is pressed |
91 */ |
91 */ |
92 TBool IsPressed(); |
92 TBool IsPressed(); |
93 |
93 |
94 /** |
94 /** |
95 * Sets the default status text and icon |
95 * Set the default status icon |
96 * |
96 * |
97 * @aLink Link to current contact |
97 * @aDefaultStatusIcon Default status icon |
98 */ |
98 */ |
99 IMPORT_C void SetDefaultStatusL( TInt aDefaultResource, CGulIcon* aDefaultStatusIcon ); |
99 IMPORT_C void SetDefaultStatusIconL( CGulIcon* aDefaultStatusIcon ); |
|
100 |
|
101 /** |
|
102 * Set the default status text |
|
103 * |
|
104 * @aDefaultStatusText Default status text |
|
105 */ |
|
106 IMPORT_C void SetDefaultStatusTextL( HBufC* aDefaultStatusText ); |
100 |
107 |
101 public: // From CCoeControl |
108 public: // From CCoeControl |
102 |
109 |
103 /** |
110 /** |
104 * From CCoeControl |
111 * From CCoeControl |
143 |
150 |
144 /** |
151 /** |
145 * Wraps the status text to fit into the space allocated for it. |
152 * Wraps the status text to fit into the space allocated for it. |
146 */ |
153 */ |
147 TInt RewrapStatusTextL(); |
154 TInt RewrapStatusTextL(); |
148 |
155 |
149 /** |
156 /** |
150 * Set default status |
157 * Show default status icon and text |
151 */ |
158 */ |
152 void DefaultStatusL(); |
159 void ShowDefaultContentL(); |
153 |
160 |
154 /** |
161 /** |
155 * Handle status update event |
162 * Handle status update event |
156 * |
163 * |
157 * @param aLink contact which has the status updated |
164 * @param aLink contact which has the status updated |
179 /** |
186 /** |
180 * Constructor for performing 2nd stage construction |
187 * Constructor for performing 2nd stage construction |
181 */ |
188 */ |
182 void ConstructL(); |
189 void ConstructL(); |
183 |
190 |
|
191 protected: // enums |
|
192 |
|
193 /** |
|
194 * Internal states |
|
195 */ |
|
196 enum TStatusControlState |
|
197 { |
|
198 // Show nothing |
|
199 EStateUndefined, |
|
200 // Default content shown |
|
201 EStateDefaultContent, |
|
202 // Status content shown |
|
203 EStateStatusContent |
|
204 }; |
|
205 |
184 protected: // data |
206 protected: // data |
185 |
207 |
186 /** |
208 /** |
187 * Own. Status service icon control |
209 * Own. Status service icon control |
188 */ |
210 */ |
206 |
228 |
207 /** |
229 /** |
208 * Own. Current status text |
230 * Own. Current status text |
209 */ |
231 */ |
210 HBufC* iStatusText; |
232 HBufC* iStatusText; |
|
233 |
|
234 /** |
|
235 * Own. Default status text |
|
236 */ |
|
237 HBufC* iDefaultStatusText; |
211 |
238 |
212 /** |
239 /** |
213 * Ref, Not owned. Status provider for updating the status and icon. |
240 * Ref, Not owned. Status provider for updating the status and icon. |
214 */ |
241 */ |
215 CSpbContentProvider& iContentProvider; |
242 CSpbContentProvider& iContentProvider; |
223 MVPbkContactLink* iLink; |
250 MVPbkContactLink* iLink; |
224 |
251 |
225 // Own. |
252 // Own. |
226 CGulIcon* iDefaultIcon; |
253 CGulIcon* iDefaultIcon; |
227 |
254 |
228 TInt iDefaultResource; |
|
229 /** |
255 /** |
230 * Own. Button background graphics context (button effect) |
256 * Own. Button background graphics context (button effect) |
231 */ |
257 */ |
232 CAknsFrameBackgroundControlContext* iBgContext; |
258 CAknsFrameBackgroundControlContext* iBgContext; |
233 |
259 |
238 |
264 |
239 /** |
265 /** |
240 * Not own (singleton). Tactile feedback interface |
266 * Not own (singleton). Tactile feedback interface |
241 */ |
267 */ |
242 MTouchFeedback* iTouchFeedBack; |
268 MTouchFeedback* iTouchFeedBack; |
|
269 |
|
270 /* |
|
271 * Current control state. |
|
272 */ |
|
273 TStatusControlState iState; |
243 }; |
274 }; |
244 |
275 |
245 #endif // CCAPPSTATUSCONTROL_H_ |
276 #endif // CCAPPSTATUSCONTROL_H_ |