equal
deleted
inserted
replaced
194 contextAddressCountry = aItemArray[i].mCountry; |
194 contextAddressCountry = aItemArray[i].mCountry; |
195 } |
195 } |
196 // set icons based on contact address type |
196 // set icons based on contact address type |
197 QVariantList icons; |
197 QVariantList icons; |
198 HbIcon adressTypeIcon; |
198 HbIcon adressTypeIcon; |
|
199 HbIcon potraitIcon; |
199 QString adressType; |
200 QString adressType; |
200 bool adressIconPresent = false; |
201 bool adressIconPresent = false; |
201 if( aItemArray[i].mSourceType == ESourceContactsHome ) |
202 if( aItemArray[i].mSourceType == ESourceContactsHome ) |
202 { |
203 { |
203 adressTypeIcon = HbIcon(KContactHomeIcon); |
204 adressTypeIcon = HbIcon(KContactHomeIcon); |
207 else if( aItemArray[i].mSourceType == ESourceContactsWork ) |
208 else if( aItemArray[i].mSourceType == ESourceContactsWork ) |
208 { |
209 { |
209 adressTypeIcon = HbIcon(KContactWorkIcon); |
210 adressTypeIcon = HbIcon(KContactWorkIcon); |
210 adressType = KContactWorkIcon; |
211 adressType = KContactWorkIcon; |
211 adressIconPresent = true; |
212 adressIconPresent = true; |
|
213 } |
|
214 |
|
215 if( aItemArray[i].mSourceType == ESourceCalendar ) |
|
216 { |
|
217 potraitIcon = HbIcon( KCalendarImage ); |
|
218 } |
|
219 else if( aItemArray[i].mSourceType == ESourceContactsWork || aItemArray[i].mSourceType |
|
220 == ESourceContactsHome || aItemArray[i].mSourceType == ESourceContactsPref ) |
|
221 { |
|
222 potraitIcon = HbIcon( KContactsImage ); |
|
223 } |
|
224 else |
|
225 { |
|
226 potraitIcon = HbIcon( KDummyImage ); |
212 } |
227 } |
213 |
228 |
214 // create a list item and set to model |
229 // create a list item and set to model |
215 QStringList addressData; |
230 QStringList addressData; |
216 QString landscapeIconPath; |
231 QString landscapeIconPath; |
224 { |
239 { |
225 //draw dummy icon |
240 //draw dummy icon |
226 landscapeIconPath = QString(""); |
241 landscapeIconPath = QString(""); |
227 } |
242 } |
228 addressData.clear(); |
243 addressData.clear(); |
229 HbIcon potraitIcon( KDummyImage ); |
|
230 icons<<potraitIcon; |
244 icons<<potraitIcon; |
231 if(adressIconPresent) |
245 if(adressIconPresent) |
232 { |
246 { |
233 icons<<adressTypeIcon; |
247 icons<<adressTypeIcon; |
234 } |
248 } |
275 //txt_lint_list_calender_addresses |
289 //txt_lint_list_calender_addresses |
276 int calNum = aCount.value(1); |
290 int calNum = aCount.value(1); |
277 QString calendarCollectionNum; |
291 QString calendarCollectionNum; |
278 calendarCollectionNum.setNum(calNum); |
292 calendarCollectionNum.setNum(calNum); |
279 calendarCollectionNum.append(" items"); |
293 calendarCollectionNum.append(" items"); |
280 QString calendarCollectionName( hbTrId("txt_lint_list_calendar_event_locations") ); |
294 QString calendarCollectionName( hbTrId("txt_lint_list_calendar_locations") ); |
281 QStringList calender = (QStringList()<<calendarCollectionName<<calendarCollectionNum); |
295 QStringList calender = (QStringList()<<calendarCollectionName<<calendarCollectionNum); |
282 |
296 |
283 QStandardItem *modelItemCalendar = new QStandardItem(); |
297 QStandardItem *modelItemCalendar = new QStandardItem(); |
284 modelItemCalendar->setData( QVariant( calender ), Qt::DisplayRole ); |
298 modelItemCalendar->setData( QVariant( calender ), Qt::DisplayRole ); |
285 modelItemCalendar->setData( HbIcon ( KCollectionsCalendar ), Qt::DecorationRole ); |
299 modelItemCalendar->setData( HbIcon ( KCollectionsCalendar ), Qt::DecorationRole ); |