1 /* |
|
2 * Copyright (c) 2006 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: Header file for a class showing dialogs and notes. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CIRDIALOGLAUNCHER_H |
|
20 #define CIRDIALOGLAUNCHER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <aknnotifystd.h> |
|
24 |
|
25 class CAknGlobalNote; |
|
26 class CAknInformationNote; |
|
27 |
|
28 /** |
|
29 * Defines dialog launcher. |
|
30 * |
|
31 * Helper class to show dialogs, notes etc. |
|
32 */ |
|
33 class CIRDialogLauncher : public CBase |
|
34 { |
|
35 |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Static constructor. |
|
40 */ |
|
41 static CIRDialogLauncher* NewL(); |
|
42 |
|
43 /** |
|
44 * Destructor |
|
45 */ |
|
46 ~CIRDialogLauncher(); |
|
47 |
|
48 /** |
|
49 * Displays a confirmation note |
|
50 * |
|
51 * @param aText Text to show. |
|
52 * @param aWaiting If true the function blocks until the note is dismissed. |
|
53 */ |
|
54 void ShowConfirmationNoteL( const TDesC& aText, TBool aWaiting ) const; |
|
55 |
|
56 /** |
|
57 * Displays a confirmation note |
|
58 * |
|
59 * @param aTextResourceId Resource ID for the text string. |
|
60 * @param aWaiting If true the function blocks until the note is dismissed. |
|
61 */ |
|
62 void ShowConfirmationNoteL( TInt aTextResourceId, TBool aWaiting ) const; |
|
63 |
|
64 /** |
|
65 * Displays an information note |
|
66 * |
|
67 * @param aTextResourceId Resource ID for the text string. |
|
68 * @param aWaiting If true the function blocks until the note is dismissed. |
|
69 * @param aDialogId The dialog ID for publishing its usage (given only if publishing is wanted). |
|
70 */ |
|
71 void ShowInformationNoteL( TInt aTextResourceId, TBool aWaiting, |
|
72 TInt aDialogId = KErrNotFound ) const; |
|
73 |
|
74 /** |
|
75 * Displays an information note |
|
76 * |
|
77 * @param aErrorCode The error code whose related text is being resolved. |
|
78 */ |
|
79 void ShowInformationNoteL( TInt aErrorCode ) const; |
|
80 |
|
81 /** |
|
82 * Displays an error note |
|
83 * |
|
84 * @param aTextResourceId Resource ID for the text string. |
|
85 * @param aWaiting If true the function blocks until the note is dismissed. |
|
86 */ |
|
87 void ShowErrorNoteL( TInt aTextResourceId, TBool aWaiting ) const; |
|
88 |
|
89 /** |
|
90 * Displays a global note |
|
91 * |
|
92 * @param aType Note type. |
|
93 * @param aTextResourceId Resource ID for the text string. |
|
94 */ |
|
95 void ShowGlobalNoteL( TAknGlobalNoteType aType, TInt aTextResourceId ) const; |
|
96 |
|
97 |
|
98 |
|
99 /** |
|
100 * Launches a query dialog. |
|
101 * @param aResourceId The resource ID of the dialog to load. |
|
102 * @param aDialogId The dialog ID for publishing its usage (given only if publishing is wanted). |
|
103 * @return ID of the button that closed the dialog, or zero if it was the cancel button. |
|
104 */ |
|
105 void ShowQueryDialogL( TInt aResourceId, TInt& aValue,TInt aDialogId = KErrNotFound) const; |
|
106 |
|
107 /** |
|
108 * Launches a query dialog. |
|
109 * @param aResourceId The resource ID of the dialog to load. |
|
110 * @param aPrompt Text for prompt. |
|
111 * @param aDialogId The dialog ID for publishing its usage (given only if publishing is wanted). |
|
112 * @return ID of the button that closed the dialog, or zero if it was the cancel button. |
|
113 */ |
|
114 void ShowQueryDialogL(TInt aResourceId,const TDesC& aPrompt, TInt& aValue, |
|
115 TInt aDialogId = KErrNotFound) const; |
|
116 |
|
117 void ShowQueryDialogDeletionL(const TDesC& aMessage,TInt& aValue); |
|
118 |
|
119 |
|
120 |
|
121 protected: |
|
122 |
|
123 private: |
|
124 |
|
125 /** |
|
126 * Constructor. |
|
127 */ |
|
128 CIRDialogLauncher(); |
|
129 |
|
130 /** |
|
131 * By default Symbian 2nd phase constructor is private. |
|
132 */ |
|
133 void ConstructL(); |
|
134 |
|
135 |
|
136 /** |
|
137 * Resolves the platform provided error text related to system errorcodes. |
|
138 * |
|
139 * @param aErrorCode The error code whose related text is being resolved. |
|
140 * @return The error text provided by platform. |
|
141 */ |
|
142 HBufC* ResolveDefaultErrorTextLC( TInt aErrorCode ) const; |
|
143 |
|
144 private: // Data |
|
145 |
|
146 |
|
147 }; |
|
148 |
|
149 #endif |
|