44 class Annotation1DItem;
101 return annotations_1d_[current_idx_];
107 return annotations_1d_[current_idx_];
113 return annotations_1d_[spectrum_index];
119 return annotations_1d_[spectrum_index];
134 bool flipped =
false;
144 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:62
Container for annotations to content of Plot1DCanvas.
Definition: Annotations1DContainer.h:55
Base class for all 1D layers, a special case of LayerData.
Definition: LayerData1DBase.h:54
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:111
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:122
virtual RangeAllType getRange1D() const =0
Annotations1DContainer & getCurrentAnnotations()
Returns a mutable reference to the annotations of the current spectrum (1D view)
Definition: LayerData1DBase.h:105
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:99
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:117
std::vector< QColor > peak_colors_1d
Peak colors of the currently shown spectrum.
Definition: LayerData1DBase.h:137
Class that stores the data for one layer.
Definition: LayerDataBase.h:195
A more convenient string class.
Definition: String.h:60
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:48
Index of a peak or feature.
Definition: PeakIndex.h:51