コード例 #1
0
void TB_PokemonBody::connectWithAdvanced(TB_Advanced *ptr)
{
    connect(ptr, SIGNAL(abilityChanged()), this, SLOT(updateAbility()));
    connect(ptr, SIGNAL(levelChanged()), this, SLOT(updateLevel()));
    connect(ptr, SIGNAL(imageChanged()), this, SLOT(updateImage()));
    connect(ptr, SIGNAL(genderChanged()), this, SLOT(updateGender()));
    connect(ptr, SIGNAL(genderChanged()), this, SLOT(updateImage()));
    connect(ptr, SIGNAL(statChanged()), this, SLOT(updateEVs()));
    connect(ptr, SIGNAL(pokeFormeChanged(Pokemon::uniqueId)), this, SLOT(changeForme(Pokemon::uniqueId)), Qt::QueuedConnection);
    connect(this, SIGNAL(EVChanged(int)), ptr, SLOT(updateStat(int)));
    connect(this, SIGNAL(natureChanged()), ptr, SLOT(updateStats()));
    connect(this, SIGNAL(pokeImageChanged()), ptr, SLOT(updatePokeImage()));
    connect(ptr, SIGNAL(levelChanged()), this, SIGNAL(levelChanged()));
}
コード例 #2
0
ファイル: player.cpp プロジェクト: Kampfgnom/LBDatabaseEditor
void Player::setGender(const QString &gender)
{
	if(gender == this->gender())
		return;
	setValue(PlayerProperties::GenderAttribute,QVariant::fromValue<QString>(gender));
	emit genderChanged(gender);
}
コード例 #3
0
void User::setGender(QString gender) {

    if(myGender != gender) {
        myGender = gender;
        updateGender(gender);
        calculateBMR();
        emit genderChanged();
    }
}
コード例 #4
0
QString CDoodUserDataManage::setGender(const QString &data)
{
    qDebug() << Q_FUNC_INFO <<"xingbiexingbiexingbie"<<data;
//    if(mGender == data) {
//        emit genderChanged();
//        return data;
//    }
    mGender = data;
    emit genderChanged();
    return mGender;
}
コード例 #5
0
void QFacebookGraphUser::setGender(const QString &gender) {
    if( m_gender != gender ) {
        m_gender = gender;
        emit genderChanged();
    }
}
コード例 #6
0
/*! \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);
}