textinput/GSLangPlugin/inc/PredictiveSettingData.h
branchRCL_3
changeset 21 ecbabf52600f
parent 0 eb1f2e154e89
equal deleted inserted replaced
20:ebd48d2de13c 21:ecbabf52600f
       
     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     : CGSPredictiveSettingData from AknFepPredictiveSettingData.h
       
    20  * ============================================================================
       
    21  */
       
    22 
       
    23 #ifndef __GSPREDICTIVESETTING_DATA_H
       
    24 #define __GSPREDICTIVESETTING_DATA_H
       
    25 
       
    26 #include <e32base.h>
       
    27 
       
    28 /**
       
    29  * Class: 		CGSPredictiveSettingData
       
    30  *
       
    31  * Discussion:	An aggregate class containing data for all editing controls
       
    32  *				This class is used as a central respository for all data
       
    33  *				to be displayed and editted within this app.
       
    34  */
       
    35 class CGSPredictiveSettingData : public CBase
       
    36 {
       
    37 public:
       
    38 	/**
       
    39  	* Function: 	NewL
       
    40 	*
       
    41  	* Discussion:	Factory function used to create a new instance of
       
    42  	* 				CGSPredictiveSettingData
       
    43 	*
       
    44  	* Returns:		A newly created instance of CGSPredictiveSettingData with all data
       
    45  	*				items valid
       
    46 	*/
       
    47 	static CGSPredictiveSettingData* NewL();
       
    48 
       
    49 	/**
       
    50  	* Function: 	NewLC
       
    51 	*
       
    52  	* Discussion:	Factory function used to create a new instance of
       
    53  	* 				CGSPredictiveSettingData and leave a pointer to it on the cleanup
       
    54  	*				stack
       
    55 	*
       
    56  	* Returns:		A newly created instance of CGSPredictiveSettingData with all data
       
    57  	*				items valid
       
    58 	*/
       
    59 	static CGSPredictiveSettingData* NewLC();
       
    60 
       
    61 	/**
       
    62 	* Function:		~CGSPredictiveSettingData
       
    63 	*
       
    64 	* Discussion: 	Virtual destructor for CGSPredictiveSettingData. Ensures that all
       
    65 	*				allocated memory is returned to the heap before deletion
       
    66 	* 				of object.
       
    67 	*
       
    68 	*/
       
    69 	virtual ~CGSPredictiveSettingData();
       
    70 
       
    71     /**
       
    72     * Function:    LoadL
       
    73     * 
       
    74     * Discussion:  Loads itself with parameters passed.
       
    75     * 
       
    76     */
       
    77     void LoadL(TInt aAutoWordCompl,
       
    78 			   TInt aTypingCorrection,
       
    79 			   TInt aNumberCandidates,
       
    80 			   TInt aPrimaryCandidate,
       
    81 			   TInt aPhysicalKeyboards,
       
    82 			   TInt aAWCBitmask);
       
    83     
       
    84     /**
       
    85     * Function:     SaveL
       
    86     * 
       
    87     * Discussion:   Saves itself.
       
    88     * 
       
    89     */
       
    90 	void SaveL() const;
       
    91     
       
    92 	/**
       
    93  	* Function: 	AutoWordCompl
       
    94 	*
       
    95  	* Discussion:	Trivial accessor function
       
    96 	*
       
    97  	* Returns:		A reference to the iAutoWordCompl member
       
    98 	*/
       
    99 	inline TInt& AutoWordCompl() {return iAutoWordCompl; }
       
   100 	
       
   101 	/**
       
   102  	* Function: 	TypingCorrection
       
   103 	*
       
   104  	* Discussion:	Trivial accessor function
       
   105 	*
       
   106  	* Returns:		A reference to the iTypingCorrection member
       
   107 	*/
       
   108 	inline TInt& TypingCorrection() { return iTypingCorrection; }
       
   109 
       
   110 	
       
   111 	/**
       
   112  	* Function: 	NumberCandidates
       
   113 	*
       
   114  	* Discussion:	Trivial accessor function
       
   115 	*
       
   116  	* Returns:		A reference to the iNumberCandidates member
       
   117 	*/
       
   118 	inline TInt& NumberCandidates() {return iNumberCandidates; }
       
   119 	
       
   120 	/**
       
   121  	* Function: 	PrimaryCandidate
       
   122 	*
       
   123  	* Discussion:	Trivial accessor function
       
   124 	*
       
   125  	* Returns:		A reference to the iPrimaryCandidate member
       
   126 	*/
       
   127 	inline TInt& PrimaryCandidate() {return iPrimaryCandidate; }
       
   128 	
       
   129 	/**
       
   130 	* Function:     PhysicalKeyboards
       
   131 	*
       
   132 	* Discussion:   Trivial accessor function
       
   133 	*
       
   134 	* Returns:      Value of iPhysicalKeyboards member
       
   135 	*/
       
   136 	inline TInt PhysicalKeyboards() {return iPhysicalKeyboards; }
       
   137 
       
   138     /**
       
   139     * Function:     AWCBitmask
       
   140     *
       
   141     * Discussion:   Trivial accessor function
       
   142     *
       
   143     * Returns:      Value of iPhysicalKeyboards member
       
   144     */
       
   145     inline TInt& AWCBitmask() {return iAWCBitmask; }
       
   146 
       
   147 private:
       
   148 	/**
       
   149 	* Function:		CGSPredictiveSettingData
       
   150 	*
       
   151 	* Discussion: 	Hidden, first-stage non-leaving constructor.
       
   152 	*
       
   153 	*/
       
   154 	CGSPredictiveSettingData();
       
   155 
       
   156 	/**
       
   157 	* Function:		ConstructL
       
   158 	*
       
   159 	* Discussion: 	Hidden, second-stage possibly-leaving constructor.
       
   160 	*
       
   161 	*/
       
   162 	void ConstructL();
       
   163 
       
   164 
       
   165 public:
       
   166 	TInt iAutoWordCompl;					/* Data for AutoWordCompl field          */
       
   167 	TInt iTypingCorrection;					/* Data for TypingCorrection text field  */
       
   168 	TInt iNumberCandidates;					/* Data for NumberCandidates field       */
       
   169 	TInt iPrimaryCandidate;					/* Data for PrimaryCandidate field       */
       
   170     TInt iPhysicalKeyboards;                /* Data for PhysicalKeyboards field      */
       
   171     TInt iAWCBitmask;                       /* AWC data in bitmask form              */
       
   172     
       
   173 };
       
   174 
       
   175 #endif // __GSPREDICTIVESETTING_DATA_H
       
   176