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