 |
OpenMS
3.0.0
|
|
Go to the documentation of this file.
40 #include <QtGui/QColor>
69 Annotation1DVerticalLineItem(
const double x_center_pos,
const double width,
const int alpha255 = 128,
const bool dashed_line =
false,
const QColor& color = QColor(
"as_before"),
const QString& text =
"");
77 void draw(
Plot1DCanvas*
const canvas, QPainter& painter,
bool flipped =
false)
override;
Canvas for visualization of one or several spectra.
Definition: Plot1DCanvas.h:70
void ensureWithinDataRange(Plot1DCanvas *const canvas) override
Ensures that the item has coordinates within the visible area of the canvas.
void draw(Plot1DCanvas *const canvas, QPainter &painter, bool flipped=false) override
Draws the item on painter.
float width_
width of the item (allowing to show a 'band' if > 1)
Definition: Annotation1DVerticalLineItem.h:98
An annotation item which represents a vertical line and text label on top.
Definition: Annotation1DVerticalLineItem.h:47
void setPosition(const double &x)
Sets the uppermost position of the line.
bool dashed_
is the band/line dashed?
Definition: Annotation1DVerticalLineItem.h:102
void move(const PointType &delta) override
Moves the item; behaviour depends on item type and is implemented in the subclasses.
double x_
The position of the vertical line.
Definition: Annotation1DVerticalLineItem.h:93
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
QRectF getTextRect() const
size of the painted text (width and height of the rectangle)
const double & getPosition() const
Returns the position.
QColor color_
The color of the line; if invalid, the current painter color will be used.
Definition: Annotation1DVerticalLineItem.h:105
An abstract class acting as an interface for the different 1D annotation items.
Definition: Annotation1DItem.h:59
float alpha255_
transparency 0...255 of the band/line
Definition: Annotation1DVerticalLineItem.h:100
Annotation1DVerticalLineItem(const double x_pos, const QColor &color=QColor("as_before"), const QString &text="")
int y_text_offset_
offset in y for the text (to avoid overlaps)
Definition: Annotation1DVerticalLineItem.h:95
~Annotation1DVerticalLineItem() override=default
Destructor.
void setTextYOffset(int y_offset)
offset the text by this much downwards in y-direction (to avoid overlaps etc)