void Forecast::setCondition(QString condition) { if(this->_condition != condition) { this->_condition = condition; emit conditionChanged(); } }
void LandscapeModel::onChangeVictoryConditionProcessor( const Command& _command ) { const VictoryCondition::Enum condition = static_cast< VictoryCondition::Enum >( _command.m_arguments[ 0 ].toInt() ); initVictoryChecker( condition ); Framework::Core::EventManager::Event conditionChanged( Events::VictoryConditionChanged::Type ); conditionChanged.pushMember( Events::VictoryConditionChanged::ConditionAttribute, condition ); m_environment.riseEvent( conditionChanged ); } // LandscapeModel::onChangeVictoryConditionProcessor
void Rule::_init() { connect(this, SIGNAL(ruleNameChanged()), this, SIGNAL(changed())); connect(this, SIGNAL(ruleIdChanged()), this, SIGNAL(changed())); connect(this, SIGNAL(ruleActiveChanged()), this, SIGNAL(changed())); connect(this, SIGNAL(stopIfMatchedChanged()), this, SIGNAL(changed())); connect(&_condition, SIGNAL(changed()), this, SIGNAL(conditionChanged())); connect(&_action, SIGNAL(changed()), this, SIGNAL(actionChanged())); connect(&_condition, SIGNAL(changed()), this, SIGNAL(changed())); connect(&_action, SIGNAL(changed()), this, SIGNAL(changed())); // connect(this, SIGNAL(conditionChanged()), this, SIGNAL(changed())); // connect(this, SIGNAL(actionChanged()), this, SIGNAL(changed())); }
void SampleGroupCondition::addSampleGroupCondition( Condition* condition, QString sampleGroup, bool holdChecks ) { Q_ASSERT(condition); beginInsertRows(QModelIndex(), m_sampleGroupConditions.count(), m_sampleGroupConditions.count()); m_sampleGroupConditions.push_back(qMakePair(condition, sampleGroup)); endInsertRows(); connect(condition, SIGNAL(conditionChanged()), this, SLOT(checkAcousticContext())); if (!holdChecks) checkAcousticContext(); emit changed(); }
bool SampleGroupCondition::removeSampleGroupCondition(int index, bool holdChecks) { if (index >= m_sampleGroupConditions.count() || index < 0) return false; disconnect(m_sampleGroupConditions.at(index).first, SIGNAL(conditionChanged()), this, SLOT(checkAcousticContext())); ContextManager::instance()->releaseCondition(m_sampleGroupConditions.at(index).first); beginRemoveRows(QModelIndex(), index, index); m_sampleGroupConditions.removeAt(index); endRemoveRows(); if (!holdChecks) checkAcousticContext(); emit changed(); return true; }
int PlayFreeKickOur::enterCondition() { if(wm->cmgs.ourFreeKick() || wm->cmgs.ourIndirectKick()) { if(wm->gs_last != wm->gs) { rolesIsInit = false; freeKickSelected = false; } else { rolesIsInit = conditionChanged(); } return 100; } else return 0; return 0; }