uiservicetab/vimpstui/src/cvimpstuidoublestylelistbox.cpp
changeset 0 5e5d6b214f4f
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 "cvimpstuidoublestylelistbox.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 CVIMPSTUiDoubleStyleListBox::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     //delete iModel;
       
    36     //iModel = NULL;
       
    37     iListBoxModel = new ( ELeave ) CVIMPSTUiListBoxModel;
       
    38     }
       
    39 
       
    40 // ---------------------------------------------------------------------------
       
    41 // CVIMPSTUiListBox::SetContactListModel
       
    42 // ConstructL has to be called before calling this
       
    43 // ---------------------------------------------------------------------------
       
    44 //
       
    45 void CVIMPSTUiDoubleStyleListBox::SetContactListModelL(MVIMPSTProcessArray& aContactListModel )
       
    46     {
       
    47     CreateModelL();
       
    48     if ( iListBoxModel )
       
    49         {
       
    50         static_cast<CVIMPSTUiListBoxModel*>(iListBoxModel)->SetContactListModel( aContactListModel );
       
    51         }
       
    52     }
       
    53     
       
    54 // ---------------------------------------------------------------------------
       
    55 // CVIMPSTUiListBox::~CVIMPSTUiListBox()
       
    56 // ConstructL has to be called before calling this
       
    57 // ---------------------------------------------------------------------------
       
    58 //
       
    59 CVIMPSTUiDoubleStyleListBox::~CVIMPSTUiDoubleStyleListBox()
       
    60 	{
       
    61 	delete iListBoxModel;
       
    62 	}