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