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:62
An annotation item which represents an arbitrary text on the canvas.
Definition: Annotation1DTextItem.h:47
Annotation1DItem * clone() const override
Creates a copy of the item on the heap and returns a pointer.
Definition: Annotation1DTextItem.h:95
void setFlags(int flags)
Set Qt flags (default: Qt::AlignCenter)
Definition: Annotation1DTextItem.h:83
Annotation1DTextItem(const Annotation1DTextItem &rhs)=default
Copy constructor.
int flags_
Definition: Annotation1DTextItem.h:104
void draw(Plot1DCanvas *const canvas, QPainter &painter, bool flipped=false) override
Draws the item on painter.
void ensureWithinDataRange(Plot1DCanvas *const canvas, const int layer_index) override
Ensures that the item has coordinates within the visible area of the canvas.
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
const PointXYType & getPosition() const
Returns the position of the item (in X-Y coordinates)
Definition: Annotation1DTextItem.h:77
~Annotation1DTextItem() override=default
Destructor.
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...
void setPosition(const PointXYType &position)
Sets the position of the item (in X-Y coordinates)
Definition: Annotation1DTextItem.h:71
Annotation1DTextItem(const PointXYType &position, const QString &text, const int flags=Qt::AlignCenter)
Constructor.
Definition: Annotation1DTextItem.h:51
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:68
Canvas for visualization of one or several spectra.
Definition: Plot1DCanvas.h:321
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:48