|
1 /* |
|
2 * Copyright (c) 2002 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: Declares index data for SpdCtrl. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 // INCLUDE FILES |
|
24 |
|
25 #include "SpdiaIndexData.h" |
|
26 |
|
27 |
|
28 // ================= MEMBER FUNCTIONS ======================= |
|
29 |
|
30 // --------------------------------------------------------- |
|
31 // TSpdiaIndexData::SetIndex |
|
32 // Sets the SpeedDial list box index |
|
33 // --------------------------------------------------------- |
|
34 // |
|
35 inline void TSpdiaIndexData::SetIndex |
|
36 (TInt aIndex) |
|
37 { |
|
38 iIndex = aIndex; |
|
39 } |
|
40 |
|
41 // --------------------------------------------------------- |
|
42 // TSpdiaIndexData::Index |
|
43 // Returns the SpeedDial list box index |
|
44 // --------------------------------------------------------- |
|
45 // |
|
46 inline TInt TSpdiaIndexData::Index() const |
|
47 { |
|
48 return iIndex; |
|
49 } |
|
50 |
|
51 // --------------------------------------------------------- |
|
52 // TSpdiaIndexData::SetNumber |
|
53 // Sets the SpeedDial list box Number |
|
54 // --------------------------------------------------------- |
|
55 // |
|
56 inline void TSpdiaIndexData::SetNumber |
|
57 (TInt aNumber) |
|
58 { |
|
59 iNumber = aNumber; |
|
60 } |
|
61 |
|
62 // --------------------------------------------------------- |
|
63 // TSpdiaIndexData::Number |
|
64 // Returns the SpeedDial list box Number |
|
65 // --------------------------------------------------------- |
|
66 // |
|
67 inline TInt TSpdiaIndexData::Number() const |
|
68 { |
|
69 return iNumber; |
|
70 } |
|
71 |
|
72 // --------------------------------------------------------- |
|
73 // TSpdiaIndexData::SetPhoneNumber |
|
74 // Sets the link phone number |
|
75 // --------------------------------------------------------- |
|
76 // |
|
77 inline void TSpdiaIndexData::SetPhoneNumber |
|
78 (const TDesC& aPhoneNumber) |
|
79 { |
|
80 iPhoneNumber = aPhoneNumber; |
|
81 iPhoneNumber.Trim(); |
|
82 iTelNumber = iPhoneNumber; |
|
83 } |
|
84 |
|
85 // --------------------------------------------------------- |
|
86 // TSpdiaIndexData::PhoneNumber() |
|
87 // Returns link phone number |
|
88 // --------------------------------------------------------- |
|
89 // |
|
90 inline const TDesC& TSpdiaIndexData::PhoneNumber() const |
|
91 { |
|
92 return iPhoneNumber; |
|
93 } |
|
94 |
|
95 // --------------------------------------------------------- |
|
96 // TSpdiaIndexData::TelNumber() |
|
97 // Returns the link phone number |
|
98 // --------------------------------------------------------- |
|
99 // |
|
100 inline const TDesC& TSpdiaIndexData::TelNumber() const |
|
101 { |
|
102 return iTelNumber; |
|
103 } |
|
104 |
|
105 // --------------------------------------------------------- |
|
106 // TSpdiaIndexData::SetContactId |
|
107 // Sets the Speed dial contactid |
|
108 // --------------------------------------------------------- |
|
109 // |
|
110 inline void TSpdiaIndexData::SetContactId |
|
111 (TContactItemId aContactId) |
|
112 { |
|
113 iContactId = aContactId; |
|
114 } |
|
115 |
|
116 // --------------------------------------------------------- |
|
117 // TSpdiaIndexData::ContactId |
|
118 // Returns the Speed dial contact id |
|
119 // --------------------------------------------------------- |
|
120 // |
|
121 inline TContactItemId TSpdiaIndexData::ContactId() const |
|
122 { |
|
123 return iContactId; |
|
124 } |
|
125 |
|
126 // --------------------------------------------------------- |
|
127 // TSpdiaIndexData::SetIcon |
|
128 // Sets the icon index |
|
129 // --------------------------------------------------------- |
|
130 // |
|
131 inline void TSpdiaIndexData::SetIconIndex(TInt aIndex) |
|
132 { |
|
133 iIconIndex = aIndex; |
|
134 } |
|
135 |
|
136 // --------------------------------------------------------- |
|
137 // TSpdiaIndexData::Icon |
|
138 // Returns icon index |
|
139 // --------------------------------------------------------- |
|
140 // |
|
141 inline TBool TSpdiaIndexData::IconIndex() const |
|
142 { |
|
143 return iIconIndex; |
|
144 } |
|
145 |
|
146 // --------------------------------------------------------- |
|
147 // TSpdiaIndexData::SetThumb |
|
148 // Sets the thumbnail index |
|
149 // --------------------------------------------------------- |
|
150 // |
|
151 inline void TSpdiaIndexData::SetThumbIndex(TInt aIndex, const CFbsBitmap* aBitmap) |
|
152 { |
|
153 iThumbIndex = aIndex; |
|
154 if (aBitmap) |
|
155 { |
|
156 iThumbSize = aBitmap->SizeInPixels(); |
|
157 } |
|
158 } |
|
159 |
|
160 // --------------------------------------------------------- |
|
161 // TSpdiaIndexData::ResetThumbIndex |
|
162 // Sets the thumbnail index |
|
163 // --------------------------------------------------------- |
|
164 // |
|
165 inline void TSpdiaIndexData::ResetThumbIndex() |
|
166 { |
|
167 iThumbIndex = -1; |
|
168 } |
|
169 |
|
170 // --------------------------------------------------------- |
|
171 // TSpdiaIndexData::Thumb |
|
172 // Returns the Thumbnail index |
|
173 // --------------------------------------------------------- |
|
174 // |
|
175 inline TBool TSpdiaIndexData::ThumbIndex() const |
|
176 { |
|
177 return iThumbIndex; |
|
178 } |
|
179 |
|
180 // --------------------------------------------------------- |
|
181 // TSpdiaIndexData::ThumbSize |
|
182 // Returns the Thumbnail size |
|
183 // --------------------------------------------------------- |
|
184 // |
|
185 inline TSize TSpdiaIndexData::ThumbSize() const |
|
186 { |
|
187 return iThumbSize; |
|
188 } |
|
189 |
|
190 // --------------------------------------------------------- |
|
191 // TSpdiaIndexData::ContactItem |
|
192 // Returns the Contact's item |
|
193 // --------------------------------------------------------- |
|
194 // |
|
195 inline CPbkContactItem* TSpdiaIndexData::ContactItem() |
|
196 { |
|
197 return iContactItem; |
|
198 } |
|
199 |
|
200 // --------------------------------------------------------- |
|
201 // TSpdiaIndexData::ContactItem |
|
202 // Sets the Contact's item. |
|
203 // --------------------------------------------------------- |
|
204 // |
|
205 inline void TSpdiaIndexData::SetContactItem(CPbkContactItem* aItem) |
|
206 { |
|
207 iContactItem = aItem; |
|
208 } |
|
209 |
|
210 // --------------------------------------------------------- |
|
211 // TSpdiaIndexData::Operation |
|
212 // Returns the thumbnail operation. |
|
213 // --------------------------------------------------------- |
|
214 // |
|
215 inline MPbkThumbnailOperation* TSpdiaIndexData::Operation() |
|
216 { |
|
217 return iOperation; |
|
218 } |
|
219 |
|
220 // --------------------------------------------------------- |
|
221 // TSpdiaIndexData::Operation |
|
222 // Sets the thumbnail operation. |
|
223 // --------------------------------------------------------- |
|
224 // |
|
225 inline void TSpdiaIndexData::SetOperation(MPbkThumbnailOperation* aOperation) |
|
226 { |
|
227 iOperation = aOperation; |
|
228 } |
|
229 |
|
230 // --------------------------------------------------------- |
|
231 // TSpdiaIndexData::OperatLastThumbion |
|
232 // Returns the mark of last thumbnail. |
|
233 // --------------------------------------------------------- |
|
234 // |
|
235 inline TBool TSpdiaIndexData::LastThumb() |
|
236 { |
|
237 return iLastThumb; |
|
238 } |
|
239 |
|
240 // --------------------------------------------------------- |
|
241 // TSpdiaIndexData::Operation |
|
242 // Mark the last thumbnail data. |
|
243 // --------------------------------------------------------- |
|
244 // |
|
245 inline void TSpdiaIndexData::SetLastThumb(TBool aLast) |
|
246 { |
|
247 iLastThumb = aLast; |
|
248 } |
|
249 |
|
250 // --------------------------------------------------------- |
|
251 // TSpdiaIndexData::FieldId |
|
252 // Returns field id. |
|
253 // --------------------------------------------------------- |
|
254 // |
|
255 inline TInt TSpdiaIndexData::FieldId() const |
|
256 { |
|
257 return iFieldId; |
|
258 } |
|
259 |
|
260 // --------------------------------------------------------- |
|
261 // TSpdiaIndexData::SetFieldId |
|
262 // Sets field id. |
|
263 // --------------------------------------------------------- |
|
264 // |
|
265 inline void TSpdiaIndexData::SetFieldId(TInt aFieldId) |
|
266 { |
|
267 iFieldId = aFieldId; |
|
268 } |
|
269 |
|
270 // End of File |
|
271 |