コード例 #1
0
void AM1DDarkCurrentCorrectionAB::setDwellTimeName(const QString &name)
{
	dwellTimeName_ = name;
	setModified(true);
	canAnalyze_ = canAnalyze(dataName_, dwellTimeName_);
	setInputSources();
}
コード例 #2
0
void AM1DNormalizationAB::setNormalizationName(const QString &name)
{
	normalizationName_ = name;
	setModified(true);
	canAnalyze_ = canAnalyze(dataName_, normalizationName_);
	setInputSources();
}
コード例 #3
0
void AMNormalizationAB::setInputDataSourcesImplementation(const QList<AMDataSource *> &dataSources)
{
	// disconnect connections from old sources, if they exist.
	if(!sources_.isEmpty()) {

		for (int i = 0; i < sources_.size(); i++){

			disconnect(sources_.at(i)->signalSource(), SIGNAL(valuesChanged(AMnDIndex,AMnDIndex)), this, SLOT(onInputSourceValuesChanged(AMnDIndex,AMnDIndex)));
			disconnect(sources_.at(i)->signalSource(), SIGNAL(sizeChanged(int)), this, SLOT(onInputSourceSizeChanged()));
			disconnect(sources_.at(i)->signalSource(), SIGNAL(stateChanged(int)), this, SLOT(onInputSourceStateChanged()));
		}
	}

	if(dataSources.isEmpty()) {

		sources_.clear();
		axes_.clear();
		setDescription("-- No input data --");
	}

	// we know that this will only be called with valid input source
	/*
	else {

		sources_ = dataSources;
		axes_.clear();

		for (int i = 0, size = sources_.at(0)->rank(); i < size; i++)
			axes_.append(sources_.at(0)->axisInfoAt(i));

		cacheUpdateRequired_ = true;
		cachedData_ = QVector<double>(size().product());

		setDescription(QString("Sum of spectra from %1 maps").arg(sources_.size()));

		for (int i = 0; i < sources_.size(); i++){

			connect(sources_.at(i)->signalSource(), SIGNAL(valuesChanged(AMnDIndex,AMnDIndex)), this, SLOT(onInputSourceValuesChanged(AMnDIndex,AMnDIndex)));
			connect(sources_.at(i)->signalSource(), SIGNAL(sizeChanged(int)), this, SLOT(onInputSourceSizeChanged()));
			connect(sources_.at(i)->signalSource(), SIGNAL(stateChanged(int)), this, SLOT(onInputSourceStateChanged()));
		}
	}
	*/
	else {
		sources_ = dataSources;
		setInputSources();
	}

	reviewState();

	emitSizeChanged();
	emitValuesChanged(AMnDIndex(0), size()-1);
	emitAxisInfoChanged();
	emitInfoChanged();
}
コード例 #4
0
ファイル: DuelMatch.cpp プロジェクト: EliasOenal/blobby
DuelMatch::DuelMatch(bool remote, std::string rules) :
		// we send a pointer to an unconstructed object here!
		mLogic(createGameLogic(rules, this)),
		mPaused(false),
		events(0),
		external_events(0),
		mRemote(remote)
{
	mPhysicWorld.reset( new PhysicWorld() );

	setInputSources(boost::make_shared<InputSource>(), boost::make_shared<InputSource>());
}
コード例 #5
0
void AMOrderReductionAB::setSelectedName(const QString &name)
{
	selectedName_ = name;
	setModified(true);
	setInputSources();
}