OpenMS
2.7.0
|
A peak annotation item. More...
#include <OpenMS/VISUAL/ANNOTATION/Annotation1DPeakItem.h>
Public Member Functions | |
Annotation1DPeakItem (const PointType &peak_position, const QString &text, const QColor &color) | |
Constructor. More... | |
Annotation1DPeakItem (const Annotation1DPeakItem &rhs) | |
Copy constructor. More... | |
~Annotation1DPeakItem () override | |
Destructor. More... | |
void | ensureWithinDataRange (Plot1DCanvas *const canvas) override |
Docu in base class. More... | |
void | draw (Plot1DCanvas *const canvas, QPainter &painter, bool flipped=false) override |
Docu in base class. More... | |
void | move (const PointType &) override |
Docu in base class. More... | |
const PointType & | getPeakPosition () const |
Returns the position of the label (peak) (in MZ/intensity coordinates) More... | |
void | setPosition (const PointType &position) |
Sets the position of the label (in MZ/intensity coordinates) More... | |
const PointType & | getPosition () const |
Returns the position of the annotated peak (in MZ/intensity coordinates) More... | |
void | setColor (const QColor &color) |
Set the color of the label. More... | |
const QColor & | getColor () const |
Returns the color of the label. More... | |
Public Member Functions inherited from Annotation1DItem | |
virtual | ~Annotation1DItem () |
Destructor. More... | |
const QRectF & | boundingBox () const |
Returns the current bounding box of this item on the canvas where it has last been drawn. More... | |
bool | isSelected () const |
Returns true if this item is currently selected on the canvas, else false. More... | |
void | setSelected (bool selected) |
Sets whether this item is currently selected on the canvas or not. More... | |
void | setText (const QString &text) |
Sets the text of the item. More... | |
const QString & | getText () const |
Returns the text of the item. More... | |
bool | editText () |
Static Public Member Functions | |
static QRectF | calculateBoundingBox (const PointType &peak_position, const PointType &position, const QString &text, Plot1DCanvas *const canvas, bool flipped, QPoint &position_widget, QPoint &peak_position_widget, double &horizontal_shift, double &vertical_shift) |
Calculate bounding box in widget coordinates. More... | |
Protected Attributes | |
PointType | peak_position_ |
The position of the anchor (peak) (in MZ / intensity coordinates) More... | |
PointType | position_ |
The position of the label (in MZ / intensity coordinates) More... | |
QColor | color_ |
The color of the label. More... | |
Protected Attributes inherited from Annotation1DItem | |
QRectF | bounding_box_ |
The current bounding box of this item on the canvas where it has last been drawn. More... | |
bool | selected_ |
Determines whether this item is currently selected on the canvas. More... | |
QString | text_ |
The displayed text. More... | |
Additional Inherited Members | |
Public Types inherited from Annotation1DItem | |
typedef DPosition< 2 > | PointType |
Type of the Points. More... | |
typedef float | IntensityType |
Intensity type. More... | |
typedef double | CoordinateType |
Coordinate type. More... | |
Protected Member Functions inherited from Annotation1DItem | |
Annotation1DItem (const QString &text) | |
Constructor. More... | |
Annotation1DItem (const Annotation1DItem &rhs) | |
Copy constructor. More... | |
void | drawBoundingBox_ (QPainter &painter) |
Draws the bounding_box_. More... | |
A peak annotation item.
Annotation1DPeakItem | ( | const PointType & | peak_position, |
const QString & | text, | ||
const QColor & | color | ||
) |
Constructor.
Annotation1DPeakItem | ( | const Annotation1DPeakItem & | rhs | ) |
Copy constructor.
|
override |
Destructor.
|
static |
Calculate bounding box in widget coordinates.
|
overridevirtual |
Docu in base class.
Implements Annotation1DItem.
|
overridevirtual |
Docu in base class.
Implements Annotation1DItem.
const QColor& getColor | ( | ) | const |
Returns the color of the label.
const PointType& getPeakPosition | ( | ) | const |
Returns the position of the label (peak) (in MZ/intensity coordinates)
const PointType& getPosition | ( | ) | const |
Returns the position of the annotated peak (in MZ/intensity coordinates)
|
overridevirtual |
Docu in base class.
Implements Annotation1DItem.
void setColor | ( | const QColor & | color | ) |
Set the color of the label.
void setPosition | ( | const PointType & | position | ) |
Sets the position of the label (in MZ/intensity coordinates)
|
protected |
The color of the label.
|
protected |
The position of the anchor (peak) (in MZ / intensity coordinates)
|
protected |
The position of the label (in MZ / intensity coordinates)