39 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:36
An annotation item which represents an arbitrary text on the canvas.
Definition: Annotation1DTextItem.h:21
Annotation1DItem * clone() const override
Creates a copy of the item on the heap and returns a pointer.
Definition: Annotation1DTextItem.h:69
void setFlags(int flags)
Set Qt flags (default: Qt::AlignCenter)
Definition: Annotation1DTextItem.h:57
Annotation1DTextItem(const Annotation1DTextItem &rhs)=default
Copy constructor.
int flags_
Definition: Annotation1DTextItem.h:78
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:63
PointXYType position_
The position of the item as a datatype, e.g. Peak1D.
Definition: Annotation1DTextItem.h:76
const PointXYType & getPosition() const
Returns the position of the item (in X-Y coordinates)
Definition: Annotation1DTextItem.h:51
~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:45
Annotation1DTextItem(const PointXYType &position, const QString &text, const int flags=Qt::AlignCenter)
Constructor.
Definition: Annotation1DTextItem.h:25
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:42
Canvas for visualization of one or several spectra.
Definition: Plot1DCanvas.h:295
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19