uiservicetab/vimpstui/src/cvimpstuisinglestylelistbox.cpp
changeset 0 5e5d6b214f4f
child 9 9fdee5e1da30
equal deleted inserted replaced
-1:000000000000 0:5e5d6b214f4f
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Custom listbox component for the contact list
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "cvimpstuisinglestylelistbox.h"
       
    20 #include "cvimpstuilistboxmodel.h"
       
    21 #include <aknlists.h>
       
    22 
       
    23 // ======== MEMBER FUNCTIONS ========
       
    24 
       
    25 // ---------------------------------------------------------------------------
       
    26 // CVIMPSTUiListBox::CreateModelL
       
    27 // Here we change the listbox model
       
    28 // ---------------------------------------------------------------------------
       
    29 //
       
    30 void CVIMPSTUiSingleStyleListBox::CreateModelL()
       
    31     {
       
    32     // we have to make sure that the model is ours,
       
    33     // so we can leave if the model creation fails.
       
    34     // (just make sure that the pointer is NULL)
       
    35     // in column style listbox , listboxes consturctL() calls this method
       
    36     delete iModel;
       
    37     iModel = NULL;
       
    38     iModel = new ( ELeave ) CVIMPSTUiListBoxModel;
       
    39     }
       
    40 
       
    41 // ---------------------------------------------------------------------------
       
    42 // CVIMPSTUiListBox::SetContactListModel
       
    43 // ConstructL has to be called before calling this
       
    44 // ---------------------------------------------------------------------------
       
    45 //
       
    46 void CVIMPSTUiSingleStyleListBox::SetContactListModelL(MVIMPSTProcessArray& aContactListModel )
       
    47     {
       
    48     if ( iModel )
       
    49         {
       
    50         static_cast<CVIMPSTUiListBoxModel*>(iModel)->SetContactListModel( aContactListModel );
       
    51         }
       
    52     }
       
    53     
       
    54