An annotation item which paints a set of carets on the canvas. More...
#include <OpenMS/VISUAL/ANNOTATION/Annotation1DCaret.h>
Public Types | |
typedef Annotation1DItem::PointType | PointType |
typedef std::vector< PointType > | PositionsType |
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... | |
Public Member Functions | |
Annotation1DCaret (const PositionsType &poly_positions, const QString &text, const QColor &colour, const QColor &connection_line_color) | |
Constructor. More... | |
Annotation1DCaret (const Annotation1DCaret &rhs) | |
Copy constructor. More... | |
virtual | ~Annotation1DCaret () |
Destructor. More... | |
virtual void | ensureWithinDataRange (Spectrum1DCanvas *const canvas) |
Ensures that the item has coordinates within the visible area of the canvas. More... | |
virtual void | draw (Spectrum1DCanvas *const canvas, QPainter &painter, bool flipped=false) |
Draws the item on painter . More... | |
virtual void | move (const PointType &delta) |
Moves the item; behaviour depends on item type and is implemented in the subclasses. More... | |
const PositionsType & | getCaretPositions () const |
Returns the positions of the lines (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 colour of the carets (colour of text must be set using html) More... | |
const QColor & | getColor () const |
Returns the colour of the carets. More... | |
void | setRichText (const QString &text) |
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 () |
Protected Attributes | |
PositionsType | caret_positions_ |
PointType | position_ |
The position of the label (in MZ/intensity coordinates) More... | |
QColor | color_ |
The colour of the label. More... | |
QColor | connection_line_color_ |
The colour of the (optional) dashed line connecting peak and label. More... | |
QStaticText | st_ |
Holds the (rich) text. 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 | |
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... | |
An annotation item which paints a set of carets on the canvas.
Most useful to visualize (theoretical) isotope distributions (one caret per isotope position). Additionally, a text annotation can be provided.
typedef Annotation1DItem::PointType PointType |
typedef std::vector<PointType> PositionsType |
Annotation1DCaret | ( | const PositionsType & | poly_positions, |
const QString & | text, | ||
const QColor & | colour, | ||
const QColor & | connection_line_color | ||
) |
Constructor.
Annotation1DCaret | ( | const Annotation1DCaret & | rhs | ) |
Copy constructor.
|
virtual |
Destructor.
|
virtual |
Draws the item on painter
.
Implements Annotation1DItem.
|
virtual |
Ensures that the item has coordinates within the visible area of the canvas.
Implements Annotation1DItem.
const PositionsType& getCaretPositions | ( | ) | const |
Returns the positions of the lines (in MZ / intensity coordinates)
const QColor& getColor | ( | ) | const |
Returns the colour of the carets.
const PointType& getPosition | ( | ) | const |
Returns the position of the annotated peak (in MZ / intensity coordinates)
|
virtual |
Moves the item; behaviour depends on item type and is implemented in the subclasses.
Implements Annotation1DItem.
void setColor | ( | const QColor & | color | ) |
Set the colour of the carets (colour of text must be set using html)
void setPosition | ( | const PointType & | position | ) |
Sets the position of the label (in MZ / intensity coordinates)
void setRichText | ( | const QString & | text | ) |
The text to display (optional). Rendered using QStaticText, so HTML formatting is allowed.
|
protected |
The positions of points (in MZ/intensity coordinates) Ensure positions are sorted by m/z when assigning
|
protected |
The colour of the label.
|
protected |
The colour of the (optional) dashed line connecting peak and label.
|
protected |
The position of the label (in MZ/intensity coordinates)
|
protected |
Holds the (rich) text.
OpenMS / TOPP release 2.3.0 | Documentation generated on Tue Jan 9 2018 18:22:07 using doxygen 1.8.13 |