| 258 | |
| 259 | |
| 260 | void populatePeakDataRow_(QTreeWidgetItem* item, const int index, const MSSpectrum& spec) |
| 261 | { |
| 262 | item->setText(ClmnPeak::MS_LEVEL, QString("MS") + QString::number(spec.getMSLevel())); |
| 263 | item->setData(ClmnPeak::SPEC_INDEX, Qt::DisplayRole, index); |
| 264 | item->setData(ClmnPeak::RT, Qt::DisplayRole, spec.getRT()); |
| 265 | |
| 266 | const std::vector<Precursor>& current_precursors = spec.getPrecursors(); |
| 267 | |
| 268 | if (!current_precursors.empty() || spec.metaValueExists("analyzer scan offset")) |
| 269 | { |
| 270 | double precursor_mz; |
| 271 | if (spec.metaValueExists("analyzer scan offset")) |
| 272 | { |
| 273 | precursor_mz = spec.getMetaValue("analyzer scan offset"); |
| 274 | } |
| 275 | else |
| 276 | { |
| 277 | const Precursor& current_pc = current_precursors[0]; |
| 278 | precursor_mz = current_pc.getMZ(); |
| 279 | item->setText(ClmnPeak::DISSOCIATION, ListUtils::concatenate(current_pc.getActivationMethodsAsString(), ",").toQString()); |
| 280 | } |
| 281 | item->setData(ClmnPeak::PRECURSOR_MZ, Qt::DisplayRole, precursor_mz); |
| 282 | } |
| 283 | |
| 284 | item->setText(ClmnPeak::SCANTYPE, QString::fromStdString(spec.getInstrumentSettings().NamesOfScanMode[spec.getInstrumentSettings().getScanMode()])); |
| 285 | item->setText(ClmnPeak::ZOOM, (spec.getInstrumentSettings().getZoomScan() ? "yes" : "no")); |
| 286 | } |
| 287 | |
| 288 | bool SpectraTreeTab::hasData(const LayerDataBase* layer) |
| 289 | { |
no test coverage detected