示例#1
0
void Person::setLastName(const QString &newName)
{
    if (newName != m_lastName) {
        m_lastName = newName;
        emit lastNameChanged(newName);
    }
}
void SeasidePerson::setLastName(const QString &name)
{
    QContactName nameDetail = mContact.detail<QContactName>();
    nameDetail.setLastName(name);
    mContact.saveDetail(&nameDetail);
    emit lastNameChanged();
    recalculateDisplayLabel();
}
示例#3
0
DbManager::DbManager(QObject *parent) : QObject(parent)
{
    db_link                     = new QSqlDatabase();
    search_results_table_model  = new SqlQueryModel();
    Excel_file                  = nullptr;

    connect(search_results_table_model, SIGNAL(lastNameChanged()), this, SLOT(updateLastNameExcel()));
}
示例#4
0
文件: contact.cpp 项目: Astel/vreen
void Buddy::setLastName(const QString &lastName)
{
    Q_D(Buddy);
    if (d->lastName != lastName) {
        d->lastName = lastName;
        emit lastNameChanged(lastName);
        emit nameChanged(name());
    }
}
示例#5
0
void Contact::setData(SObject data)
{
    SObject oldData = mData;
    mData = data;

    if (firstName() != oldData.value("firstName"))
        emit firstNameChanged();
    
    if (lastName() != oldData.value("lastName"))
        emit lastNameChanged();

    if (phoneNumber() != oldData.value("phoneNumber"))
        emit phoneNumberChanged();

    // update avatar serial so QML reloads the image
    setAvatarSerial(avatarSerial() + 1);
}
void QFacebookGraphUser::setLastName(const QString &lastName) {
    if( m_lastName != lastName ) {
        m_lastName = lastName;
        emit lastNameChanged();
    }
}
/*! \reimp */
void FacebookUserInterface::emitPropertyChangeSignals(const QVariantMap &oldData, const QVariantMap &newData)
{
    Q_D(FacebookUserInterface);
    QString nameStr = newData.value(FACEBOOK_ONTOLOGY_USER_NAME).toString();
    QString fnStr = newData.value(FACEBOOK_ONTOLOGY_USER_FIRSTNAME).toString();
    QString mnStr = newData.value(FACEBOOK_ONTOLOGY_USER_MIDDLENAME).toString();
    QString lnStr = newData.value(FACEBOOK_ONTOLOGY_USER_LASTNAME).toString();
    QString gnStr = newData.value(FACEBOOK_ONTOLOGY_USER_GENDER).toString();
    QString locStr = newData.value(FACEBOOK_ONTOLOGY_USER_LOCALE).toString();
    QString linkStr = newData.value(FACEBOOK_ONTOLOGY_USER_LINK).toString();
    QString unStr = newData.value(FACEBOOK_ONTOLOGY_USER_USERNAME).toString();
    QString tpiStr = newData.value(FACEBOOK_ONTOLOGY_USER_THIRDPARTYIDENTIFIER).toString();
    QString insStr = newData.value(FACEBOOK_ONTOLOGY_USER_INSTALLED).toString();
    QString tzoStr = newData.value(FACEBOOK_ONTOLOGY_USER_TIMEZONEOFFSET).toString();
    QString verStr = newData.value(FACEBOOK_ONTOLOGY_USER_VERIFIED).toString();
    QString udtStr = newData.value(FACEBOOK_ONTOLOGY_USER_UPDATEDTIME).toString();
    QString bioStr = newData.value(FACEBOOK_ONTOLOGY_USER_BIO).toString();
    QString bdayStr = newData.value(FACEBOOK_ONTOLOGY_USER_BIRTHDAY).toString();
    QString emailStr = newData.value(FACEBOOK_ONTOLOGY_USER_EMAIL).toString();
    QStringList iinStr = newData.value(FACEBOOK_ONTOLOGY_USER_INTERESTEDIN).toStringList();
    QString polStr = newData.value(FACEBOOK_ONTOLOGY_USER_POLITICAL).toString();
    QString quoStr = newData.value(FACEBOOK_ONTOLOGY_USER_QUOTES).toString();
    QString rssStr = newData.value(FACEBOOK_ONTOLOGY_USER_RELATIONSHIPSTATUS).toString();
    QString relStr = newData.value(FACEBOOK_ONTOLOGY_USER_RELIGION).toString();
    QString webStr = newData.value(FACEBOOK_ONTOLOGY_USER_WEBSITE).toString();
    QVariantMap htMap = newData.value(FACEBOOK_ONTOLOGY_USER_HOMETOWN).toMap();
    QVariantMap locMap = newData.value(FACEBOOK_ONTOLOGY_USER_LOCATION).toMap();
    QVariantMap picMap = newData.value(FACEBOOK_ONTOLOGY_USER_PICTURE).toMap();
    QVariantMap sigMap = newData.value(FACEBOOK_ONTOLOGY_USER_SIGNIFICANTOTHER).toMap();

    QString oldNameStr = oldData.value(FACEBOOK_ONTOLOGY_USER_NAME).toString();
    QString oldFnStr = oldData.value(FACEBOOK_ONTOLOGY_USER_FIRSTNAME).toString();
    QString oldMnStr = oldData.value(FACEBOOK_ONTOLOGY_USER_MIDDLENAME).toString();
    QString oldLnStr = oldData.value(FACEBOOK_ONTOLOGY_USER_LASTNAME).toString();
    QString oldGnStr = oldData.value(FACEBOOK_ONTOLOGY_USER_GENDER).toString();
    QString oldLocStr = oldData.value(FACEBOOK_ONTOLOGY_USER_LOCALE).toString();
    QString oldLinkStr = oldData.value(FACEBOOK_ONTOLOGY_USER_LINK).toString();
    QString oldUnStr = oldData.value(FACEBOOK_ONTOLOGY_USER_USERNAME).toString();
    QString oldTpiStr = oldData.value(FACEBOOK_ONTOLOGY_USER_THIRDPARTYIDENTIFIER).toString();
    QString oldInsStr = oldData.value(FACEBOOK_ONTOLOGY_USER_INSTALLED).toString();
    QString oldTzoStr = newData.value(FACEBOOK_ONTOLOGY_USER_TIMEZONEOFFSET).toString();
    QString oldVerStr = newData.value(FACEBOOK_ONTOLOGY_USER_VERIFIED).toString();
    QString oldUdtStr = newData.value(FACEBOOK_ONTOLOGY_USER_UPDATEDTIME).toString();
    QString oldBioStr = oldData.value(FACEBOOK_ONTOLOGY_USER_BIO).toString();
    QString oldBdayStr = oldData.value(FACEBOOK_ONTOLOGY_USER_BIRTHDAY).toString();
    QString oldEmailStr = oldData.value(FACEBOOK_ONTOLOGY_USER_EMAIL).toString();
    QStringList oldIinStr = oldData.value(FACEBOOK_ONTOLOGY_USER_INTERESTEDIN).toStringList();
    QString oldPolStr = oldData.value(FACEBOOK_ONTOLOGY_USER_POLITICAL).toString();
    QString oldQuoStr = oldData.value(FACEBOOK_ONTOLOGY_USER_QUOTES).toString();
    QString oldRssStr = oldData.value(FACEBOOK_ONTOLOGY_USER_RELATIONSHIPSTATUS).toString();
    QString oldRelStr = oldData.value(FACEBOOK_ONTOLOGY_USER_RELIGION).toString();
    QString oldWebStr = oldData.value(FACEBOOK_ONTOLOGY_USER_WEBSITE).toString();
    QVariantMap oldHtMap = oldData.value(FACEBOOK_ONTOLOGY_USER_HOMETOWN).toMap();
    QVariantMap oldLocMap = oldData.value(FACEBOOK_ONTOLOGY_USER_LOCATION).toMap();
    QVariantMap oldPicMap = oldData.value(FACEBOOK_ONTOLOGY_USER_PICTURE).toMap();
    QVariantMap oldSigMap = oldData.value(FACEBOOK_ONTOLOGY_USER_SIGNIFICANTOTHER).toMap();

    // standard properties
    if (nameStr != oldNameStr)
        emit nameChanged();
    if (fnStr != oldFnStr)
        emit firstNameChanged();
    if (mnStr != oldMnStr)
        emit middleNameChanged();
    if (lnStr != oldLnStr)
        emit lastNameChanged();
    if (gnStr != oldGnStr)
        emit genderChanged();
    if (locStr != oldLocStr)
        emit locationChanged();
    if (linkStr != oldLinkStr)
        emit linkChanged();
    if (unStr != oldUnStr)
        emit userNameChanged();
    if (tpiStr != oldTpiStr)
        emit thirdPartyIdentifierChanged();
    if (insStr != oldInsStr)
        emit installedChanged();
    if (tzoStr != oldTzoStr)
        emit timezoneOffsetChanged();
    if (verStr != oldVerStr)
        emit verifiedChanged();
    if (udtStr != oldUdtStr)
        emit updatedTimeChanged();
    if (bioStr != oldBioStr)
        emit bioChanged();
    if (bdayStr != oldBdayStr)
        emit birthdayChanged();
    if (emailStr != oldEmailStr)
        emit emailChanged();
    if (iinStr != oldIinStr)
        emit interestedInChanged();
    if (polStr != oldPolStr)
        emit politicalChanged();
    if (quoStr != oldQuoStr)
        emit quotesChanged();
    if (rssStr != oldRssStr)
        emit relationshipStatusChanged();
    if (relStr != oldRelStr)
        emit religionChanged();
    if (webStr != oldWebStr)
        emit websiteChanged();

    // variantmap / object reference properties
    if (htMap != oldHtMap) {
        QVariantMap newHtData;
        newHtData.insert(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTTYPE, FacebookInterface::Location);
        newHtData.insert(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTIDENTIFIER, newHtData.value(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTIDENTIFIER));
        newHtData.insert(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTNAME, newHtData.value(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTNAME));
        qobject_cast<FacebookInterface*>(socialNetwork())->setFacebookContentItemData(d->hometown, newHtData);
        emit hometownChanged();
    }

    if (locMap != oldLocMap) {
        QVariantMap newLocData;
        newLocData.insert(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTTYPE, FacebookInterface::Location);
        newLocData.insert(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTIDENTIFIER, newLocData.value(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTIDENTIFIER));
        newLocData.insert(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTNAME, newLocData.value(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTNAME));
        qobject_cast<FacebookInterface*>(socialNetwork())->setFacebookContentItemData(d->location, newLocData);
        emit locationChanged();
    }

    if (picMap != oldPicMap) {
        qobject_cast<FacebookInterface*>(socialNetwork())->setFacebookContentItemData(d->picture, picMap);
        emit pictureChanged();
    }

    if (sigMap != oldSigMap) {
        QVariantMap newSigData;
        newSigData.insert(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTTYPE, FacebookInterface::User);
        newSigData.insert(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTIDENTIFIER, newSigData.value(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTIDENTIFIER));
        newSigData.insert(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTNAME, newSigData.value(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTNAME));
        qobject_cast<FacebookInterface*>(socialNetwork())->setFacebookContentItemData(d->significantOther, newSigData);
        emit significantOtherChanged();
    }

    // call the super class implementation
    QVariantMap oldDataWithId = oldData; oldDataWithId.insert(NEMOQMLPLUGINS_SOCIAL_CONTENTITEMID, oldData.value(FACEBOOK_ONTOLOGY_USER_ID));
    QVariantMap newDataWithId = newData; newDataWithId.insert(NEMOQMLPLUGINS_SOCIAL_CONTENTITEMID, newData.value(FACEBOOK_ONTOLOGY_USER_ID));
    IdentifiableContentItemInterface::emitPropertyChangeSignals(oldDataWithId, newDataWithId);
}
示例#8
0
void Contact::setLastName(const QString &lastName)
{
    mData.setValue("lastName", lastName);
    emit lastNameChanged();
}