basiclocationinfodisplay/blid/ui/inc/CBlidSavedWayptsLBModel.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 SavedWayptsView's details
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CBLIDSAVEDWAYPTSLBMODEL_H
       
    19 #define CBLIDSAVEDWAYPTSLBMODEL_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32base.h>    // CBase
       
    23 #include <bamdesca.h>  // MDesCArray
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class MBlidLocation;
       
    27 class MBlidSettings;
       
    28 class MBlidRouter;
       
    29 class TPosition;
       
    30 class TCourse;
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 *  CBlidSavedWayptsLBModel
       
    35 *
       
    36 */
       
    37 class CBlidSavedWayptsLBModel : 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 CBlidSavedWayptsLBModel* NewLC( MBlidLocation* aLocationModel,
       
    48                                           MBlidSettings* aSettings,MBlidRouter* aRouter );
       
    49 
       
    50         /**
       
    51          * Destructor.
       
    52          */
       
    53         ~CBlidSavedWayptsLBModel();
       
    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         CBlidSavedWayptsLBModel( MBlidLocation* aLocationModel,
       
    67                             MBlidSettings* aSettings,MBlidRouter* aRouter );
       
    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 speed string
       
   100          * @param aSpeedString
       
   101          * @param aCourse
       
   102          */
       
   103         void SpeedFormat( TDes& aSpeedString,
       
   104                           TCourse aCourse ) const;
       
   105 
       
   106         /**
       
   107          * Format altitude string
       
   108          * @param aAltitudeString
       
   109          * @param aPosition
       
   110          */
       
   111         void AltitudeFormat( TDes& aAltitudeString,
       
   112                              TPosition aPosition  ) const;
       
   113         /**
       
   114          * Format Altitude accuracy string
       
   115          * @param aAccuracyString
       
   116          * @param aPosition
       
   117          */
       
   118 
       
   119         void altAccuracyFormat( TDes& aAltAccuracyString ) const;
       
   120 
       
   121     private: //data
       
   122         /// Own: conversion buffer
       
   123         HBufC* iBuffer;
       
   124 
       
   125         // Own: No Data indicator
       
   126         HBufC* iNoData;
       
   127 
       
   128         // Own: connect GPS indicator
       
   129         HBufC* iConnectGPS;
       
   130 
       
   131         /// Ref: Blid location model API
       
   132         MBlidLocation* iLocationModel;
       
   133 
       
   134         /// Ref: Blid settings model API
       
   135         MBlidSettings* iSettingsModel;
       
   136 
       
   137         /// Own: Latitude's title text string
       
   138         HBufC* iBlidLatitude;
       
   139 
       
   140         /// Own: Longitude's title text string
       
   141         HBufC* iBlidLongitude;
       
   142 
       
   143         /// Own: Accuracy's title text string
       
   144         HBufC* iBlidAccuracy;
       
   145 
       
   146         /// Own: Heading's title text string
       
   147         HBufC* iBlidAltAccuracy;
       
   148 
       
   149         /// Own: Speed's title text string
       
   150         HBufC* iBlidSpeed;
       
   151 
       
   152         /// Own: Altitude's title text string
       
   153         HBufC* iBlidAltitude;
       
   154         
       
   155         /// Own: Latitude's format text string
       
   156         HBufC* iLatitudeFormatNorth;
       
   157 
       
   158         /// Own: Latitude's format text string
       
   159         HBufC* iLatitudeFormatSouth;
       
   160 
       
   161         /// Own: Longitude's format text string
       
   162         HBufC* iLongitudeFormatWest;
       
   163 
       
   164         /// Own: Longitude's format text string
       
   165         HBufC* iLongitudeFormatEast;
       
   166 
       
   167         /// Own: Metric accuracy's format text string
       
   168         HBufC* iAccuraryFormatM;
       
   169 
       
   170         /// Own: Imperial accuracy's format text string
       
   171         HBufC* iAccuraryFormatFt;
       
   172 
       
   173         /// Own: Metric speed's format text string
       
   174         HBufC* iSpeedFormatKmph;
       
   175 
       
   176         /// Own: Imperial speed's format text string
       
   177         HBufC* iSpeedFormatMph;
       
   178 
       
   179         /// Own: Metric altitude's format text string
       
   180         HBufC* iAltitudeFormatM;
       
   181 
       
   182         /// Own: Imperial altitude's format text string
       
   183         HBufC* iAltitudeFormatFt;
       
   184 
       
   185         /// Own: Heading's format text string
       
   186         HBufC* iAltAccuracyFormat;
       
   187 
       
   188         /// Own: Heading's format text string
       
   189         HBufC* iDataBeingCalculated;
       
   190 
       
   191         /// Own: A Pointer to TLocale
       
   192         TLocale* iLocale;
       
   193 
       
   194         ///Pointer to router model
       
   195         MBlidRouter* iRouter;
       
   196     };
       
   197 
       
   198 #endif // CBLIDSAVEDWAYPTSLBMODEL_H
       
   199 
       
   200 // End of File