equal
deleted
inserted
replaced
19 #include "cnteditviewdetailitem.h" |
19 #include "cnteditviewdetailitem.h" |
20 #include "cntviewparams.h" |
20 #include "cntviewparams.h" |
21 #include "cntstringmapper.h" |
21 #include "cntstringmapper.h" |
22 #include "cntdetailorderinghelper.h" |
22 #include "cntdetailorderinghelper.h" |
23 #include <hbnumbergrouping.h> |
23 #include <hbnumbergrouping.h> |
|
24 #include <QDir> |
24 |
25 |
25 CntEditViewItemBuilder::CntEditViewItemBuilder() : |
26 CntEditViewItemBuilder::CntEditViewItemBuilder() : |
26 mMap( new CntStringMapper() ) |
27 mMap( new CntStringMapper() ) |
27 { |
28 { |
28 } |
29 } |
392 list.append( detailItem ); |
393 list.append( detailItem ); |
393 } |
394 } |
394 return list; |
395 return list; |
395 } |
396 } |
396 |
397 |
|
398 QList<CntEditViewItem*> CntEditViewItemBuilder::ringtoneDetails(QContact& aContact) |
|
399 { |
|
400 QList<CntEditViewItem*> list; |
|
401 // Ring Tone |
|
402 QContactRingtone ringtone = aContact.detail<QContactRingtone>(); |
|
403 QUrl ringtoneUrl = ringtone.audioRingtoneUrl(); |
|
404 if ( !ringtoneUrl.isEmpty() ) |
|
405 { |
|
406 CntEditViewDetailItem* detailItem = new CntEditViewDetailItem( |
|
407 ringtone, |
|
408 QContactRingtone::FieldAudioRingtoneUrl, |
|
409 ringToneFetcherView); |
|
410 detailItem->addText( hbTrId("txt_phob_formlabel_ringing_tone") ); |
|
411 QFileInfo ringtoneFileInfo(ringtoneUrl.toString()); |
|
412 QString ringtoneFileName = ringtoneFileInfo.fileName(); |
|
413 detailItem->addText( ringtoneFileName); |
|
414 list.append( detailItem ); |
|
415 } |
|
416 |
|
417 return list; |
|
418 } |
|
419 |
397 bool CntEditViewItemBuilder::isTemplateItem( const QString& aDefinition ) |
420 bool CntEditViewItemBuilder::isTemplateItem( const QString& aDefinition ) |
398 { |
421 { |
399 QStringList templateItems; |
422 QStringList templateItems; |
400 templateItems << QContactPhoneNumber::DefinitionName; |
423 templateItems << QContactPhoneNumber::DefinitionName; |
401 templateItems << QContactEmailAddress::DefinitionName; |
424 templateItems << QContactEmailAddress::DefinitionName; |