65 void draw(
Plot1DCanvas*
const canvas, QPainter& painter,
bool flipped =
false)
override;
An abstract class acting as an interface for the different 1D annotation items.
Definition: Annotation1DItem.h:61
int getFlags() const
Get Qt flags.
Definition: Annotation1DTextItem.h:89
PointXYType position_
The position of the item as a datatype, e.g. Peak1D.
Definition: Annotation1DTextItem.h:102
Canvas for visualization of one or several spectra.
Definition: Plot1DCanvas.h:319
const PointXYType & getPosition() const
Returns the position of the item (in X-Y coordinates)
Definition: Annotation1DTextItem.h:77
void draw(Plot1DCanvas *const canvas, QPainter &painter, bool flipped=false) override
Draws the item on painter.
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
void ensureWithinDataRange(Plot1DCanvas *const canvas, const int layer_index) override
Ensures that the item has coordinates within the visible area of the canvas.
void setPosition(const PointXYType &position)
Sets the position of the item (in X-Y coordinates)
Definition: Annotation1DTextItem.h:71
~Annotation1DTextItem() override=default
Destructor.
void setFlags(int flags)
Set Qt flags (default: Qt::AlignCenter)
Definition: Annotation1DTextItem.h:83
int flags_
Definition: Annotation1DTextItem.h:104
Annotation1DItem * clone() const override
Creates a copy of the item on the heap and returns a pointer.
Definition: Annotation1DTextItem.h:95
void move(const PointXYType delta, const Gravitator &gr, const DimMapper< 2 > &dim_mapper) override
Moves the item on the drawing canvas; behavior depends on item type and is implemented in the subclas...
An annotation item which represents an arbitrary text on the canvas.
Definition: Annotation1DTextItem.h:45
Manipulates X or Y component of points in the X-Y plane, by assuming one axis (either X or Y axis) ha...
Definition: Plot1DCanvas.h:67
Annotation1DTextItem(const PointXYType &position, const QString &text, const int flags=Qt::AlignCenter)
Constructor.
Definition: Annotation1DTextItem.h:51