landmarksui/uicontrols/inc/CLmkEditorCoordinateField.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 -    Landmark editor number field.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 #ifndef __CLmkEditorCoordinateField_H__
       
    25 #define __CLmkEditorCoordinateField_H__
       
    26 
       
    27 //  INCLUDES
       
    28 #include "CLmkEditorFieldBase.h"
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class MLmkEditorUiBuilder;
       
    32 class CEikCaptionedControl;
       
    33 class CAknLocationEditor;
       
    34 class TPosition;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39 * Landmark editor number field.
       
    40 */
       
    41 class CLmkEditorCoordinateField : public CLmkEditorFieldBase
       
    42     {
       
    43     public:  // Constructors and destructor
       
    44         /**
       
    45          * Creates a new instance of this class - number editor to a field.
       
    46 		 * @param aField the to be edited field
       
    47 		 * @param aUiBuilder reference to UI builder
       
    48          */
       
    49 		static CLmkEditorCoordinateField* NewL(
       
    50                 MLmkFieldData& aField,
       
    51                 MLmkEditorUiBuilder& aUiBuilder);
       
    52 
       
    53         /**
       
    54          * Destructor.
       
    55          */
       
    56         ~CLmkEditorCoordinateField();
       
    57 
       
    58     public:  // from MLmkEditorField
       
    59         TBool SaveFieldL();
       
    60         void ActivateL();
       
    61         void UpdateL();
       
    62 	    //from CLmkEditorFieldBase
       
    63         TReal FieldValue() const;
       
    64 
       
    65         /**
       
    66          * Resets the field
       
    67          */
       
    68     	void ResetL();
       
    69 
       
    70     protected:  // Implementation
       
    71         CLmkEditorCoordinateField(
       
    72 				MLmkFieldData& aField,
       
    73 				MLmkEditorUiBuilder& aUiBuilder);
       
    74 
       
    75     private:    // implementation
       
    76         void ConstructL();
       
    77 		void CreateAvkonCoordinateEditorL();
       
    78 		void ConstructEditorFromResourceL();
       
    79 		TPosition ConstructPosition(const TReal& aValue);
       
    80 
       
    81     protected:  // Data
       
    82         /// Ref: Fields editor
       
    83 		CAknLocationEditor* iControl;
       
    84 		TBool iIsLatitude;
       
    85         /// Ref: fields captioned control
       
    86         CEikCaptionedControl* iCaptionedCtrl;
       
    87         TReal iCurrentValue;
       
    88     };
       
    89 
       
    90 #endif // __CLmkEditorCoordinateField_H__
       
    91 
       
    92 // End of File