|
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: Tree item data derived class able to store plain text. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 //<cmail> removed __FS_ALFRED_SUPPORT flag |
|
20 //#include <fsconfig.h> |
|
21 //</cmail> removed __FS_ALFRED_SUPPORT flag |
|
22 |
|
23 #include "emailtrace.h" |
|
24 #include "fstreeplainonelinenodedata.h" |
|
25 #include <e32cmn.h> |
|
26 // <cmail> |
|
27 #include <alf/alftexture.h> |
|
28 // </cmail> |
|
29 |
|
30 // ======== MEMBER FUNCTIONS ======== |
|
31 |
|
32 // --------------------------------------------------------------------------- |
|
33 // Two-phased constructor. |
|
34 // --------------------------------------------------------------------------- |
|
35 // |
|
36 EXPORT_C CFsTreePlainOneLineNodeData* CFsTreePlainOneLineNodeData::NewL( ) |
|
37 { |
|
38 FUNC_LOG; |
|
39 CFsTreePlainOneLineNodeData* self = |
|
40 new( ELeave ) CFsTreePlainOneLineNodeData( ); |
|
41 CleanupStack::PushL(self); |
|
42 self->ConstructL( ); |
|
43 CleanupStack::Pop(self); |
|
44 return self; |
|
45 } |
|
46 |
|
47 // --------------------------------------------------------------------------- |
|
48 // C++ destructor. |
|
49 // --------------------------------------------------------------------------- |
|
50 // |
|
51 CFsTreePlainOneLineNodeData::~CFsTreePlainOneLineNodeData() |
|
52 { |
|
53 FUNC_LOG; |
|
54 |
|
55 } |
|
56 |
|
57 // --------------------------------------------------------------------------- |
|
58 // |
|
59 // --------------------------------------------------------------------------- |
|
60 // |
|
61 TBool CFsTreePlainOneLineNodeData::IsIconExpandedSet() const |
|
62 { |
|
63 FUNC_LOG; |
|
64 return CFsTreePlainOneLineItemData::IsIconSet(); |
|
65 } |
|
66 |
|
67 // --------------------------------------------------------------------------- |
|
68 // |
|
69 // --------------------------------------------------------------------------- |
|
70 // |
|
71 const CAlfTexture& CFsTreePlainOneLineNodeData::IconExpanded () const |
|
72 { |
|
73 FUNC_LOG; |
|
74 return CFsTreePlainOneLineItemData::Icon(); |
|
75 } |
|
76 |
|
77 // --------------------------------------------------------------------------- |
|
78 // |
|
79 // --------------------------------------------------------------------------- |
|
80 // |
|
81 void CFsTreePlainOneLineNodeData::SetIconExpanded ( CAlfTexture& aIcon ) |
|
82 { |
|
83 FUNC_LOG; |
|
84 CFsTreePlainOneLineItemData::SetIcon( aIcon ); |
|
85 } |
|
86 |
|
87 // --------------------------------------------------------------------------- |
|
88 // |
|
89 // --------------------------------------------------------------------------- |
|
90 // |
|
91 TBool CFsTreePlainOneLineNodeData::IsIconCollapsedSet() const |
|
92 { |
|
93 FUNC_LOG; |
|
94 TBool retVal = EFalse; |
|
95 if ( iIconCollapsed ) |
|
96 { |
|
97 retVal = ETrue; |
|
98 } |
|
99 else |
|
100 { |
|
101 retVal = EFalse; |
|
102 } |
|
103 |
|
104 return retVal; |
|
105 } |
|
106 |
|
107 // --------------------------------------------------------------------------- |
|
108 // |
|
109 // --------------------------------------------------------------------------- |
|
110 // |
|
111 const CAlfTexture& CFsTreePlainOneLineNodeData::IconCollapsed() const |
|
112 { |
|
113 FUNC_LOG; |
|
114 return *iIconCollapsed; |
|
115 } |
|
116 |
|
117 // --------------------------------------------------------------------------- |
|
118 // |
|
119 // --------------------------------------------------------------------------- |
|
120 // |
|
121 void CFsTreePlainOneLineNodeData::SetIconCollapsed( CAlfTexture& aIcon ) |
|
122 { |
|
123 FUNC_LOG; |
|
124 iIconCollapsed = &aIcon; |
|
125 } |
|
126 |
|
127 // --------------------------------------------------------------------------- |
|
128 // |
|
129 // --------------------------------------------------------------------------- |
|
130 // |
|
131 TBool CFsTreePlainOneLineNodeData::IsIconSet() const |
|
132 { |
|
133 FUNC_LOG; |
|
134 return CFsTreePlainOneLineItemData::IsIconSet(); |
|
135 } |
|
136 |
|
137 // --------------------------------------------------------------------------- |
|
138 // |
|
139 // --------------------------------------------------------------------------- |
|
140 // |
|
141 void CFsTreePlainOneLineNodeData::SetIcon ( CAlfTexture& aIcon ) |
|
142 { |
|
143 FUNC_LOG; |
|
144 CFsTreePlainOneLineItemData::SetIcon( aIcon ); |
|
145 } |
|
146 |
|
147 // --------------------------------------------------------------------------- |
|
148 // |
|
149 // --------------------------------------------------------------------------- |
|
150 // |
|
151 TFsTreeItemDataType CFsTreePlainOneLineNodeData::Type() const |
|
152 { |
|
153 FUNC_LOG; |
|
154 return KFsTreePlainOneLineNodeDataType; |
|
155 } |
|
156 |
|
157 // --------------------------------------------------------------------------- |
|
158 // C++ constructor. |
|
159 // --------------------------------------------------------------------------- |
|
160 // |
|
161 CFsTreePlainOneLineNodeData::CFsTreePlainOneLineNodeData( ) |
|
162 { |
|
163 FUNC_LOG; |
|
164 |
|
165 } |
|
166 |
|
167 // --------------------------------------------------------------------------- |
|
168 // Second phase constructor. |
|
169 // --------------------------------------------------------------------------- |
|
170 // |
|
171 void CFsTreePlainOneLineNodeData::ConstructL( ) |
|
172 { |
|
173 FUNC_LOG; |
|
174 SetDataL( KNullDesC ); |
|
175 } |
|
176 |