void AM1DBasicIntegralABEditor::populateComboBox() { AMDataSource *tempSource = 0; for (int i = 0; i < analysisBlock_->inputDataSourceCount(); i++) { tempSource = analysisBlock_->inputDataSourceAt(i); if (analysisBlock_->name() != tempSource->name() && !tempSource->hiddenFromUsers()) names_->addItem(tempSource->description(), tempSource->name()); } }
void REIXSAppController::onScanAddedToEditor(AMGenericScanEditor *editor, AMScan *scan) { QString exclusiveName = QString(); for (int i = 0, count = scan->analyzedDataSourceCount(); i < count && exclusiveName.isNull(); i++){ AMDataSource *source = scan->analyzedDataSources()->at(i); if (source->name().contains("TEYNorm") && !source->hiddenFromUsers()) exclusiveName = source->name(); if (source->name().contains("xesSpectrum") && !source->hiddenFromUsers()) exclusiveName = source->name(); } if (!exclusiveName.isNull()) editor->setExclusiveDataSourceByName(exclusiveName); else if (editor->scanAt(0)->analyzedDataSourceCount()) editor->setExclusiveDataSourceByName(editor->scanAt(0)->analyzedDataSources()->at(editor->scanAt(0)->analyzedDataSourceCount()-1)->name()); }