|
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 * Name : CGSPredictiveSettingList from AknFepPredictiveSettingList |
|
20 * ============================================================================ |
|
21 */ |
|
22 |
|
23 #ifndef __GSPREDICTIVESETTING_DIALOG_H |
|
24 #define __GSPREDICTIVESETTING_DIALOG_H |
|
25 |
|
26 #include <AknDialog.h> |
|
27 #include "PredictiveSettingList.h" |
|
28 #include "PredictiveSettingData.h" |
|
29 |
|
30 enum TInputSettings |
|
31 { |
|
32 EAutoWordCompletion, |
|
33 ETypingCorrectionLevel, |
|
34 ENumberCandidate, |
|
35 EPrimaryCandidate |
|
36 }; |
|
37 |
|
38 class CGSPredictiveSettingDialog : public CAknDialog |
|
39 { |
|
40 public: |
|
41 /** |
|
42 * Function: NewL |
|
43 * |
|
44 * Discussion: Factory function used to create a new instance of |
|
45 * CGSPredictiveSettingDialog |
|
46 * |
|
47 * Params: aMenuResId - menu resource id. |
|
48 * Params: aConfirmationQueryResId - Confirmation Query resource id. |
|
49 * Returns: A newly created instance of CGSPredictiveSettingDialog |
|
50 */ |
|
51 static CGSPredictiveSettingDialog* NewL(TInt aMenuResId, TInt aConfirmationQueryResId); |
|
52 |
|
53 /** |
|
54 * Function: NewLC |
|
55 * |
|
56 * Discussion: Factory function used to create a new instance of |
|
57 * CGSPredictiveSettingDialog and leave a pointer to it on the |
|
58 * cleanup stack. |
|
59 * |
|
60 * Params: aMenuResId - menu resource id. |
|
61 * Params: aConfirmationQueryResId - Confirmation Query resource id. |
|
62 * Returns: A newly created instance of CGSPredictiveSettingDialog |
|
63 */ |
|
64 static CGSPredictiveSettingDialog* NewLC(TInt aMenuResId, TInt aConfirmationQueryResId); |
|
65 |
|
66 /** |
|
67 * Function: ~CGSPredictiveSettingDialog |
|
68 * |
|
69 * Discussion: Virtual destructor for CGSPredictiveSettingDialog. Ensures that all |
|
70 * allocated memory is returned to the heap before deletion |
|
71 * of object. |
|
72 * |
|
73 */ |
|
74 virtual ~CGSPredictiveSettingDialog(); |
|
75 |
|
76 virtual SEikControlInfo CreateCustomControlL(TInt aControlType); |
|
77 virtual CGSPredictiveSettingDialog::TFormControlTypes ConvertCustomControlTypeToBaseControlType(TInt aControlType) const; |
|
78 |
|
79 virtual TBool OkToExitL(TInt aButtonId); |
|
80 virtual void ProcessCommandL(TInt aCommandId); |
|
81 virtual void HandleResourceChange(TInt aType); |
|
82 |
|
83 void EditItemL(TBool aCalledFromMenu); |
|
84 |
|
85 void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
|
86 |
|
87 // From MEikMenuObserver |
|
88 virtual void DynInitMenuPaneL( TInt aResourceId, |
|
89 CEikMenuPane* aMenuPane ); |
|
90 |
|
91 private: |
|
92 void ConstructL( TInt aMenuTitleResourceId ); |
|
93 CGSPredictiveSettingDialog(TInt aConfirmationQueryResId); |
|
94 void ReadSettingsDataL(); |
|
95 void SaveSettingsDataL() const; |
|
96 void SaveCurrentSettingsDataL() const; |
|
97 void LaunchPredictiveSettingOffQueryIfNecessaryL(TInt aPrevSettings); |
|
98 TInt CurrentSettings(); |
|
99 |
|
100 TInt iConfirmationQueryResId; |
|
101 TInt iPredictiveTextFlag; |
|
102 TBool iPredictiveSettingOffQueryNotShown; |
|
103 #ifdef __ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__ |
|
104 |
|
105 static TInt EventCheckCallback(TAny* aObj); |
|
106 void AttemptToExitL(); |
|
107 |
|
108 TInt iOriginalKeyboardLayout; |
|
109 |
|
110 // iSettingItemInEditingState is introduced to avoid the crash when we are editing |
|
111 // the settings item and the flip staus changes. |
|
112 TBool iSettingItemInEditingState; |
|
113 |
|
114 CIdle* iItemCloseEventCheck; |
|
115 #endif //__ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__ |
|
116 |
|
117 protected: |
|
118 CGSPredictiveSettingList* iSettingsList; |
|
119 CGSPredictiveSettingData* iSettingsData; |
|
120 }; |
|
121 #endif //__GSPREDICTIVESETTING_DIALOG_H |