예제 #1
0
void Forecast::setCondition(QString condition)
{
    if(this->_condition != condition)
    {
        this->_condition = condition;
        emit conditionChanged();
    }
}
예제 #2
0
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
예제 #3
0
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()));
}
예제 #4
0
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();
}
예제 #5
0
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;
}
예제 #6
0
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;
}