|
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: PhoneUI Text Query. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPHONETEXTQUERY_H |
|
20 #define CPHONETEXTQUERY_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <AknQueryDialog.h> |
|
24 |
|
25 // CLASS DECLARATION |
|
26 |
|
27 class CPhoneTextQuery : public CAknTextQueryDialog |
|
28 { |
|
29 public: |
|
30 |
|
31 /** |
|
32 * Constructor. |
|
33 */ |
|
34 CPhoneTextQuery( |
|
35 MEikCommandObserver& aCommandObserver, |
|
36 TDes& aDataText, |
|
37 TInt aDefaultCbaResourceId, |
|
38 TInt aContentCbaResourceId, |
|
39 TBool aSendKeyEnabled, |
|
40 TInt aEikBidOkCmd = EEikBidOk ); |
|
41 |
|
42 /** |
|
43 * Destructor. |
|
44 */ |
|
45 virtual ~CPhoneTextQuery(); |
|
46 |
|
47 /** |
|
48 * From CAknTextQueryDialog, handles keyevents. |
|
49 */ |
|
50 TKeyResponse OfferKeyEventL( |
|
51 const TKeyEvent& aKeyEvent, |
|
52 TEventCode aType ); |
|
53 |
|
54 /** |
|
55 * From CAknTextQueryDialog, dynamic initialization |
|
56 * after layout. |
|
57 */ |
|
58 void PostLayoutDynInitL(); |
|
59 |
|
60 void GetContent( TDes& aText ); |
|
61 |
|
62 |
|
63 private: |
|
64 |
|
65 /** |
|
66 * From CEikdialog This function is called by the EIKON framework |
|
67 * if the user activates a button in the button panel. |
|
68 * It is not called if the Cancel button is activated, |
|
69 * unless the EEikDialogFlagNotifyEsc flag is set. |
|
70 * @param aButtonId The ID of the button that was activated |
|
71 * @return Should return ETrue if the dialog should exit, and EFalse if it should not. |
|
72 */ |
|
73 TBool OkToExitL( TInt aButtonId ); |
|
74 |
|
75 /** |
|
76 * Updates softkeys. |
|
77 */ |
|
78 void UpdateSoftkeysL(); |
|
79 |
|
80 /** |
|
81 * Asks the command id from the softkey (CBA) |
|
82 * @return the command id or 0 in case of problems |
|
83 */ |
|
84 TInt FetchCommandFromCba(); |
|
85 |
|
86 private: // Data |
|
87 |
|
88 MEikCommandObserver& iCommandObserver; |
|
89 |
|
90 TInt iDefaultCbaResourceId; |
|
91 |
|
92 TInt iContentCbaResourceId; |
|
93 |
|
94 TBool iSendKeyHandlingEnabled; |
|
95 |
|
96 TInt iEikBidOkCmd; |
|
97 }; |
|
98 |
|
99 #endif // CPHONETEXTQUERY_H |
|
100 |
|
101 // End of File |