예제 #1
0
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;
}
예제 #3
0
QString SeasidePerson::displayLabel()
{
    if (mDisplayLabel.isEmpty()) {
        QContactName name = mContact.detail<QContactName>();
        mDisplayLabel = name.customLabel();
        if (mDisplayLabel.isEmpty())
            recalculateDisplayLabel();
    }

    return mDisplayLabel;
}
예제 #4
0
SeasidePerson::SeasidePerson(const QContact &contact, QObject *parent)
    : QObject(parent)
    , mContact(contact)
{
    recalculateDisplayLabel();
}