|
1 /* |
|
2 * Copyright (c) 2007 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: This file implements class CIpsSetUiItem. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "emailtrace.h" |
|
20 #include <e32base.h> |
|
21 |
|
22 #include "ipssetuiitembase.h" |
|
23 #include "ipssetutilsconsts.h" |
|
24 #include "ipssetutilsflags.h" |
|
25 |
|
26 // ---------------------------------------------------------------------------- |
|
27 // CIpsSetUiItem::CIpsSetUiItem() |
|
28 // ---------------------------------------------------------------------------- |
|
29 CIpsSetUiItem::CIpsSetUiItem() |
|
30 : |
|
31 iItemType( EIpsSetUiUndefined ), |
|
32 iItemLabel( NULL ), |
|
33 iItemId( TUid::Uid( 0 ) ), |
|
34 iItemResourceId( 0 ) |
|
35 { |
|
36 FUNC_LOG; |
|
37 } |
|
38 |
|
39 // ---------------------------------------------------------------------------- |
|
40 // CIpsSetUiItem::ConstructL() |
|
41 // ---------------------------------------------------------------------------- |
|
42 // |
|
43 void CIpsSetUiItem::ConstructL() |
|
44 { |
|
45 FUNC_LOG; |
|
46 iItemLabel = new ( ELeave ) TIpsSetUtilsTextPlain(); |
|
47 } |
|
48 |
|
49 |
|
50 |
|
51 // ---------------------------------------------------------------------------- |
|
52 // CIpsSetUiItem::~CIpsSetUiItem() |
|
53 // ---------------------------------------------------------------------------- |
|
54 // |
|
55 CIpsSetUiItem::~CIpsSetUiItem() |
|
56 { |
|
57 FUNC_LOG; |
|
58 delete iItemLabel; |
|
59 iItemLabel = NULL; |
|
60 } |
|
61 |
|
62 |
|
63 // ---------------------------------------------------------------------------- |
|
64 // CIpsSetUiItem::NewL() |
|
65 // ---------------------------------------------------------------------------- |
|
66 // |
|
67 CIpsSetUiItem* CIpsSetUiItem::NewL() |
|
68 { |
|
69 FUNC_LOG; |
|
70 CIpsSetUiItem* self = NewLC(); |
|
71 CleanupStack::Pop( self ); |
|
72 |
|
73 return self; |
|
74 } |
|
75 |
|
76 |
|
77 // ---------------------------------------------------------------------------- |
|
78 // CIpsSetUiItem::NewLC() |
|
79 // ---------------------------------------------------------------------------- |
|
80 // |
|
81 CIpsSetUiItem* CIpsSetUiItem::NewLC() |
|
82 { |
|
83 FUNC_LOG; |
|
84 CIpsSetUiItem* self = new ( ELeave ) CIpsSetUiItem(); |
|
85 CleanupStack::PushL( self ); |
|
86 self->ConstructL(); |
|
87 return self; |
|
88 } |
|
89 |
|
90 // ---------------------------------------------------------------------------- |
|
91 // CIpsSetUiItem::operator=() |
|
92 // ---------------------------------------------------------------------------- |
|
93 // |
|
94 CIpsSetUiItem& CIpsSetUiItem::operator=( |
|
95 const CIpsSetUiItem& aBaseItem ) |
|
96 { |
|
97 FUNC_LOG; |
|
98 iItemFlags = aBaseItem.iItemFlags; |
|
99 iItemType = aBaseItem.iItemType; |
|
100 iItemLabel->Copy( *aBaseItem.iItemLabel ); |
|
101 iItemId = aBaseItem.iItemId; |
|
102 iItemResourceId = aBaseItem.iItemResourceId; |
|
103 |
|
104 return *this; |
|
105 } |
|
106 |
|
107 // End of file |
|
108 |