landmarksui/engine/inc/CLmkFieldData.h
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     2 * Copyright (c) 2002 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:    LandmarksUi Content File -    Include data for form items
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 #ifndef CLMKFIELDDATA_H
       
    26 #define CLMKFIELDDATA_H
       
    27 
       
    28 //  INCLUDES
       
    29 #include "MLmkFieldData.h"
       
    30 #include <e32base.h>
       
    31 #include <EPos_Landmarks.h>
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 *  Landmarks field's data
       
    37 */
       
    38 class CLmkFieldData : public CBase, public MLmkFieldData
       
    39     {
       
    40     public:  // Constructors and destructor
       
    41         /**
       
    42         * Two-phased constructor.
       
    43         * @param aLabel
       
    44         * @return newly instantiated object
       
    45         */
       
    46         static CLmkFieldData* NewL( HBufC* aLabel );
       
    47 
       
    48         /**
       
    49         * Destructor.
       
    50         */
       
    51         ~CLmkFieldData();
       
    52 
       
    53     private:
       
    54         /**
       
    55         * C++ default constructor.
       
    56         * @return newly instantiated object
       
    57         */
       
    58         CLmkFieldData();
       
    59 
       
    60         /**
       
    61         * By default Symbian 2nd phase constructor is private.
       
    62         * @param aLabel
       
    63         */
       
    64         void ConstructL( HBufC* aLabel );
       
    65 
       
    66     private: //From MLmkFieldData
       
    67         void SetLabel( HBufC* aLabel );
       
    68         const HBufC& Label() const;
       
    69 
       
    70         void SetEditorType( const TUint16 aType );
       
    71         TUint16 EditorType() const;
       
    72 
       
    73         void SetTextL( const TPtrC aText );
       
    74         void SetText( HBufC* aText ); //take ownership
       
    75         const HBufC& TextData() const;
       
    76 
       
    77         void SetInt( const TInt aTInt );
       
    78         TInt IntegerData() const;
       
    79 
       
    80         void SetTReal( const TReal32 aTReal );
       
    81         TReal32 FloatData() const;
       
    82 
       
    83         void SetTReal( const TReal64 aTReal );
       
    84         TReal64 DoubleData() const;
       
    85 
       
    86         RArray<TPosLmItemId>& Categories() ;
       
    87         TInt UniqueFieldIdentity() const;
       
    88 
       
    89         void SetFieldType( const TUint16 aFieldType );
       
    90         TUint16 FieldType() const;
       
    91 
       
    92         void SetPositionFieldId( const TUint16 aPositionFieldId );
       
    93         TUint16 PositionFieldId() const;
       
    94 
       
    95         void SetFieldLength( const TInt aLength );
       
    96         TInt FieldLength() const;
       
    97 
       
    98         void SetTitleField( const TBool aTitleField );
       
    99         TBool IsTitleField() const;
       
   100 
       
   101         void SetIconId( const TInt aIconId );
       
   102         TInt IconId() const;
       
   103 
       
   104         void SetIconPathL( const TDesC& aIconPath );
       
   105         HBufC* IconPath();
       
   106 
       
   107     private: //data
       
   108 
       
   109         TUint16 iFieldType;
       
   110 
       
   111         TUint16 iEditorType;
       
   112 
       
   113         TUint16 iPositionFieldId;
       
   114 
       
   115         TInt iUniqueFieldIdentity;
       
   116 
       
   117         TInt iFieldLength;
       
   118 
       
   119         ///Ref:
       
   120     	HBufC* iLabel;
       
   121 
       
   122         ///Own:
       
   123     	HBufC* iTextData;
       
   124 
       
   125     	RArray<TPosLmItemId> iCategories;
       
   126 
       
   127     	TInt iIntData;
       
   128 
       
   129     	TReal32 iTRealData32;
       
   130 
       
   131         TReal64 iTRealData64;
       
   132 
       
   133         TBool iTitleField;
       
   134 
       
   135         TInt iIconId;
       
   136 
       
   137         ///Own:
       
   138         HBufC* iIconPath;
       
   139 
       
   140     };
       
   141 
       
   142 #endif      // CLMKFIELDDATA_H
       
   143 
       
   144 // End of File