void SeasidePerson::setLastName(const QString &name) { QContactName nameDetail = mContact.detail<QContactName>(); nameDetail.setLastName(name); mContact.saveDetail(&nameDetail); emit lastNameChanged(); recalculateDisplayLabel(); }
QString SeasidePerson::displayLabel() const { if (mDisplayLabel.isEmpty()) { recalculateDisplayLabel(); } return mDisplayLabel; }
QString SeasidePerson::displayLabel() { if (mDisplayLabel.isEmpty()) { QContactName name = mContact.detail<QContactName>(); mDisplayLabel = name.customLabel(); if (mDisplayLabel.isEmpty()) recalculateDisplayLabel(); } return mDisplayLabel; }
SeasidePerson::SeasidePerson(const QContact &contact, QObject *parent) : QObject(parent) , mContact(contact) { recalculateDisplayLabel(); }