67 void draw(
Plot1DCanvas*
const canvas, QPainter& painter,
bool flipped =
false)
override;
94 void setTicks(
const std::vector<PointXYType>& ticks);
An annotation item which represents a measured distance between two peaks.
Definition: Annotation1DDistanceItem.h:47
Annotation1DItem * clone() const override
Creates a copy of the item on the heap and returns a pointer.
Definition: Annotation1DDistanceItem.h:97
PointXYType start_point_
The start point of the measured distance line (in XY data coordinates)
Definition: Annotation1DDistanceItem.h:104
void draw(Plot1DCanvas *const canvas, QPainter &painter, bool flipped=false) override
Draws the item on painter.
const PointXYType & getEndPoint() const
Returns the end point.
Definition: Annotation1DDistanceItem.h:79
std::vector< PointXYType > ticks_
Additional tick lines for the distance item (the gravity dimension is ignored)
Definition: Annotation1DDistanceItem.h:108
void ensureWithinDataRange(Plot1DCanvas *const canvas, const int layer_index) override
Ensures that the item has coordinates within the visible area of the canvas.
void setTicks(const std::vector< PointXYType > &ticks)
Set tick lines for the distance item in unit XY coordinates (the gravity dimension is ignored)
const PointXYType & getStartPoint() const
Returns the start point.
Definition: Annotation1DDistanceItem.h:73
PointXYType end_point_
The end point of the measured distance line (in XY data coordinates)
Definition: Annotation1DDistanceItem.h:106
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...
Annotation1DDistanceItem(const Annotation1DDistanceItem &rhs)=default
Copy constructor.
Annotation1DDistanceItem(const QString &text, const PointXYType &start_point, const PointXYType &end_point, const bool swap_ends_if_negative=true)
~Annotation1DDistanceItem() override=default
Destructor.
double getDistance() const
Compute the (negative) euclidean distance between start and endpoint.
An abstract class acting as an interface for the different 1D annotation items.
Definition: Annotation1DItem.h:62
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