basiclocationinfodisplay/blid/ui/inc/CBlidOwnPosLBModel.h
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     2 * Copyright (c) 2005 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:  Provides OwnPosView's details
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CBLIDOWNPOSLBMODEL_H
       
    19 #define CBLIDOWNPOSLBMODEL_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32base.h>    // CBase
       
    23 #include <bamdesca.h>  // MDesCArray
       
    24 
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class MBlidLocation;
       
    28 class MBlidSettings;
       
    29 class TPosition;
       
    30 class TCourse;
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 *  CBlidOwnPosLBModel
       
    35 *
       
    36 */
       
    37 class CBlidOwnPosLBModel : public CBase, public MDesCArray
       
    38     {
       
    39     public: // Constructors and destructor
       
    40 
       
    41         /**
       
    42          * Two-phased constructor.
       
    43          * @param aLocationModel A pointer to Location model
       
    44          * @param aSettingsModel A pointer to Blid settings API
       
    45          * @return CBlidEng object.
       
    46          */
       
    47 		static CBlidOwnPosLBModel* NewLC( MBlidLocation* aLocationModel,
       
    48                                           MBlidSettings* aSettings );
       
    49 
       
    50         /**
       
    51          * Destructor.
       
    52          */
       
    53         ~CBlidOwnPosLBModel();
       
    54 
       
    55     private: //
       
    56         /**
       
    57          * Second phase of construction.
       
    58          */
       
    59         void ConstructL();
       
    60 
       
    61         /**
       
    62          * c++ default constructor.
       
    63          * @param aLocationModel A pointer to Location model
       
    64          * @param aSettingsModel A pointer to Blid settings API
       
    65          */
       
    66         CBlidOwnPosLBModel( MBlidLocation* aLocationModel,
       
    67                             MBlidSettings* aSettings );
       
    68 
       
    69     private: // From MDesCArray
       
    70         TInt MdcaCount() const;
       
    71         TPtrC16 MdcaPoint(TInt aIndex) const;
       
    72 
       
    73     private: //new functions
       
    74         /**
       
    75          * Format latitude string
       
    76          * @param aLatitudeString
       
    77          * @param aPosition
       
    78          */
       
    79         void LatitudeFormat( TDes& aLatitudeString,
       
    80                              TPosition aPosition ) const;
       
    81 
       
    82         /**
       
    83          * Format longitude string
       
    84          * @param aLongitudeString
       
    85          * @param aPosition
       
    86          */
       
    87         void LongitudeFormat( TDes& aLongitudeString,
       
    88                               TPosition aPosition  ) const;
       
    89 
       
    90         /**
       
    91          * Format accuracy string
       
    92          * @param aAccuracyString
       
    93          * @param aPosition
       
    94          */
       
    95         void AccuracyFormat( TDes& aAccuracyString,
       
    96                              TPosition aPosition ) const;
       
    97 
       
    98         /**
       
    99          * Format altitude string
       
   100          * @param aAltitudeString
       
   101          * @param aPosition
       
   102          */
       
   103         void AltitudeFormat( TDes& aAltitudeString,
       
   104                              TPosition aPosition  ) const;
       
   105         /**
       
   106          * Format Altitude accuracy string
       
   107          * @param aAccuracyString
       
   108          * @param aPosition
       
   109          */
       
   110 
       
   111         void altAccuracyFormat( TDes& aAltAccuracyString ) const;
       
   112 
       
   113     private: //data
       
   114         /// Own: conversion buffer
       
   115         HBufC* iBuffer;
       
   116 
       
   117         // Own: connect GPS indicator
       
   118         HBufC* iConnectGPS;
       
   119 
       
   120         /// Ref: Blid location model API
       
   121         MBlidLocation* iLocationModel;
       
   122 
       
   123         /// Ref: Blid settings model API
       
   124         MBlidSettings* iSettingsModel;
       
   125 
       
   126         /// Own: Latitude's title text string
       
   127         HBufC* iBlidLatitude;
       
   128 
       
   129         /// Own: Longitude's title text string
       
   130         HBufC* iBlidLongitude;
       
   131 
       
   132         /// Own: Accuracy's title text string
       
   133         HBufC* iBlidAccuracy;
       
   134 
       
   135         /// Own: Heading's title text string
       
   136         HBufC* iBlidAltAccuracy;
       
   137 
       
   138         /// Own: Speed's title text string
       
   139         HBufC* iBlidSpeed;
       
   140 
       
   141         /// Own: Altitude's title text string
       
   142         HBufC* iBlidAltitude;
       
   143         
       
   144         /// Own: Metric accuracy's format text string
       
   145         HBufC* iAccuraryFormatM;
       
   146 
       
   147         /// Own: Imperial accuracy's format text string
       
   148         HBufC* iAccuraryFormatFt;
       
   149 
       
   150         /// Own: Metric speed's format text string
       
   151         HBufC* iSpeedFormatKmph;
       
   152 
       
   153         /// Own: Imperial speed's format text string
       
   154         HBufC* iSpeedFormatMph;
       
   155 
       
   156         /// Own: Metric altitude's format text string
       
   157         HBufC* iAltitudeFormatM;
       
   158 
       
   159         /// Own: Imperial altitude's format text string
       
   160         HBufC* iAltitudeFormatFt;
       
   161 
       
   162         /// Own: Heading's format text string
       
   163         HBufC* iDataBeingCalculated;
       
   164 
       
   165         /// Own: A Pointer to TLocale
       
   166         TLocale* iLocale;
       
   167         
       
   168         // Own: Not Available indicator
       
   169         HBufC* iNotAvailable;
       
   170         
       
   171         /// Own: Data blank text string
       
   172         HBufC* iDataBlank;
       
   173         
       
   174         /// Own: Waiting GPS data text string
       
   175         HBufC* iWaitingGpsData;
       
   176     };
       
   177 
       
   178 #endif // CBLIDOWNPOSLBMODEL_H
       
   179 
       
   180 // End of File