![]() |
OpenMS
|
Hierarchical visualization and selection of spectra. More...
#include <OpenMS/VISUAL/SpectraTreeTab.h>
Signals | |
| void | spectrumSelected (int) |
| void | chromsSelected (std::vector< int > indices) |
| void | spectrumDoubleClicked (int) |
| void | chromsDoubleClicked (std::vector< int > indices) |
| void | showSpectrumAsNew1D (int) |
| void | showChromatogramsAsNew1D (std::vector< int > indices) |
| void | showSpectrumMetaData (int) |
Public Member Functions | |
| SpectraTreeTab (QWidget *parent=nullptr) | |
| Constructor. | |
| ~SpectraTreeTab () override=default | |
| Destructor. | |
| bool | hasData (const LayerDataBase *layer) override |
| docu in base class | |
| void | updateEntries (LayerDataBase *cl) override |
refresh the table using data from cl | |
| void | clear () override |
| remove all visible data | |
| bool | getSelectedScan (MSExperiment &exp, LayerDataBase::DataType ¤t_type) const |
Static Public Member Functions | |
| static std::vector< int > | getParentIndices (const MSExperiment &exp) |
Determines under which spectrum each spectrum of exp is listed in the tree. | |
Private Slots | |
| void | populateSearchBox_ () |
| fill the search-combo-box with current column header names | |
| void | spectrumSearchText_ () |
| searches for rows containing a search text (from spectra_search_box_); called when text search box is used | |
| void | itemSelectionChange_ (QTreeWidgetItem *, QTreeWidgetItem *) |
| emits spectrumSelected() for PEAK or chromsSelected() for CHROM data | |
| void | searchAndShow_ () |
| searches using text box and plots the spectrum | |
| void | itemDoubleClicked_ (QTreeWidgetItem *) |
| called upon double click on an item; emits spectrumDoubleClicked() or chromsDoubleClicked() after some checking | |
| void | spectrumContextMenu_ (const QPoint &) |
| Display context menu; allows to open metadata window. | |
Private Attributes | |
| QLineEdit * | spectra_search_box_ = nullptr |
| QComboBox * | spectra_combo_box_ = nullptr |
| TreeView * | spectra_treewidget_ = nullptr |
| LayerDataBase * | layer_ = nullptr |
| std::map< size_t, std::map< Precursor, std::vector< Size >, Precursor::MZLess > > | map_precursor_to_chrom_idx_cache_ |
| cache to store mapping of chromatogram precursors to chromatogram indices | |
| const PeakMap * | last_peakmap_ = nullptr |
| remember the last PeakMap that we used to fill the spectra list (and avoid rebuilding it) | |
Hierarchical visualization and selection of spectra.
| SpectraTreeTab | ( | QWidget * | parent = nullptr | ) |
Constructor.
|
overridedefault |
Destructor.
|
signal |
|
signal |
|
overridevirtual |
remove all visible data
Implements DataTabBase.
|
static |
Determines under which spectrum each spectrum of exp is listed in the tree.
A spectrum of MS level n is listed under the spectrum its (first) precursor refers to (the mzML 'spectrumRef', stored as meta value 'spectrum_ref' of the Precursor), if that is a preceding spectrum of MS level n-1. This holds even if other spectra were acquired in between, e.g. for SPS-MS3 scans, which are usually interleaved with the next MS2 scans. Without such a reference, a spectrum is listed under the closest preceding spectrum of MS level n-1, unless a spectrum of an even lower MS level came in between.
| [in] | exp | The spectra |
| bool getSelectedScan | ( | MSExperiment & | exp, |
| LayerDataBase::DataType & | current_type | ||
| ) | const |
Return a copy of the currently selected spectrum/chrom (for drag'n'drop to new window) and store it either as Spectrum or Chromatogram in exp (all other data is cleared) If no spectrum/chrom is selected, false is returned and exp is empty
| [out] | exp | The currently active spec/chrom |
| [in] | current_type | Either DT_PEAK or DT_CHROMATOGRAM, depending on what is currently shown |
Referenced by TOPPViewBase::copyLayer().
|
overridevirtual |
docu in base class
Implements DataTabBase.
|
privateslot |
called upon double click on an item; emits spectrumDoubleClicked() or chromsDoubleClicked() after some checking
|
privateslot |
emits spectrumSelected() for PEAK or chromsSelected() for CHROM data
|
privateslot |
fill the search-combo-box with current column header names
|
privateslot |
searches using text box and plots the spectrum
|
signal |
|
signal |
|
signal |
|
privateslot |
Display context menu; allows to open metadata window.
|
signal |
|
privateslot |
searches for rows containing a search text (from spectra_search_box_); called when text search box is used
|
signal |
|
overridevirtual |
refresh the table using data from cl
Implements DataTabBase.
|
private |
remember the last PeakMap that we used to fill the spectra list (and avoid rebuilding it)
|
private |
|
private |
cache to store mapping of chromatogram precursors to chromatogram indices
|
private |
|
private |
|
private |