18 class Annotation1DItem;
75 return annotations_1d_[current_idx_];
81 return annotations_1d_[current_idx_];
87 return annotations_1d_[spectrum_index];
93 return annotations_1d_[spectrum_index];
108 bool flipped =
false;
118 std::vector<Annotations1DContainer> annotations_1d_ = std::vector<Annotations1DContainer>(1);
An abstract class acting as an interface for the different 1D annotation items.
Definition: Annotation1DItem.h:36
Container for annotations to content of Plot1DCanvas.
Definition: Annotations1DContainer.h:29
Base class for all 1D layers, a special case of LayerData.
Definition: LayerData1DBase.h:28
const Annotations1DContainer & getAnnotations(Size spectrum_index) const
Returns a const reference to the annotations of the spectrum_index's spectrum (1D view)
Definition: LayerData1DBase.h:85
virtual Annotation1DItem * addPeakAnnotation(const PeakIndex &peak_index, const QString &text, const QColor &color)=0
Add a Annotation1DPeakItem to getCurrentAnnotations(). The specific type is determined by the derived...
virtual std::unique_ptr< Painter1DBase > getPainter1D() const =0
Obtain a painter which can draw the layer on a canvas.
virtual bool hasIndex(Size index) const =0
Does the layer have at least index items (e.g. spectra, chroms, etc), so a call to setCurrentIndex() ...
String getDecoratedName() const override
get name augmented with attributes, e.g. '*' if modified
Size getCurrentIndex() const
Get the index of the current spectrum (1D view)
Definition: LayerData1DBase.h:96
virtual RangeAllType getRange1D() const =0
Annotations1DContainer & getCurrentAnnotations()
Returns a mutable reference to the annotations of the current spectrum (1D view)
Definition: LayerData1DBase.h:79
void setCurrentIndex(Size index)
Set the index of the current spectrum (1D view) – and prepares annotations.
const Annotations1DContainer & getCurrentAnnotations() const
Returns a const reference to the annotations of the current spectrum (1D view)
Definition: LayerData1DBase.h:73
virtual RangeAllType getRangeForArea(const RangeAllType partial_range) const =0
Given a partial_range for the current 1D layer (e.g. an m/z range), fill in the other dimensions (usu...
virtual QMenu * getContextMenuAnnotation(Annotation1DItem *annot_item, bool &need_repaint)=0
Get a context menu (with lambda actions included) for this 1D layer, when a Annotation1DItem was righ...
Annotations1DContainer & getAnnotations(Size spectrum_index)
Returns a mutable reference to the annotations of the spectrum_index's spectrum (1D view)
Definition: LayerData1DBase.h:91
std::vector< QColor > peak_colors_1d
Peak colors of the currently shown spectrum.
Definition: LayerData1DBase.h:111
Class that stores the data for one layer.
Definition: LayerDataBase.h:169
A more convenient string class.
Definition: String.h:34
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:97
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Index of a peak or feature.
Definition: PeakIndex.h:25