|
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 #include "uiservicetabtracer.h" |
|
23 |
|
24 // ======== MEMBER FUNCTIONS ======== |
|
25 |
|
26 // --------------------------------------------------------------------------- |
|
27 // CVIMPSTUiListBox::CreateModelL |
|
28 // Here we change the listbox model |
|
29 // --------------------------------------------------------------------------- |
|
30 // |
|
31 void CVIMPSTUiSingleStyleListBox::CreateModelL() |
|
32 { |
|
33 // we have to make sure that the model is ours, |
|
34 // so we can leave if the model creation fails. |
|
35 // (just make sure that the pointer is NULL) |
|
36 // in column style listbox , listboxes consturctL() calls this method |
|
37 delete iModel; |
|
38 iModel = NULL; |
|
39 iModel = new ( ELeave ) CVIMPSTUiListBoxModel; |
|
40 } |
|
41 |
|
42 // --------------------------------------------------------------------------- |
|
43 // CVIMPSTUiListBox::SetContactListModel |
|
44 // ConstructL has to be called before calling this |
|
45 // --------------------------------------------------------------------------- |
|
46 // |
|
47 void CVIMPSTUiSingleStyleListBox::SetContactListModelL(MVIMPSTProcessArray& aContactListModel ) |
|
48 { |
|
49 TRACER_AUTO; |
|
50 if ( iModel ) |
|
51 { |
|
52 static_cast<CVIMPSTUiListBoxModel*>(iModel)->SetContactListModel( aContactListModel ); |
|
53 } |
|
54 } |
|
55 |
|
56 |