landmarksui/uicontrols/src/CLmkSingleGraphicLBModel.cpp
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 -
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 // INCLUDE FILES
       
    26 #include "CLmkSingleGraphicLBModel.h"
       
    27 #include "CLmkListProviderBase.h"
       
    28 #include "CLmkSelectorCache.h"
       
    29 #include "CLmkUiItemBase.h"
       
    30 #include <EPos_Landmarks.h>
       
    31 #include <e32keys.h>
       
    32 
       
    33 // ============================ MEMBER FUNCTIONS ===============================
       
    34 
       
    35 // -----------------------------------------------------------------------------
       
    36 // CLmkSingleGraphicLBModel::CLmkSingleGraphicLBModel
       
    37 // C++ default constructor can NOT contain any code, that
       
    38 // might leave.
       
    39 // -----------------------------------------------------------------------------
       
    40 //
       
    41 CLmkSingleGraphicLBModel::CLmkSingleGraphicLBModel()
       
    42     {
       
    43 
       
    44     }
       
    45 
       
    46 // -----------------------------------------------------------------------------
       
    47 // CLmkSingleGraphicLBModel::ConstructL
       
    48 // Symbian 2nd phase constructor can leave.
       
    49 // -----------------------------------------------------------------------------
       
    50 //
       
    51 void CLmkSingleGraphicLBModel::ConstructL(
       
    52                                CLmkListProviderBase& aListProvider )
       
    53     {
       
    54     BaseConstructL( aListProvider );
       
    55     }
       
    56 
       
    57 // -----------------------------------------------------------------------------
       
    58 // CLmkSingleGraphicLBModel::NewL
       
    59 // Two-phased constructor.
       
    60 // -----------------------------------------------------------------------------
       
    61 //
       
    62 CLmkSingleGraphicLBModel* CLmkSingleGraphicLBModel::NewL(
       
    63     CLmkListProviderBase& aListProvider )
       
    64     {
       
    65     CLmkSingleGraphicLBModel* self = new ( ELeave ) CLmkSingleGraphicLBModel;
       
    66 
       
    67     CleanupStack::PushL( self );
       
    68     self->ConstructL( aListProvider );
       
    69     CleanupStack::Pop();
       
    70 
       
    71     return self;
       
    72     }
       
    73 
       
    74 // ----------------------------------------------------
       
    75 // CLmkSingleGraphicLBModel::~CLmkSingleGraphicLBModel
       
    76 // ----------------------------------------------------
       
    77 //
       
    78 CLmkSingleGraphicLBModel::~CLmkSingleGraphicLBModel()
       
    79     {
       
    80     }
       
    81 
       
    82 // -----------------------------------------------------------------------------
       
    83 // CLmkSingleGraphicLBModel::MdcaPointL
       
    84 // ?implementation_description
       
    85 // (other items were commented in a header).
       
    86 // -----------------------------------------------------------------------------
       
    87 //
       
    88 void CLmkSingleGraphicLBModel::MdcaPointL( TInt aIndex ) const
       
    89     {
       
    90     CLmkUiItemBase& item = iCache->ItemAtL( aIndex );
       
    91     TPtr16 modBuffer = iBuffer->Des();
       
    92     modBuffer.Zero();
       
    93     modBuffer.AppendNum( item.GetIconId() );
       
    94     modBuffer.Append( EKeyTab );
       
    95     modBuffer.Append( item.Text() );
       
    96     }
       
    97 
       
    98 //  End of File