fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepPredictiveSettingDialog.h
changeset 40 2cb9bae34d17
parent 31 f1bdd6b078d1
child 49 37f5d84451bd
equal deleted inserted replaced
31:f1bdd6b078d1 40:2cb9bae34d17
     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 	private:
       
   109 		void ConstructL( TInt aMenuTitleResourceId );
       
   110 		CAknFepPredictiveSettingDialog(TInt aConfirmationQueryResId, TInt aTitlePaneResId);
       
   111 		void ReadSettingsDataL();
       
   112 	    void SaveSettingsDataL() const;
       
   113 	    void SaveCurrentSettingsDataL() const;
       
   114 	    void LaunchPredictiveSettingOffQueryIfNecessaryL(TInt prevSettings);
       
   115 	    TInt CurrentSettings();
       
   116 	    void PrepareStatusPaneL();
       
   117 	    void SetTitlePaneL();
       
   118 	    void RestoreStatusPaneL();
       
   119 	    TInt  iConfirmationQueryResId;
       
   120 	    TInt  iPredictiveTextFlag;
       
   121 	    TBool iPredictiveSettingOffQueryNotShown;
       
   122 	    
       
   123 	    CAknTitlePane* iTitlePane;
       
   124 	    CAknNavigationControlContainer* iNaviPane;
       
   125 	    CAknNavigationDecorator*        iNaviDecoratedTabGroup;
       
   126 	    HBufC* iLastTitle;
       
   127 	    HBufC* iStatusTitle;
       
   128 	    TInt iTitlePaneResId;
       
   129 	    
       
   130 		static TInt EventCheckCallback(TAny* aObj);
       
   131 		void AttemptToExitL();
       
   132 
       
   133 #ifdef __ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__		
       
   134 	    TInt 						iOriginalKeyboardLayout;
       
   135 #endif //__ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__
       
   136 	    
       
   137 	    // iSettingItemInEditingState is introduced to avoid the crash when we are editing 
       
   138 	    // the settings item and the flip staus changes.
       
   139 	    TBool 						iSettingItemInEditingState; 
       
   140 	    CIdle* 						iItemCloseEventCheck;
       
   141 	
       
   142 	protected:
       
   143 	CAknFepPredictiveSettingList*	iSettingsList;
       
   144 	CAknFepPredictiveSettingData*	iSettingsData;
       
   145 	CRepository*					iAknFepRepository;
       
   146 };
       
   147 #endif //__AKN_FEP_PREDICTIVESETTING_DIALOG_H