|
1 /* |
|
2 * Copyright (c) 2006 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: Creator class for views. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDES |
|
20 #include "MCAListBox.h" |
|
21 #include "CCAListBoxCreator.h" |
|
22 #include "CCAContactListBox.h" |
|
23 |
|
24 #include <Chatng.rsg> |
|
25 |
|
26 // ----------------------------------------------------------------------------- |
|
27 // CCAListBoxCreator::CreateListBoxL |
|
28 // Create all needed list box |
|
29 //but here need to have a base class to return the corect type |
|
30 // ----------------------------------------------------------------------------- |
|
31 // |
|
32 MCAListBox* CCAListBoxCreator::CreateListBoxL( TInt aTypeID ) |
|
33 { |
|
34 MCAListBox* singlelist = NULL; |
|
35 switch ( aTypeID ) |
|
36 { |
|
37 case ESingleStyleListBox: |
|
38 singlelist = new ( ELeave ) CCASingleStyleListBox; |
|
39 break; |
|
40 case ESingle2GraphicStyleListBox : |
|
41 singlelist = new ( ELeave ) CCAContactListBox; |
|
42 case EDoubleStyleListBox: |
|
43 singlelist = new ( ELeave ) CCADoubleStyleListBox; |
|
44 break; |
|
45 case ESingleLargeStyleListBox: |
|
46 singlelist = new ( ELeave ) CCASingleLargeStyleListBox; |
|
47 break; |
|
48 case ESettingStyleListBox: |
|
49 singlelist = new ( ELeave ) CCASettingStyleListBox; |
|
50 break; |
|
51 case ESingleHeadingPopupMenuStyleListBox: |
|
52 singlelist = new ( ELeave ) CCASingleHeadingPopupMenuStyleListBox; |
|
53 break; |
|
54 case ESingleGraphicStyleListBox: |
|
55 singlelist = new ( ELeave ) CCASingleGraphicStyleListBox; |
|
56 break; |
|
57 default: |
|
58 break; |
|
59 |
|
60 } |
|
61 |
|
62 return singlelist; |
|
63 |
|
64 } |
|
65 |
|
66 |
|
67 |
|
68 CCAContactListBox* CCAListBoxCreator::CreateSingle2GraphicListBoxL( TInt /*aTypeID*/ ) |
|
69 { |
|
70 //case ESingle2GraphicStyleListBox : |
|
71 CCAContactListBox* self = new ( ELeave ) CCAContactListBox; |
|
72 return self; |
|
73 } |
|
74 |
|
75 |
|
76 |
|
77 // end of file |