eventsui/eventsmgmtui/src/evtmgmtuilistbox.cpp
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     2 * Copyright (c) 2009 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:  List box class for Events Management UI.
       
    15 *
       
    16 */
       
    17 
       
    18 #include "evtmgmtuilistbox.h"
       
    19 #include "evtmgmtuilistboxmodel.h"
       
    20 
       
    21 // ============================ MEMBER FUNCTIONS ===============================
       
    22 
       
    23 // -----------------------------------------------------------------------------
       
    24 // -----------------------------------------------------------------------------
       
    25 //
       
    26 void CEvtMgmtUiListBox::ConstructL(
       
    27     const CCoeControl* aParent,
       
    28     TInt aFlags)
       
    29     {
       
    30     // Continue construction of the object.
       
    31     CEikFormattedCellListBox::ConstructL(aParent, aFlags);
       
    32     
       
    33     if(iModel)
       
    34         {
       
    35         delete iModel;
       
    36         iModel = NULL;
       
    37         }
       
    38     
       
    39     // Create a specialized model.
       
    40     iModel = CEvtMgmtUiListBoxModel::NewL();
       
    41     }
       
    42 
       
    43 // -----------------------------------------------------------------------------
       
    44 // -----------------------------------------------------------------------------
       
    45 //
       
    46 void CEvtMgmtUiListBox::CreateModelL()
       
    47     {
       
    48     // Do nothing. Model is already constructed in constructor.
       
    49     // This method must be overridden to prevent base class to recreate a new, 
       
    50     // for our purpuses, non-suitable model.
       
    51     }
       
    52 
       
    53 // -----------------------------------------------------------------------------
       
    54 // -----------------------------------------------------------------------------
       
    55 //
       
    56 CEvtMgmtUiListBoxModel* CEvtMgmtUiListBox::Model() const
       
    57     {
       
    58     return static_cast <CEvtMgmtUiListBoxModel*> (iModel);
       
    59     }
       
    60 
       
    61