|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 /* |
|
28 * ============================================================================ |
|
29 * Name : CAknFepPredictiveSettingList from AknFepPredictiveSettingList |
|
30 * ============================================================================ |
|
31 */ |
|
32 |
|
33 #ifndef __AKN_FEP_PREDICTIVESETTING_DIALOG_H |
|
34 #define __AKN_FEP_PREDICTIVESETTING_DIALOG_H |
|
35 |
|
36 #include <AknDialog.h> |
|
37 #include "AknFepPredictiveSettingList.h" |
|
38 #include "AknFepPredictiveSettingData.h" |
|
39 |
|
40 class CRepository; |
|
41 class CAknTitlePane; |
|
42 class CAknNavigationControlContainer; |
|
43 class CAknNavigationDecorator; |
|
44 |
|
45 enum TInputSettings |
|
46 { |
|
47 EAutoWordCompletion, |
|
48 ETypingCorrectionLevel, |
|
49 ENumberCandidate, |
|
50 EPrimaryCandidate |
|
51 }; |
|
52 |
|
53 class CAknFepPredictiveSettingDialog : public CAknDialog |
|
54 { |
|
55 public: |
|
56 /** |
|
57 * Function: NewL |
|
58 * |
|
59 * Discussion: Factory function used to create a new instance of |
|
60 * CAknFepPredictiveSettingDialog |
|
61 * |
|
62 * Params: aMenuResId - menu resource id. |
|
63 * Params: aConfirmationQueryResId - Confirmation Query resource id. |
|
64 * Params: aTitlePaneResId - Titlepane resource id. |
|
65 * Returns: A newly created instance of CAknFepPredictiveSettingDialog |
|
66 */ |
|
67 static CAknFepPredictiveSettingDialog* NewL(TInt aMenuResId, TInt aConfirmationQueryResId, TInt aTitlePaneResId); |
|
68 |
|
69 /** |
|
70 * Function: NewLC |
|
71 * |
|
72 * Discussion: Factory function used to create a new instance of |
|
73 * CAknFepPredictiveSettingDialog and leave a pointer to it on the |
|
74 * cleanup stack. |
|
75 * |
|
76 * Params: aMenuResId - menu resource id. |
|
77 * Params: aConfirmationQueryResId - Confirmation Query resource id. |
|
78 * Params: aTitlePaneResId - Titlepane resource id. |
|
79 * Returns: A newly created instance of CAknFepPredictiveSettingDialog |
|
80 */ |
|
81 static CAknFepPredictiveSettingDialog* NewLC(TInt aMenuResId, TInt aConfirmationQueryResId, TInt aTitlePaneResId); |
|
82 |
|
83 /** |
|
84 * Function: ~CAknFepPredictiveSettingDialog |
|
85 * |
|
86 * Discussion: Virtual destructor for CAknFepPredictiveSettingDialog. Ensures that all |
|
87 * allocated memory is returned to the heap before deletion |
|
88 * of object. |
|
89 * |
|
90 */ |
|
91 virtual ~CAknFepPredictiveSettingDialog(); |
|
92 |
|
93 virtual SEikControlInfo CreateCustomControlL(TInt aControlType); |
|
94 virtual CAknFepPredictiveSettingDialog::TFormControlTypes ConvertCustomControlTypeToBaseControlType(TInt aControlType) const; |
|
95 |
|
96 virtual TBool OkToExitL(TInt aButtonId); |
|
97 virtual void ProcessCommandL(TInt aCommandId); |
|
98 virtual void HandleResourceChange(TInt aType); |
|
99 |
|
100 void EditItemL(TBool aCalledFromMenu); |
|
101 |
|
102 void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
|
103 |
|
104 // From MEikMenuObserver |
|
105 virtual void DynInitMenuPaneL( TInt aResourceId, |
|
106 CEikMenuPane* aMenuPane ); |
|
107 |
|
108 protected: |
|
109 /** |
|
110 * From CAknDialog |
|
111 * Lays out the dialog's components when the size of the dialog |
|
112 * is changed. |
|
113 */ |
|
114 virtual void SizeChanged(); |
|
115 private: |
|
116 void ConstructL( TInt aMenuTitleResourceId ); |
|
117 CAknFepPredictiveSettingDialog(TInt aConfirmationQueryResId, TInt aTitlePaneResId); |
|
118 void ReadSettingsDataL(); |
|
119 void SaveSettingsDataL() const; |
|
120 void SaveCurrentSettingsDataL() const; |
|
121 void LaunchPredictiveSettingOffQueryIfNecessaryL(TInt prevSettings); |
|
122 TInt CurrentSettings(); |
|
123 void PrepareStatusPaneL(); |
|
124 void SetTitlePaneL(); |
|
125 void RestoreStatusPaneL(); |
|
126 TInt iConfirmationQueryResId; |
|
127 TInt iPredictiveTextFlag; |
|
128 TBool iPredictiveSettingOffQueryNotShown; |
|
129 |
|
130 CAknTitlePane* iTitlePane; |
|
131 CAknNavigationControlContainer* iNaviPane; |
|
132 CAknNavigationDecorator* iNaviDecoratedTabGroup; |
|
133 HBufC* iLastTitle; |
|
134 HBufC* iStatusTitle; |
|
135 TInt iTitlePaneResId; |
|
136 |
|
137 static TInt EventCheckCallback(TAny* aObj); |
|
138 void AttemptToExitL(); |
|
139 |
|
140 #ifdef __ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__ |
|
141 TPtiKeyboardType iOriginalKeyboardLayout; |
|
142 #endif //__ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__ |
|
143 |
|
144 // iSettingItemInEditingState is introduced to avoid the crash when we are editing |
|
145 // the settings item and the flip staus changes. |
|
146 TBool iSettingItemInEditingState; |
|
147 CIdle* iItemCloseEventCheck; |
|
148 TBool iSimuKey; |
|
149 |
|
150 protected: |
|
151 CAknFepPredictiveSettingList* iSettingsList; |
|
152 CAknFepPredictiveSettingData* iSettingsData; |
|
153 CRepository* iAknFepRepository; |
|
154 }; |
|
155 #endif //__AKN_FEP_PREDICTIVESETTING_DIALOG_H |