uiservicetab/vimpstui/inc/cvimpstuisearchfield.h
branchRCL_3
changeset 29 9a48e301e94b
parent 0 5e5d6b214f4f
equal deleted inserted replaced
28:3104fc151679 29:9a48e301e94b
       
     1 /*
       
     2 * Copyright (c) 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:  search field class declaration.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CVIMPSTUISEARCHFIELD_H
       
    20 #define CVIMPSTUISEARCHFIELD_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 #include "mvimpstuisearchfield.h"
       
    26 #include "tvimpstenums.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CEikCaptionedControl;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 /**
       
    33  * search editor field class declaration .
       
    34  *  @lib vimpstui.lib
       
    35  *  @since S60 v5.0
       
    36  */ 
       
    37  
       
    38 class  CVIMPSTUiSearchField  : public CBase,
       
    39 							   public MVIMPSTUiSearchField
       
    40     {
       
    41     
       
    42     public:  // Constructors and destructor
       
    43         
       
    44         /**
       
    45          * Creates a new instance of this class.
       
    46          * Creates editor fields 
       
    47          * append the field into array from last
       
    48          * @param aLebal, label of field
       
    49          * @param aFieldDataType, field data type
       
    50          * @param aFieldType, field type basic or advanced
       
    51          * @param aSearchKey, search key
       
    52          * @return  A new instance of this class.
       
    53          */    
       
    54         static CVIMPSTUiSearchField* NewL(const TDesC& aLebal, 
       
    55         			TVIMPSTSearchDataFieldType aFieldDataType,
       
    56         			TIMPSTSearchFieldTypes aFieldType, 
       
    57         			TVIMPSTEnums::TVIMPSTSearchKey aSearchKey  );
       
    58 
       
    59 		 /**
       
    60          * Destructor.
       
    61          */
       
    62         ~CVIMPSTUiSearchField();
       
    63         
       
    64     public: // from MVIMPSTUiSearchField
       
    65     	
       
    66 		/**
       
    67 		* @see MVIMPSTUiSearchField
       
    68 		*/
       
    69     	TInt ControlId() const;
       
    70         
       
    71         /**
       
    72 		* @see MVIMPSTUiSearchField
       
    73 		*/
       
    74         HBufC* ControlTextL() const;
       
    75         
       
    76         /**
       
    77 		* @see MVIMPSTUiSearchField
       
    78 		*/
       
    79         CEikEdwin* Control() const;
       
    80        
       
    81        /**
       
    82 		* @see MVIMPSTUiSearchField
       
    83 		*/
       
    84         void SetControl(CEikEdwin* aControl, CEikCaptionedControl* aCaptionedCtrl) ;
       
    85        
       
    86        /**
       
    87 		* @see MVIMPSTUiSearchField
       
    88 		*/
       
    89         void ActivateL() ; 
       
    90         
       
    91         /**
       
    92 		 * @see MVIMPSTUiSearchField
       
    93 		 */
       
    94         void SetFieldDataL( const TDesC& aData );
       
    95        
       
    96        /**
       
    97 		* @see MVIMPSTUiSearchField
       
    98 		*/
       
    99         TPtrC FieldLabel() ;    	
       
   100 		
       
   101 		/**
       
   102 		 * @see MVIMPSTUiSearchField
       
   103 		 */
       
   104 		TVIMPSTSearchDataFieldType FieldDataType() const ;
       
   105 		
       
   106 		/**
       
   107 		 * @see MVIMPSTUiSearchField
       
   108 		 */
       
   109 		TPtrC FieldData() ;
       
   110 		
       
   111 		/**
       
   112 		 * @see MVIMPSTUiSearchField
       
   113 		 */
       
   114 		void ResetFieldData() ;
       
   115 		
       
   116 		/**
       
   117 		 * @see MVIMPSTUiSearchField
       
   118 		 */
       
   119 		TBool IsBasicField() const;
       
   120 		
       
   121 		/**
       
   122 		 * @see MVIMPSTUiSearchField
       
   123 		 */
       
   124 		TVIMPSTEnums::TVIMPSTSearchKey GetSearchKey() const ;
       
   125 		 		
       
   126     private :
       
   127     
       
   128     	/**
       
   129          * C++ constructor.
       
   130          * @param aFieldDataType , field data type eg  text ,number 
       
   131          * @param aFieldType,  field type eg basic or advanced
       
   132          * @param aSearchKey, a search key
       
   133          */
       
   134         CVIMPSTUiSearchField(TVIMPSTSearchDataFieldType aFieldDataType, 
       
   135         					TIMPSTSearchFieldTypes aFieldType ,
       
   136         					TVIMPSTEnums::TVIMPSTSearchKey aSearchKey );
       
   137         
       
   138         /**
       
   139          * ConstructL
       
   140          * @param aLebal, a field label
       
   141          */
       
   142         void ConstructL(const TDesC& aLebal );
       
   143      
       
   144 		
       
   145  	private :
       
   146  	
       
   147  		// owns : a field data type
       
   148  		TVIMPSTSearchDataFieldType iFieldDataType;
       
   149  	
       
   150  		// owns : field type
       
   151  		HBufC* iFieldLabel;
       
   152  	
       
   153  		// owns : field saved data
       
   154  		HBufC* iFieldData;
       
   155  		
       
   156  		// owns : field type
       
   157  		TIMPSTSearchFieldTypes iFieldType;
       
   158  		
       
   159  		// owns : search key
       
   160  		TVIMPSTEnums::TVIMPSTSearchKey iSearchKey;
       
   161  		
       
   162  	protected: // Data
       
   163         // Ref: Editor control
       
   164         CEikEdwin* iControl;
       
   165         // Ref: Fields captioned control
       
   166         CEikCaptionedControl* iCaptionedCtrl; 	
       
   167  	      
       
   168     };
       
   169 
       
   170 #endif  // CVIMPSTUISEARCHFIELD_H
       
   171             
       
   172 // End of File
       
   173