|
1 /* |
|
2 * Copyright (c) 2007-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: Define query dialog for user DB management |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 #ifndef C_AKNFEPUSERDBQUERYDLG_H |
|
30 #define C_AKNFEPUSERDBQUERYDLG_H |
|
31 |
|
32 // INCLUDES |
|
33 #include <e32std.h> |
|
34 #include <e32base.h> |
|
35 #include <AknQueryDialog.h> |
|
36 |
|
37 // CLASS DECLARATION |
|
38 class CDBManagement; |
|
39 |
|
40 |
|
41 /** |
|
42 * Query dialog for user DB management |
|
43 * In this query dialog, it will check phrase and show note |
|
44 * |
|
45 * @code |
|
46 * ?good_class_usage_example(s) |
|
47 * @endcode |
|
48 * |
|
49 * @lib ?library |
|
50 * @since S60 v3.1 |
|
51 */ |
|
52 class CAknFepUserDBQueryDlg : public CAknTextQueryDialog |
|
53 { |
|
54 public: |
|
55 // Constructors and destructor |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 ~CAknFepUserDBQueryDlg(); |
|
61 |
|
62 /** |
|
63 * Two-phased constructor. |
|
64 * @param aDBEngine Pointer of DBEngine |
|
65 * @param aText Text which for initialization of query dialog |
|
66 * @param aPrompt Prompt for query |
|
67 * @param aTone The tone played before the dialog is shown. |
|
68 * Default No tone is played. |
|
69 */ |
|
70 static CAknFepUserDBQueryDlg* NewL( CDBManagement* aDBEngine, |
|
71 TDes& aText, const TDesC& aPrompt, |
|
72 const TTone& aTone = ENoTone ); |
|
73 |
|
74 /** |
|
75 * Two-phased constructor. |
|
76 * @param aDBEngine Pointer of DBEngine |
|
77 * @param aText Text which for initialization of query dialog |
|
78 * @param aPrompt Prompt for query |
|
79 * @param aTone The tone played before the dialog is shown. |
|
80 * Default No tone is played. |
|
81 */ |
|
82 static CAknFepUserDBQueryDlg* NewLC( CDBManagement* aDBEngine, |
|
83 TDes& aText, const TDesC& aPrompt, |
|
84 const TTone& aTone = ENoTone ); |
|
85 |
|
86 private: |
|
87 |
|
88 /** |
|
89 * C++ constructor. |
|
90 * @param aDBEngine Pointer of DBEngine |
|
91 * @param aText Text which for initialization of query dialog |
|
92 * @param aTone The tone played before the dialog is shown. |
|
93 * Default No tone is played. |
|
94 */ |
|
95 CAknFepUserDBQueryDlg( CDBManagement* aDBEngine, |
|
96 TDes& aText, |
|
97 const TTone& aTone = ENoTone ); |
|
98 |
|
99 /** |
|
100 * Symbian second-phase constructor. |
|
101 * @param aPrompt Prompt for query |
|
102 */ |
|
103 void ConstructL( const TDesC& aPrompt ); |
|
104 |
|
105 // From base class CAknQueryDialog |
|
106 /** |
|
107 * From base class CAknQueryDialog |
|
108 * Deal the softkey event |
|
109 * @param aButtonId softkey Id |
|
110 * @return ETrue to validate and exit the dialog, EFalse to keep the dialog active. |
|
111 */ |
|
112 TBool OkToExitL( TInt aButtonId ); |
|
113 |
|
114 /** |
|
115 * From base class CAknQueryDialog |
|
116 * Initializes the dialog's controls after the |
|
117 * dialog has been sized but before it has been activated |
|
118 * @param None |
|
119 * @return None |
|
120 */ |
|
121 void PostLayoutDynInitL(); |
|
122 |
|
123 private: // data |
|
124 |
|
125 /** |
|
126 * Engine |
|
127 * Not own |
|
128 */ |
|
129 CDBManagement* iDBEngine; |
|
130 |
|
131 /** |
|
132 * Text pointer in query |
|
133 * Not own |
|
134 */ |
|
135 TDes* iptrbuf; |
|
136 |
|
137 /** |
|
138 * Text in query |
|
139 * Own |
|
140 */ |
|
141 HBufC* iItemText; |
|
142 |
|
143 }; |
|
144 |
|
145 #endif // C_AKNFEPUSERDBQUERYDLG_H |