MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / populatePeakDataRow_

Function populatePeakDataRow_

src/openms_gui/source/VISUAL/SpectraTreeTab.cpp:260–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 1

updateEntriesMethod · 0.85

Calls 15

numberFunction · 0.85
concatenateFunction · 0.85
setTextMethod · 0.80
getMSLevelMethod · 0.80
getPrecursorsMethod · 0.80
metaValueExistsMethod · 0.80
getMetaValueMethod · 0.80
getScanModeMethod · 0.80
getZoomScanMethod · 0.80
QStringClass · 0.50
setDataMethod · 0.45

Tested by

no test coverage detected