|
1 /* |
|
2 * Copyright (c) 2005 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: Contains general data definitions for AspSyncUtil. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef ASPDIALOGUTIL_H |
|
20 #define ASPDIALOGUTIL_H |
|
21 |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <aknlistquerycontrol.h> |
|
26 #include <aknnavi.h> |
|
27 #include <aknnavide.h> |
|
28 #include <AknQueryDialog.h> |
|
29 |
|
30 #include <SyncMLHistory.h> |
|
31 |
|
32 #include <AknIndicatorContainer.h> // CAknIndicatorContainer |
|
33 #include <aknEditStateIndicator.h> // MAknEditingStateIndicator |
|
34 #include <akncheckboxsettingpage.h> // CSelectionItemList |
|
35 #include <aknradiobuttonsettingpage.h> // CAknRadioButtonSettingPage |
|
36 #include <akntextsettingpage.h> // CaknTextSettingPage |
|
37 #include <aknpasswordsettingpage.h> // CAknAlphaPasswordSettingPage |
|
38 |
|
39 #include "AspDefines.h" |
|
40 #include "AspProfile.h" |
|
41 #include "AspResHandler.h" |
|
42 |
|
43 |
|
44 |
|
45 #ifdef RD_DSUI_TIMEDSYNC |
|
46 |
|
47 #include <akntabgrp.h> |
|
48 #include <AknTabObserver.h> |
|
49 |
|
50 #endif |
|
51 |
|
52 /** |
|
53 * TDialogUtil |
|
54 * |
|
55 * TDialogUtil contains general dialog utilities. |
|
56 */ |
|
57 NONSHARABLE_CLASS (TDialogUtil) |
|
58 { |
|
59 public: |
|
60 /** |
|
61 * Shows text query. |
|
62 * @param aTitle Title text. |
|
63 * @param aText Message text. |
|
64 * @param aMaxLength Max text length. |
|
65 * @return None. |
|
66 */ |
|
67 static void ShowTextQueryL(const TDesC& aTitle, TDes& aText, TInt aMaxLength); |
|
68 |
|
69 /** |
|
70 * Shows message query (title, text and Ok button). |
|
71 * @param aTitle Title text. |
|
72 * @param aText Message text. |
|
73 * @return None. |
|
74 */ |
|
75 static void ShowMessageQueryL(const TDesC& aTitle, const TDesC& aText); |
|
76 |
|
77 /** |
|
78 * Shows message query (title, text and Ok button). |
|
79 * @param aTitle Title text. |
|
80 * @param aResourcet Mssage text resource id. |
|
81 * @return None. |
|
82 */ |
|
83 static void ShowMessageQueryL(const TDesC& aTitle, TInt aResource); |
|
84 |
|
85 static void ShowAutoSyncMessageQueryL(const TDesC& aText); |
|
86 /** |
|
87 * Shows yes/no question. |
|
88 * @param aText Question text. |
|
89 * @return ETrue if user selected yes, EFalse otherwise.. |
|
90 */ |
|
91 static TBool ShowConfirmationQueryL(const TDesC& aText); |
|
92 |
|
93 /** |
|
94 * Shows yes/no question. |
|
95 * @param aText Question text. |
|
96 * @return ETrue if user selected yes, EFalse otherwise.. |
|
97 */ |
|
98 static TBool ShowRoamingConfirmationQueryL(const TDesC& aText); |
|
99 |
|
100 /** |
|
101 * Shows ok/cancel question. |
|
102 * @param aResource Question text. |
|
103 * @return ETrue if user selected ok, EFalse otherwise.. |
|
104 */ |
|
105 static TBool ShowRoamingConfirmationQueryL(TInt aResource); |
|
106 |
|
107 /** |
|
108 * Shows yes/no question. |
|
109 * @param aResource Question text. |
|
110 * @return ETrue if user selected yes, EFalse otherwise.. |
|
111 */ |
|
112 static TBool ShowConfirmationQueryL(TInt aResource); |
|
113 |
|
114 /** |
|
115 * Shows information text. |
|
116 * @param aText Information text. |
|
117 * @return None. |
|
118 */ |
|
119 static void ShowInformationQueryL(const TDesC& aText); |
|
120 |
|
121 /** |
|
122 * Shows information text. |
|
123 * @param aResource Information text. |
|
124 * @return None. |
|
125 */ |
|
126 static void ShowInformationQueryL(TInt aResource); |
|
127 |
|
128 /** |
|
129 * Shows information text. |
|
130 * @param aResource Information text. |
|
131 * @return None. |
|
132 */ |
|
133 static void ShowInformationNoteL(TInt aResource); |
|
134 |
|
135 /** |
|
136 * Shows information text. |
|
137 * @param aText Information text. |
|
138 * @return None. |
|
139 */ |
|
140 static void ShowInformationNoteL(const TDesC& aText); |
|
141 |
|
142 /** |
|
143 * Shows error text. |
|
144 * @param aResource Error text. |
|
145 * @return None. |
|
146 */ |
|
147 static void ShowErrorNoteL(TInt aResource); |
|
148 |
|
149 /** |
|
150 * Shows error text. |
|
151 * @param aText Error text. |
|
152 * @return None. |
|
153 */ |
|
154 static void ShowErrorNoteL(const TDesC& aText); |
|
155 |
|
156 /** |
|
157 * Shows error text. |
|
158 * @param aResource Error text. |
|
159 * @return None. |
|
160 */ |
|
161 static void ShowErrorQueryL(TInt aResource); |
|
162 |
|
163 /** |
|
164 * Shows error text. |
|
165 * @param aText Error text. |
|
166 * @return None. |
|
167 */ |
|
168 static void ShowErrorQueryL(const TDesC& aText); |
|
169 |
|
170 /** |
|
171 * Shows dialog with selection list. |
|
172 * @param aTitle Dialog title. |
|
173 * @param aList List of selection items. |
|
174 * @param aSelectedIndex Index of selected item. |
|
175 * @return EFalse if user canceled, ETrue otherwise. |
|
176 */ |
|
177 static TBool ShowListQueryL(const TDesC& aTitle, CDesCArray* aList, TInt* aSelectedIndex); |
|
178 /** |
|
179 * Shows dialog with selection list other than sync application |
|
180 * @param aTitle Dialog title. |
|
181 * @param aList List of selection items. |
|
182 * @param aSelectedIndex Index of selected item. |
|
183 * @return EFalse if user canceled, ETrue otherwise. |
|
184 */ |
|
185 static TBool ShowListQueryIconL(const TDesC& aTitle, CDesCArray* aList, TInt* aSelectedIndex); |
|
186 /** |
|
187 * Shows dialog with selection list. |
|
188 * @param aTitle Dialog title. |
|
189 * @param aList List of selection items. |
|
190 * @param aSelectedIndex Index of selected item. |
|
191 * @return EFalse if user canceled, ETrue otherwise. |
|
192 */ |
|
193 static TBool ShowListQueryL(TInt aTitle, CDesCArray* aList, TInt* aSelectedIndex); |
|
194 /** |
|
195 * Shows dialog with selection list opened from other than sync application |
|
196 * @param aTitle Dialog title. |
|
197 * @param aList List of selection items. |
|
198 * @param aSelectedIndex Index of selected item. |
|
199 * @return EFalse if user canceled, ETrue otherwise. |
|
200 */ |
|
201 static TBool ShowListQueryIconL(TInt aTitle, CDesCArray* aList, TInt* aSelectedIndex); |
|
202 |
|
203 /** |
|
204 * Shows dialog with profile list. |
|
205 * @param aList Profile list. |
|
206 * @param aId Id of selected profile. |
|
207 * @param aResource Dialog title resource id. |
|
208 * @return EFalse if user canceled, ETrue otherwise. |
|
209 */ |
|
210 static TBool ShowProfileQueryL(CAspProfileList* aList, TInt& aId, TInt aResource); |
|
211 /** |
|
212 * Shows dialog with profile list displayed other than sync application |
|
213 * @param aList Profile list. |
|
214 * @param aId Id of selected profile. |
|
215 * @param aResource Dialog title resource id. |
|
216 * @param aIndex to know the selected index |
|
217 * @return EFalse if user canceled, ETrue otherwise. |
|
218 */ |
|
219 static TBool ShowProfileQueryAppL(CAspProfileList* aList, TInt& aId, TInt aResource,TInt &aIndex); |
|
220 |
|
221 /** |
|
222 * Deletes menu item. |
|
223 * @param aMenuPane. |
|
224 * @param aCommandId Id of deleted menu. |
|
225 * @return None. |
|
226 */ |
|
227 static void DeleteMenuItem(CEikMenuPane* aMenuPane, TInt aCommandId); |
|
228 |
|
229 /** |
|
230 * Constructs an independent CGulIcon object. |
|
231 * @param aID Item ID of the masked bitmap to be created. |
|
232 * @param aFilename Filename to be used to construct the item, |
|
233 * @param aFileBitmapId Id (for bitmap) in the file. |
|
234 * @param aFileMaskId Id (for mask) in the file. |
|
235 * @return Pointer to the newly created CGulIcon object. |
|
236 * Ownership of the object is transferred to the caller. |
|
237 */ |
|
238 static CGulIcon* CreateIconL(TAknsItemID aId, const TDesC& aFileName, TInt aFileBitmapId, TInt aFileMaskId); |
|
239 |
|
240 /** |
|
241 * Constructs an image. |
|
242 * @param aID Item ID of the masked bitmap to be created. |
|
243 * @param aFilename Filename to be used to construct the item, |
|
244 * @param aFileBitmapId Id (for bitmap) in the file. |
|
245 * @param aFileMaskId Id (for mask) in the file. |
|
246 * @return Pointer to the newly created CEikImage object. |
|
247 */ |
|
248 static CEikImage* CreateImageLC(TAknsItemID aId, const TDesC& aFileName, TInt aFileBitmapId, TInt aFileMaskId); |
|
249 |
|
250 /** |
|
251 * Constructs an list box item for CAknDoubleLargeStyleListBox. |
|
252 * @param aFirstLine. |
|
253 * @param aSecondLine |
|
254 * @param aIndex1. |
|
255 * @param aIndex2. |
|
256 * @return Pointerto the newly created list box item. |
|
257 */ |
|
258 static HBufC* ConstructListBoxItemLC(const TDesC& aFirstLine, const TDesC& aSecondLine, TInt aIndex); |
|
259 |
|
260 /** |
|
261 * Shows time editor page. |
|
262 * @param aTime. |
|
263 * @return ETrue if not canceled, EFalse otherwise. |
|
264 */ |
|
265 static TBool ShowTimeEditorL(TTime& aTime, const TDesC& aTitle); |
|
266 |
|
267 /** |
|
268 * Shows date editor page. |
|
269 * @param aTime. |
|
270 * @return ETrue if not canceled, EFalse otherwise. |
|
271 */ |
|
272 static TBool ShowDateEditorL(TTime& aTime, const TDesC& aTitle); |
|
273 |
|
274 /** |
|
275 * Shows list editor page. |
|
276 * @param aList. |
|
277 * @param aTitle. |
|
278 * @param aCurrent. |
|
279 * @return ETrue if not canceled, EFalse otherwise. |
|
280 */ |
|
281 static TBool ShowListEditorL(CDesCArray* aList, const TDesC& aTitle, TInt& aCurrent); |
|
282 |
|
283 /** |
|
284 * Shows list editor page. |
|
285 * @param aResourceId. |
|
286 * @param aList. |
|
287 * @param aTitle. |
|
288 * @param aCurrent. |
|
289 * @return ETrue if not canceled, EFalse otherwise. |
|
290 */ |
|
291 static TBool ShowListEditorL(TInt aResourceId, CDesCArray* aList, const TDesC& aTitle, TInt& aCurrent); |
|
292 |
|
293 |
|
294 /** |
|
295 * Shows text editor page. |
|
296 * @param aRessourceId. |
|
297 * @param aText. |
|
298 * @param aTitle. |
|
299 * @param aMandatory. |
|
300 * @param aLatinInput. |
|
301 * @param aMaxLength. |
|
302 * @return ETrue if not canceled, EFalse otherwise. |
|
303 */ |
|
304 static TBool ShowTextEditorL(TInt aResourceId, TDes& aText, const TDesC& aTitle, TBool aMandatory, TBool aLatinInput, TInt aMaxLength); |
|
305 |
|
306 /** |
|
307 * Shows text editor page. |
|
308 * @param aText. |
|
309 * @param aTitle. |
|
310 * @param aMandatory. |
|
311 * @param aLatinInput. |
|
312 * @param aMaxLength. |
|
313 * @return ETrue if not canceled, EFalse otherwise. |
|
314 */ |
|
315 static TBool ShowTextEditorL(TDes& aText, const TDesC& aTitle, TBool aMandatory, TBool aLatinInput, TInt aMaxLength); |
|
316 |
|
317 /** |
|
318 * Shows integer editor page. |
|
319 * @param aNumber. |
|
320 * @param aTitle. |
|
321 * @param aMin. |
|
322 * @param aMax. |
|
323 * @param aLatinInput. |
|
324 * @return ETrue if not canceled, EFalse otherwise. |
|
325 */ |
|
326 static TBool ShowIntegerEditorL(TInt& aNumber, const TDesC& aTitle, TInt aMin, TInt aMax, TBool aLatinInput); |
|
327 |
|
328 /** |
|
329 * Shows popup dialog. |
|
330 * @param aText Popup title. |
|
331 * @param aArray Popup lines. |
|
332 * @return None. |
|
333 */ |
|
334 static void ShowPopupDialogL(const TDesC& aText, CDesCArray* aArray); |
|
335 |
|
336 /** |
|
337 * Shows popup dialog. |
|
338 * @param aText Popup title. |
|
339 * @param aArray Popup lines. |
|
340 * @return None. |
|
341 */ |
|
342 static void ShowPopupDialog2L(const TDesC& aText, CDesCArray* aArray); |
|
343 |
|
344 /** |
|
345 * |
|
346 * Does Descriptor contain string "PC Suite" |
|
347 * Its NOT case sensitive |
|
348 * |
|
349 */ |
|
350 static TBool IsPCSuiteDesC(const TDesC& des); |
|
351 |
|
352 static TInt ShowAutoSyncLogL(TAny* /*aAny*/); |
|
353 |
|
354 }; |
|
355 |
|
356 |
|
357 |
|
358 /** |
|
359 * CAspIndicatorHandler |
|
360 * |
|
361 * This class is used for changing indicator state. |
|
362 */ |
|
363 NONSHARABLE_CLASS (CAspIndicatorHandler) : public CBase |
|
364 { |
|
365 public: |
|
366 /** |
|
367 * Destructor. |
|
368 */ |
|
369 virtual ~CAspIndicatorHandler(); |
|
370 |
|
371 /** |
|
372 * C++ default constructor. |
|
373 */ |
|
374 CAspIndicatorHandler::CAspIndicatorHandler(MAknEditingStateIndicator* aIndicator); |
|
375 |
|
376 public: |
|
377 |
|
378 /** |
|
379 * Sets navi pane title. |
|
380 * @param aTitle. |
|
381 * @return None. |
|
382 */ |
|
383 void SetIndicatorStateL(TInt aIndicatorType, const TDesC& aTitle); |
|
384 |
|
385 private: |
|
386 // status pane |
|
387 //CEikStatusPane* iStatusPane; |
|
388 |
|
389 // edit state indicator |
|
390 MAknEditingStateIndicator* iIndicator; |
|
391 |
|
392 // indicator container |
|
393 CAknIndicatorContainer* iIndicatorContainer; |
|
394 |
|
395 // indicator type |
|
396 TInt iIndicatorType; |
|
397 |
|
398 // has indicator been modified |
|
399 TBool iIndicatorModified; |
|
400 |
|
401 // indicator type |
|
402 TInt iPreviousIndicatorType; |
|
403 }; |
|
404 |
|
405 |
|
406 |
|
407 /** |
|
408 * CAspNaviPaneHandler |
|
409 * |
|
410 * This class is used for changing navipane title. |
|
411 */ |
|
412 NONSHARABLE_CLASS (CAspNaviPaneHandler) : public CBase |
|
413 { |
|
414 public: |
|
415 /** |
|
416 * Destructor. |
|
417 */ |
|
418 virtual ~CAspNaviPaneHandler(); |
|
419 |
|
420 /** |
|
421 * C++ default constructor. |
|
422 */ |
|
423 CAspNaviPaneHandler(CEikStatusPane* aStatusPane); |
|
424 |
|
425 public: |
|
426 |
|
427 /** |
|
428 * Sets navi pane title. |
|
429 * @param aTitle. |
|
430 * @return None. |
|
431 */ |
|
432 void SetNaviPaneTitleL(const TDesC& aTitle); |
|
433 |
|
434 /** |
|
435 * Store navi pane. |
|
436 * @param None. |
|
437 * @return None. |
|
438 */ |
|
439 void StoreNavipaneL(); |
|
440 |
|
441 private: |
|
442 // status pane |
|
443 CEikStatusPane* iStatusPane; |
|
444 |
|
445 // navi Pane |
|
446 CAknNavigationControlContainer* iNaviPane; |
|
447 |
|
448 // navi decorator |
|
449 CAknNavigationDecorator* iNaviDecorator; |
|
450 |
|
451 // has Navidecorator been pushed into navi pane |
|
452 TBool iNavidecoratorPushed; |
|
453 |
|
454 // has navi pane been pushed into navigation pane's object stack |
|
455 TBool iNavipanePushed; |
|
456 }; |
|
457 |
|
458 |
|
459 #ifdef RD_DSUI_TIMEDSYNC |
|
460 |
|
461 class CAspSettingDialog; |
|
462 |
|
463 /** |
|
464 * CAspTabbedNaviPaneHandler |
|
465 * |
|
466 * This class is used for changing tab group. |
|
467 */ |
|
468 NONSHARABLE_CLASS (CAspTabbedNaviPaneHandler) : public CBase, public MAknTabObserver |
|
469 { |
|
470 public: |
|
471 /** |
|
472 * Destructor. |
|
473 */ |
|
474 virtual ~CAspTabbedNaviPaneHandler(); |
|
475 |
|
476 /** |
|
477 * C++ default constructor. |
|
478 */ |
|
479 CAspTabbedNaviPaneHandler(CEikStatusPane* aStatusPane ,CAspSettingDialog *aDialog); |
|
480 |
|
481 |
|
482 |
|
483 public: |
|
484 void StoreNavipaneL(); |
|
485 void SetTabTextL(const TDesC& aText, TInt aTabId); |
|
486 void AddTabL(const TDesC& aText, TInt aTabId); |
|
487 void DeleteTabsL(); |
|
488 void SetActiveTabL(TInt aTabId); |
|
489 TInt TabIndex(TInt aTabId); |
|
490 void SetTabWidthL(); |
|
491 |
|
492 |
|
493 private: // from MAknTabObserver |
|
494 void TabChangedL(TInt aIndex); |
|
495 |
|
496 private: |
|
497 // status pane |
|
498 CEikStatusPane* iStatusPane; |
|
499 |
|
500 // navi Pane |
|
501 CAknNavigationControlContainer* iNaviPane; |
|
502 |
|
503 // navi decorator |
|
504 CAknNavigationDecorator* iNaviDecorator; |
|
505 |
|
506 // Tab group owned by the navigation decorator. |
|
507 CAknTabGroup* iTabGroup; |
|
508 |
|
509 |
|
510 // has Navidecorator been pushed into navi pane |
|
511 TBool iNavidecoratorPushed; |
|
512 |
|
513 // has navi pane been pushed into navigation pane's object stack |
|
514 TBool iNavipanePushed; |
|
515 |
|
516 CAspSettingDialog *iDialog; |
|
517 }; |
|
518 |
|
519 #endif |
|
520 |
|
521 /** |
|
522 * CStatusPaneHandler |
|
523 * |
|
524 * This class is used for changing dialog title and image. |
|
525 */ |
|
526 NONSHARABLE_CLASS (CStatusPaneHandler) : public CBase |
|
527 { |
|
528 public: |
|
529 /** |
|
530 * Two-phased constructor. |
|
531 */ |
|
532 static CStatusPaneHandler* NewL(CAknAppUi* aAppUi); |
|
533 |
|
534 /** |
|
535 * Destructor. |
|
536 */ |
|
537 virtual ~CStatusPaneHandler(); |
|
538 |
|
539 private: |
|
540 /** |
|
541 * By default Symbian OS constructor is private. |
|
542 */ |
|
543 void ConstructL(); |
|
544 |
|
545 /** |
|
546 * C++ default constructor. |
|
547 */ |
|
548 CStatusPaneHandler(CAknAppUi* aAppUi); |
|
549 |
|
550 public: |
|
551 /** |
|
552 * Stores original title so it can be restored when dialog closes. |
|
553 * @param None. |
|
554 * @return None. |
|
555 */ |
|
556 void StoreOriginalTitleL(); |
|
557 |
|
558 /** |
|
559 * Restores original title. |
|
560 * @param None. |
|
561 * @return None. |
|
562 */ |
|
563 void RestoreOriginalTitleL(); |
|
564 |
|
565 /** |
|
566 * Sets dialog title. |
|
567 * @param aText. |
|
568 * @return None. |
|
569 */ |
|
570 void SetTitleL(const TDesC& aText); |
|
571 |
|
572 /** |
|
573 * Sets dialog title. |
|
574 * @param aResourceId. |
|
575 * @return None. |
|
576 */ |
|
577 void SetTitleL(TInt aResourceId); |
|
578 |
|
579 public: |
|
580 /** |
|
581 * Sets dialog title. |
|
582 * @param aAppUi. |
|
583 * @param aText. |
|
584 * @return Return code. |
|
585 */ |
|
586 static TBool SetTitleL(CAknAppUi* aAppUi, const TDesC& aText); |
|
587 |
|
588 /** |
|
589 * Gets dialog title. |
|
590 * @param aAppUi. |
|
591 * @param aText. |
|
592 * @return Return code. |
|
593 */ |
|
594 static TBool GetTitleL(CAknAppUi* aAppUi, TDes& aText); |
|
595 |
|
596 /** |
|
597 * Sets dialog image. |
|
598 * @param aFilename. |
|
599 * @param aMainId. |
|
600 * @param aMaskId. |
|
601 * @return None. |
|
602 */ |
|
603 void SetNewImageL(const TDesC& aFilename,TInt aMainId,TInt aMaskId); |
|
604 |
|
605 /** |
|
606 * Restores original image. |
|
607 * @param None. |
|
608 * @return None. |
|
609 */ |
|
610 void RestoreOriginalImageL(); |
|
611 |
|
612 /** |
|
613 * Sets dialog image. |
|
614 * @param aAppUi. |
|
615 * @param aIcon. |
|
616 * @return Return code. |
|
617 */ |
|
618 static CEikImage* SetImageL(CAknAppUi* aAppUi, CEikImage* aIcon); |
|
619 |
|
620 /** |
|
621 * Sets navi pane title. |
|
622 * @param aTitle. |
|
623 * @return None. |
|
624 */ |
|
625 void SetNaviPaneTitleL(const TDesC& aTitle); |
|
626 |
|
627 /** |
|
628 * Sets navi pane title. |
|
629 * @param aTitle. |
|
630 * @return None. |
|
631 */ |
|
632 void SetNaviPaneTitle(const TDesC& aTitle); |
|
633 |
|
634 /** |
|
635 * Sets navi pane title. |
|
636 * @param aTitle. |
|
637 * @return None. |
|
638 */ |
|
639 void SetNaviPaneTitleL(TInt aResource); |
|
640 |
|
641 /** |
|
642 * Store navi pane. |
|
643 * @param None. |
|
644 * @return None. |
|
645 */ |
|
646 void StoreNavipaneL(); |
|
647 |
|
648 private: |
|
649 // access to app ui |
|
650 CAknAppUi* iAppUi; |
|
651 |
|
652 // original status pane title |
|
653 TBuf<KBufSize> iOriginalTitle; |
|
654 |
|
655 // is original status pane title stored |
|
656 TBool iOriginalTitleStored; |
|
657 |
|
658 // original context pane image |
|
659 CEikImage* iOriginalImage; |
|
660 |
|
661 CAspNaviPaneHandler* iNaviPaneHandler; |
|
662 }; |
|
663 |
|
664 |
|
665 |
|
666 |
|
667 /** |
|
668 * CAspSelectionItemList |
|
669 * |
|
670 * Needed for using cleanupstack with CSelectionItemList. |
|
671 */ |
|
672 NONSHARABLE_CLASS (CAspSelectionItemList) : public CSelectionItemList |
|
673 { |
|
674 public: |
|
675 /** |
|
676 * C++ default constructor. |
|
677 */ |
|
678 CAspSelectionItemList(TInt aGranularity); |
|
679 |
|
680 /** |
|
681 * Callback for operator TCleanupItem(). |
|
682 */ |
|
683 static void Cleanup(TAny* aObj); |
|
684 }; |
|
685 |
|
686 |
|
687 |
|
688 |
|
689 /** |
|
690 * CAspListItemData |
|
691 * |
|
692 * CAspListItemData represents one setting item in UI setting list |
|
693 */ |
|
694 NONSHARABLE_CLASS (CAspListItemData) : public CBase |
|
695 { |
|
696 public: |
|
697 enum TAspListItemType |
|
698 { |
|
699 ETypeInternetAccessPoint, |
|
700 ETypeList, |
|
701 ETypeBearerList, |
|
702 ETypeProtocolList, |
|
703 ETypeLocalDatabase, |
|
704 ETypeListYesNo, |
|
705 ETypeSecret, |
|
706 ETypeHostAddress, |
|
707 ETypeFilter, |
|
708 ETypeUseFilters, |
|
709 ETypeSyncContent, |
|
710 ETypeAutoSyncProfile, |
|
711 ETypeAutoSyncContent, |
|
712 ETypeAutoSyncFrequency, |
|
713 ETypeAutoSyncDays, |
|
714 ETypeAutoSyncPeakSchedule, |
|
715 ETypeAutoSyncOffPeakSchedule, |
|
716 ETypeAutoSyncTime, |
|
717 ETypeNumber, |
|
718 ETypeBoolean, |
|
719 ETypeText, |
|
720 ETypeText8, |
|
721 ETypeDate, |
|
722 ETypeTime, |
|
723 ETypeSchedulingSetting, |
|
724 ETypeProfileSetting |
|
725 |
|
726 }; |
|
727 |
|
728 public: |
|
729 static CAspListItemData* NewLC(); |
|
730 CAspListItemData(); |
|
731 virtual ~CAspListItemData(); |
|
732 void ConstructL(); |
|
733 |
|
734 public: |
|
735 void SetHeaderL(const TDesC& aText); |
|
736 void SetHeaderL(TInt aResourceId); |
|
737 void SetValueL(const TDesC& aText); |
|
738 void SetValueL(TInt aNumber); |
|
739 void SetDisplayValueL(const TDesC& aText); |
|
740 void SetDisplayValueL(TInt aResource); |
|
741 const TDesC& Header(); |
|
742 const TDesC& Value(); |
|
743 HBufC* ListItemTextL(TBool aConvert); |
|
744 void Init(); |
|
745 TBool IsEmpty(); |
|
746 |
|
747 public: |
|
748 // number type setting data |
|
749 TInt iNumberData; |
|
750 |
|
751 // date type setting |
|
752 TTime iDate; |
|
753 |
|
754 // time type setting |
|
755 TTime iTime; |
|
756 |
|
757 // setting item type |
|
758 TInt iItemType; |
|
759 |
|
760 // is setting shown in UI |
|
761 TInt iHidden; |
|
762 |
|
763 // max length for text type setting |
|
764 TInt iMaxLength; |
|
765 |
|
766 // setting editor resource id |
|
767 TInt iResource; |
|
768 |
|
769 // list index |
|
770 TInt iIndex; |
|
771 |
|
772 // item id |
|
773 TInt iItemId; |
|
774 |
|
775 // is settimg mandatory |
|
776 TBool iMandatory; |
|
777 |
|
778 // is latin input needed ??? |
|
779 TBool iLatinInput; |
|
780 |
|
781 // min number type setting value |
|
782 TInt iMinValue; |
|
783 |
|
784 // max number type setting value |
|
785 TInt iMaxValue; |
|
786 |
|
787 // filter item - used only in CAspFilterDialog |
|
788 //CAspFilter* iFilter; |
|
789 |
|
790 // did user press "Select" key or "Change" menu option |
|
791 TBool iSelectKeyPressed; |
|
792 |
|
793 private: |
|
794 // used in UI when value is empty |
|
795 HBufC* iDisplayValue; |
|
796 |
|
797 // setting header (title) |
|
798 HBufC* iHeader; |
|
799 |
|
800 // text type setting value |
|
801 HBufC* iValue; |
|
802 }; |
|
803 |
|
804 |
|
805 |
|
806 |
|
807 typedef CArrayPtr<CAspListItemData> CAspSettingList; //setting item list for profile page |
|
808 |
|
809 /** |
|
810 * CAspRadioButtonSettingPageEditor |
|
811 * |
|
812 * Setting page that returns command button id. |
|
813 */ |
|
814 NONSHARABLE_CLASS (CAspRadioButtonSettingPageEditor) : public CAknRadioButtonSettingPage |
|
815 { |
|
816 public: |
|
817 CAspRadioButtonSettingPageEditor(TInt aResourceID, TInt& aCurrentSelectionIndex, |
|
818 const MDesCArray* aItemArray); |
|
819 ~CAspRadioButtonSettingPageEditor(); |
|
820 |
|
821 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); |
|
822 }; |
|
823 |
|
824 |
|
825 /** |
|
826 * CAspTextSettingPagePageEditor |
|
827 * |
|
828 * Setting page that returns command button id. |
|
829 */ |
|
830 NONSHARABLE_CLASS (CAspTextSettingPageEditor) : public CAknTextSettingPage |
|
831 { |
|
832 public: |
|
833 CAspTextSettingPageEditor(TInt aResourceID,TDes& aText,TInt aTextSettingPageFlags); |
|
834 |
|
835 ~CAspTextSettingPageEditor(); |
|
836 |
|
837 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); |
|
838 }; |
|
839 |
|
840 |
|
841 /** |
|
842 * CAspAlphaPasswordSettingPageEditor |
|
843 * |
|
844 * Setting page that returns command button id. |
|
845 */ |
|
846 NONSHARABLE_CLASS (CAspAlphaPasswordSettingPageEditor) : public CAknAlphaPasswordSettingPage |
|
847 { |
|
848 public: |
|
849 CAspAlphaPasswordSettingPageEditor(TInt aResourceID, TDes& aNewPassword,const TDesC& aOldPassword); |
|
850 |
|
851 ~CAspAlphaPasswordSettingPageEditor(); |
|
852 |
|
853 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); |
|
854 }; |
|
855 |
|
856 /** |
|
857 * CAspAlphaPasswordSettingPageEditor |
|
858 * |
|
859 * Setting page that returns command button id. |
|
860 */ |
|
861 NONSHARABLE_CLASS (CAspIntegerSettingPageEditor) : public CAknIntegerSettingPage |
|
862 { |
|
863 public: |
|
864 CAspIntegerSettingPageEditor(TInt aResourceID, TInt& aValue, TInt aTextSettingPageFlags); |
|
865 |
|
866 ~CAspIntegerSettingPageEditor(); |
|
867 |
|
868 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); |
|
869 }; |
|
870 |
|
871 |
|
872 #endif // ASPDIALOGUTIL_H |
|
873 |
|
874 // End of File |