void AMGenericStepScanConfigurationView::onScanAxisAdded(AMScanAxis *axis)
{
	if (configuration_->scanAxes().size() == 1){

		connect(axisStart1_, SIGNAL(editingFinished()), this, SLOT(onStart1Changed()));
		connect(axisStep1_, SIGNAL(editingFinished()), this, SLOT(onStep1Changed()));
		connect(axisEnd1_, SIGNAL(editingFinished()), this, SLOT(onEnd1Changed()));
		connect(dwellTime_, SIGNAL(editingFinished()), this, SLOT(onDwellTimeChanged()));

		connect(axis->regionAt(0), SIGNAL(regionStartChanged(AMNumber)), this, SLOT(setStart1(AMNumber)));
		connect(axis->regionAt(0), SIGNAL(regionStepChanged(AMNumber)), this, SLOT(setStep1(AMNumber)));
		connect(axis->regionAt(0), SIGNAL(regionEndChanged(AMNumber)), this, SLOT(setEnd1(AMNumber)));
		connect(axis->regionAt(0), SIGNAL(regionTimeChanged(AMNumber)), this, SLOT(setDwellTime(AMNumber)));
	}

	else if (configuration_->scanAxes().size() == 2){

		connect(axisStart2_, SIGNAL(editingFinished()), this, SLOT(onStart2Changed()));
		connect(axisStep2_, SIGNAL(editingFinished()), this, SLOT(onStep2Changed()));
		connect(axisEnd2_, SIGNAL(editingFinished()), this, SLOT(onEnd2Changed()));

		connect(axis->regionAt(0), SIGNAL(regionStartChanged(AMNumber)), this, SLOT(setStart2(AMNumber)));
		connect(axis->regionAt(0), SIGNAL(regionStepChanged(AMNumber)), this, SLOT(setStep2(AMNumber)));
		connect(axis->regionAt(0), SIGNAL(regionEndChanged(AMNumber)), this, SLOT(setEnd2(AMNumber)));
	}
}
void AMGenericStepScanConfigurationView::onAxisControlChoice2Changed()
{
	if (axisControlChoice1_->currentIndex() == 0 || axisControlChoice2_->currentIndex() == 0){

		axisStart2_->setEnabled(false);
		axisStep2_->setEnabled(false);
		axisEnd2_->setEnabled(false);

		configuration_->removeControl(1);

		setStart2(-1.0);
		setStep2(-1.0);
		setEnd2(-1.0);
	}

	else{

		axisStart2_->setEnabled(true);
		axisStep2_->setEnabled(true);
		axisEnd2_->setEnabled(true);

		AMControl *control = controlNameMap_.value(axisControlChoice2_->itemText(axisControlChoice2_->currentIndex()), 0);

		if (control) {
			configuration_->setControl(1, control->toInfo());
			setStart2(control->value());
			setStep2(1.0);
			setEnd2(control->value()+10);
		}

		onStart2Changed();
		onStep2Changed();
		onEnd2Changed();
		onDwellTimeChanged();
	}

	QStandardItemModel *model = qobject_cast<QStandardItemModel *>(axisControlChoice1_->model());

	for (int i = 1; i < axisControlChoice1_->count(); i++)
		model->item(i)->setFlags(i == axisControlChoice2_->currentIndex() ? Qt::NoItemFlags : Qt::ItemIsEnabled | Qt::ItemIsSelectable);

	model->item(0)->setFlags(axisControlChoice2_->currentIndex() > 0 ? Qt::NoItemFlags : Qt::ItemIsEnabled | Qt::ItemIsSelectable);

	updateScanInformation();
}
Ejemplo n.º 3
0
	EdgeT(GeneT *geneA, GeneT *geneB, SamDataT *connA, /*SamDataT *connB,*/ uint_64 stA,
			uint_64 endA, uint_64 stB, uint_64 endB, bool intr) {
		Edg::v1 = new Vertex(*geneA);
		Edg::v2 = new Vertex(*geneB);
		conn1 = new SamDataT(*connA);
		setStart1 (stA);
		setEnd1 (endA);
		setStart2 (stB);
		setEnd2(endB);
		if(intr)
			setIntergenic();

		hashed = pairZ(geneA->getId(), geneB->getId());
		//mirror = hashThemAll(geneB, geneA);
		id1 = geneA->getId();
		id2 = geneB->getId();
	}