|
1 /* |
|
2 * Copyright (c) 2002-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: Data query dialog for Call Divert view. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef GSCALLDIVERTQUERY_H |
|
20 #define GSCALLDIVERTQUERY_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <AknQueryDialog.h> |
|
24 |
|
25 // CLASS DECLARATION |
|
26 |
|
27 /** |
|
28 * GSCallDivertQuery is responsible for creating a data query dialog. |
|
29 * This class basicly just switches the active softkeys. |
|
30 */ |
|
31 class CGSCallDivertQuery : public CAknTextQueryDialog |
|
32 { |
|
33 public: // Constructors and destructor |
|
34 |
|
35 /* Two-phased constructor */ |
|
36 static CGSCallDivertQuery* NewL( TDes& aDataText, |
|
37 const TTone& aTone, |
|
38 TInt aOKCba, |
|
39 TInt aDefaultCba ); |
|
40 |
|
41 /* Destructor */ |
|
42 ~CGSCallDivertQuery() {}; |
|
43 |
|
44 public: // Functions from base class |
|
45 |
|
46 /** |
|
47 * From CAknQueryDialog, takes care of user input. |
|
48 * @param aKeyEvent which event |
|
49 * @param aType type of event |
|
50 */ |
|
51 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
52 TEventCode aType ); |
|
53 |
|
54 /** |
|
55 * From CAknQueryDialog, takes care of user input. |
|
56 * @param aKeyEvent which event |
|
57 * @return boolean |
|
58 */ |
|
59 TBool NeedToDismissQueryL( const TKeyEvent& aKeyEvent ); |
|
60 |
|
61 /** |
|
62 * From CEikDialog, called after layout. |
|
63 */ |
|
64 void PostLayoutDynInitL(); |
|
65 |
|
66 /** |
|
67 * From CEikDialog, called before layout. |
|
68 */ |
|
69 void PreLayoutDynInitL(); |
|
70 |
|
71 /** |
|
72 * From CEikdialog, check if it is OK to exit. |
|
73 * @param aButtonId id of pressed button |
|
74 */ |
|
75 TBool OkToExitL( TInt aButtonId ); |
|
76 |
|
77 /** |
|
78 * From CAknQueryDialog. Used to update data after stylus event. |
|
79 */ |
|
80 TBool HandleQueryEditorStateEventL( CAknQueryControl* aQueryControl, |
|
81 TQueryControlEvent aEventType, |
|
82 TQueryValidationStatus aStatus ); |
|
83 |
|
84 private: |
|
85 /* C++ default constructor */ |
|
86 CGSCallDivertQuery( TDes& aDataText, |
|
87 const TTone& aTone, |
|
88 TInt aOKCba, |
|
89 TInt aDefaultCba ); |
|
90 |
|
91 /** |
|
92 * Updates softkeys to Search-Cancel if required. |
|
93 */ |
|
94 void UpdateSoftkeysL(); |
|
95 |
|
96 /** |
|
97 * Changes softkeys as specified. |
|
98 * |
|
99 * @param aCba new cba |
|
100 */ |
|
101 void SetCbaL( TInt aCba ); |
|
102 |
|
103 private: |
|
104 // OK cba, used when there is text in query. |
|
105 TInt iOKCba; |
|
106 // Default cba, used when there is no text in query. |
|
107 const TInt iDefaultCba; |
|
108 // Current cba. |
|
109 TInt iCurrentCba; |
|
110 // About to exit the Query |
|
111 TInt iLeaving; |
|
112 }; |
|
113 |
|
114 #endif |
|
115 // End of File |