0
|
1 |
/*
|
|
2 |
* Copyright (c) 2004 - 2006 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
1
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
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 |
#ifndef __AKNEXQUERYCONTAINER_H__
|
|
20 |
#define __AKNEXQUERYCONTAINER_H__
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include <coecntrl.h>
|
|
24 |
#include <coecobs.h>
|
|
25 |
#include <AknGlobalListQuery.h>
|
|
26 |
#include <AknQueryDialog.h>
|
|
27 |
#include <aknglobalmsgquery.h> // for global message query
|
|
28 |
#include <AknPopup.h>
|
|
29 |
#include "AknExQueryGlobalListObserver.h"
|
|
30 |
|
|
31 |
// CONSTANTS
|
|
32 |
const TInt KAknExQueryTextBufLength = 128;
|
|
33 |
|
1
|
34 |
#define KAknExQueryGray TRgb( 0xEaaaaa )
|
0
|
35 |
#define AKNEXQUERY_LABEL_ORIGIN TPoint( 0, 0 )
|
|
36 |
#define AKNEXQUERY_LABEL2_POSITION TPoint( 0, 20 )
|
|
37 |
|
|
38 |
const TInt KAknExQueryCountComponentControls = 1;
|
|
39 |
const TInt KAknExQueryNameColumnIndex = 0;
|
|
40 |
const TInt KAknExQueryNameGapColumnIndex = 1;
|
|
41 |
const TInt KAknExQueryListBoxRectPointX = 30;
|
|
42 |
const TInt KAknExQueryListBoxRectPointY = 15;
|
|
43 |
const TInt KAknExQueryListBoxRectWidth = 120;
|
|
44 |
const TInt KAknExQueryListBoxRectHeight = 120;
|
|
45 |
|
|
46 |
_LIT( KAknExQueryMbmFilePath, "\\private\\A0000232\\aknexquery.mbm" );
|
|
47 |
|
|
48 |
// FORWARD DECLARATIONS
|
|
49 |
class CEikLabel;
|
|
50 |
class CEikColumnListBox;
|
|
51 |
class CAknExQueryView;
|
|
52 |
class CAknExQueryBaseListEventHandler;
|
|
53 |
|
|
54 |
// CLASS DECLARATION
|
|
55 |
|
|
56 |
/**
|
|
57 |
* CAknExQueryContainer container control class.
|
|
58 |
*/
|
|
59 |
class CAknExQueryContainer : public CCoeControl
|
|
60 |
{
|
|
61 |
public:
|
|
62 |
|
|
63 |
private: // Enumerations
|
|
64 |
|
|
65 |
enum TAknExQueryComponentControls
|
|
66 |
{
|
|
67 |
EAknExQueryComponentLabel, //0
|
|
68 |
EAknExQueryComponentLabel2, //1
|
|
69 |
EAknExQueryComponentListBox //2
|
|
70 |
};
|
|
71 |
|
|
72 |
public: // Constructors and destructor
|
|
73 |
|
|
74 |
/**
|
|
75 |
* CAknExQueryContainer
|
|
76 |
* Constructor.
|
|
77 |
* @param aView Pointer to View class object.
|
|
78 |
*/
|
|
79 |
CAknExQueryContainer( CAknExQueryView* aView );
|
|
80 |
|
|
81 |
/**
|
|
82 |
* ConstructL
|
|
83 |
* Symbian default constructor.
|
|
84 |
* @param aRect Frame rectangle for container.
|
|
85 |
*/
|
|
86 |
void ConstructL( const TRect& aRect );
|
|
87 |
|
|
88 |
/**
|
|
89 |
* ~CAknExQueryContainer
|
|
90 |
* Destructor.
|
|
91 |
*/
|
|
92 |
virtual ~CAknExQueryContainer();
|
|
93 |
|
|
94 |
public: // New functions
|
|
95 |
|
|
96 |
/**
|
|
97 |
* ShowConfirmationQueryL
|
|
98 |
* Shows confirmation query.
|
|
99 |
* @param aResourceId for dialog.
|
|
100 |
* @param aTextResourceId for prompt.
|
|
101 |
* @param aToneFlag is flag for adding tone to argument of constructor.
|
|
102 |
* @param aPromptFlag is flag for displaying prompt dynamically.
|
|
103 |
* @param aHeaderTextAndImageFlag
|
|
104 |
* @param aTone
|
|
105 |
*/
|
|
106 |
void ShowConfirmationQueryL(
|
|
107 |
const TInt aResourceId,
|
|
108 |
const TInt aTextResourceId = 0,
|
|
109 |
const TBool aPromptFlag = EFalse,
|
|
110 |
const TBool aToneFlag = EFalse,
|
|
111 |
const TBool aHeaderTextAndImageFlag = EFalse,
|
|
112 |
const CAknQueryDialog::TTone aTone = CAknQueryDialog::ENoTone );
|
|
113 |
|
|
114 |
|
|
115 |
/**
|
|
116 |
* ShowDataQueryL
|
|
117 |
* Shows data query.
|
|
118 |
* @param aQueryResourceId for dialog.
|
|
119 |
* @param aTextResourceId for inial value.
|
|
120 |
* @param aPromptResourceId for ptompt
|
|
121 |
* @param aMaxLength sets up the length of the character.
|
|
122 |
* @param aDisplayFlag
|
|
123 |
*/
|
|
124 |
void ShowDataQueryL(
|
|
125 |
const TInt aQueryResourceId,
|
|
126 |
const TInt aTextResourceId = 0,
|
|
127 |
const TInt aPromptResourceId = 0,
|
|
128 |
const TInt aMaxLength = 0,
|
|
129 |
const TInt aDisplayFlag = ETrue );
|
|
130 |
|
|
131 |
/**
|
|
132 |
* ShowListQueryL
|
|
133 |
* Show list query.
|
|
134 |
* @param aResourceId
|
|
135 |
*/
|
|
136 |
void ShowListQueryL( const TInt aResourceId );
|
|
137 |
|
|
138 |
/**
|
|
139 |
* PopoutListBoxL
|
|
140 |
* Create handler.
|
|
141 |
*/
|
|
142 |
void PopoutListBoxL();
|
|
143 |
|
|
144 |
/**
|
|
145 |
* CreateListBoxL
|
|
146 |
* Creates listbox object.
|
|
147 |
*/
|
|
148 |
void CreateListBoxL();
|
|
149 |
|
|
150 |
/**
|
|
151 |
* DeleteListBoxL
|
|
152 |
* Deletes listbox object.
|
|
153 |
*/
|
|
154 |
void DeleteListBoxL();
|
|
155 |
|
|
156 |
/**
|
|
157 |
* CreateLabelL
|
|
158 |
* Creates label object.
|
|
159 |
* @param aResourceId
|
|
160 |
*/
|
|
161 |
void CreateLabelL( TInt aResourceId );
|
|
162 |
|
|
163 |
/**
|
|
164 |
* DeleteLabelL
|
|
165 |
* Deletes label object.
|
|
166 |
*/
|
|
167 |
void DeleteLabelL();
|
|
168 |
|
|
169 |
/**
|
|
170 |
* SetTextToLabelL
|
|
171 |
* Set Label text.
|
|
172 |
* @param aResourceId
|
|
173 |
*/
|
|
174 |
void SetTextToLabelL( TInt aResourceId );
|
|
175 |
|
|
176 |
/**
|
|
177 |
* ShowMessageL
|
|
178 |
* Show Message Text.
|
|
179 |
* @param aMessage
|
|
180 |
*/
|
|
181 |
void ShowMessageL( const TDesC& aMessage );
|
|
182 |
|
|
183 |
/**
|
|
184 |
* ShowMultiLineTimeAndDurationLayoutL
|
|
185 |
* Show multi line time and duration layout.
|
|
186 |
* @param aResourceId for dialog
|
|
187 |
* @param aTopResourceId for top of multi line.
|
|
188 |
*/
|
|
189 |
void ShowMultiLineTimeAndDurationLayoutL(
|
|
190 |
const TInt aResourceId,
|
|
191 |
const TInt aTopResourceId );
|
|
192 |
|
|
193 |
/**
|
|
194 |
* ShowGlobalListQueryL
|
|
195 |
* The function for the test of the following three APIs.
|
|
196 |
* MoveSelectionUp, MoveSelectionDown, SelectItem.
|
|
197 |
*/
|
|
198 |
void ShowGlobalListQueryL();
|
|
199 |
|
|
200 |
public: // From CCoeControl
|
|
201 |
|
|
202 |
/**
|
|
203 |
* From CCoeControl, OfferKeyEventL.
|
|
204 |
* Handles the key events.
|
|
205 |
* @return if key-event is consumed, EKeyWasConsumed.
|
|
206 |
* Else EKeyWasNotConsumed
|
|
207 |
* @param aKeyEvent Key event
|
|
208 |
* @param aType Type of key event ( EEventKey, EEventKeyUp or
|
|
209 |
* EEventKeyDown )
|
|
210 |
*/
|
|
211 |
TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
|
|
212 |
TEventCode aType );
|
|
213 |
|
|
214 |
private: // From CCoeControl
|
|
215 |
|
|
216 |
/**
|
|
217 |
* From CCoeControl, SizeChanged.
|
|
218 |
*
|
|
219 |
*/
|
|
220 |
void SizeChanged();
|
|
221 |
|
|
222 |
/**
|
|
223 |
* From CCoeControl, CountComponentControls.
|
|
224 |
* Returns number of component.
|
|
225 |
* @return Number of controls
|
|
226 |
*/
|
|
227 |
TInt CountComponentControls() const;
|
|
228 |
|
|
229 |
/**
|
|
230 |
* From CCoeControl, ComponentControl.
|
|
231 |
* Returns pointer to particular component.
|
|
232 |
* @return Pointer to Control's component control, identified by index
|
|
233 |
* @param aIndex Index of the control
|
|
234 |
*/
|
|
235 |
CCoeControl* ComponentControl( TInt aIndex ) const;
|
|
236 |
|
|
237 |
/**
|
|
238 |
* From CCoeControl, Draw.
|
|
239 |
* @param aRect Region of the control to be ( re )drawn.
|
|
240 |
*/
|
|
241 |
void Draw( const TRect& aRect ) const;
|
|
242 |
|
|
243 |
private: //New Function
|
|
244 |
|
|
245 |
/**
|
|
246 |
* ShowResultMessageL
|
|
247 |
* Show Result Message.
|
|
248 |
* @param aResult
|
|
249 |
*/
|
|
250 |
void ShowResultMessageL( TBool aResult );
|
|
251 |
|
|
252 |
/**
|
|
253 |
* SetIconL
|
|
254 |
* @param aDlg
|
|
255 |
* @param aBitmap
|
|
256 |
* @param aMask
|
|
257 |
*/
|
|
258 |
void SetIconL( CAknQueryDialog* aDlg, TInt32 aBitmap, TInt32 aMask );
|
|
259 |
|
|
260 |
private: // Data
|
|
261 |
|
|
262 |
/**
|
|
263 |
* iLabel
|
|
264 |
* Owned by CAknExQueryContainer object.
|
|
265 |
*/
|
|
266 |
CEikLabel* iLabel;
|
|
267 |
|
|
268 |
/**
|
|
269 |
* iLabelResultMessage
|
|
270 |
* Owned by CAknExQueryContainer object.
|
|
271 |
*/
|
|
272 |
CEikLabel* iLabelResultMessage;
|
|
273 |
|
|
274 |
/**
|
|
275 |
* iView
|
|
276 |
* Does not own
|
|
277 |
*/
|
|
278 |
CAknExQueryView* iView;
|
|
279 |
|
|
280 |
/**
|
|
281 |
* iListBox
|
|
282 |
* Owned by CAknExQueryContainer object.
|
|
283 |
*/
|
|
284 |
CEikColumnListBox* iListBox;
|
|
285 |
|
|
286 |
/**
|
|
287 |
* iHandler
|
|
288 |
* Owned by CAknExQueryContainer object.
|
|
289 |
*/
|
|
290 |
CAknExQueryBaseListEventHandler* iHandler;
|
|
291 |
|
|
292 |
/**
|
|
293 |
* iDisplayDialog, boolean for Display Dialog
|
|
294 |
*/
|
|
295 |
TBool iDisplayDialog;
|
|
296 |
|
|
297 |
/**
|
|
298 |
* iGlobalListQuery
|
|
299 |
* Owned by CAknExQueryContainer object.
|
|
300 |
*/
|
|
301 |
CAknGlobalListQuery* iGlobalListQuery;
|
|
302 |
|
|
303 |
/**
|
|
304 |
* iGlobalListObserver
|
|
305 |
* Owned by CAknExQueryContainer object.
|
|
306 |
*/
|
|
307 |
CAknExQueryGlobalListObserver* iGlobalListObserver;
|
|
308 |
|
|
309 |
};
|
|
310 |
|
|
311 |
#endif // __AKNEXQUERYCONTAINER_H__
|
|
312 |
|
|
313 |
// End of File
|