An annotation item which represents an arbitrary text on the canvas.
More...
#include <OpenMS/VISUAL/ANNOTATION/Annotation1DTextItem.h>
|
| | Annotation1DTextItem (const PointXYType &position, const QString &text, const int flags=Qt::AlignCenter) |
| | Constructor.
|
| |
| | Annotation1DTextItem (const Annotation1DTextItem &rhs)=default |
| | Copy constructor.
|
| |
| | ~Annotation1DTextItem () override=default |
| | Destructor.
|
| |
| void | ensureWithinDataRange (Plot1DCanvas *const canvas, const int layer_index) 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.
|
| |
| 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 subclasses.
|
| |
| void | setPosition (const PointXYType &position) |
| | Sets the position of the item (in X-Y coordinates)
|
| |
| const PointXYType & | getPosition () const |
| | Returns the position of the item (in X-Y coordinates)
|
| |
| void | setFlags (int flags) |
| | Set Qt flags (default: Qt::AlignCenter)
|
| |
| int | getFlags () const |
| | Get Qt flags.
|
| |
| Annotation1DItem * | clone () const override |
| | Creates a copy of the item on the heap and returns a pointer.
|
| |
| virtual | ~Annotation1DItem () |
| | Destructor.
|
| |
| const QRectF & | boundingBox () const |
| | Returns the current bounding box of this item on the canvas where it has last been drawn.
|
| |
| bool | isSelected () const |
| | Returns true if this item is currently selected on the canvas, else false.
|
| |
| void | setSelected (bool selected) |
| | Sets whether this item is currently selected on the canvas or not.
|
| |
| void | setText (const QString &text) |
| | Sets the text of the item.
|
| |
| const QString & | getText () const |
| | Returns the text of the item.
|
| |
| bool | editText () |
| |
|
| PointXYType | position_ |
| | The position of the item as a datatype, e.g. Peak1D.
|
| |
| int | flags_ |
| |
| QRectF | bounding_box_ |
| | The current bounding box of this item on the canvas where it has last been drawn.
|
| |
| bool | selected_ |
| | Determines whether this item is currently selected on the canvas.
|
| |
| QString | text_ |
| | The displayed text.
|
| |
An annotation item which represents an arbitrary text on the canvas.
- See also
- Annotation1DItem
◆ Annotation1DTextItem() [1/2]
◆ Annotation1DTextItem() [2/2]
◆ ~Annotation1DTextItem()
◆ clone()
Creates a copy of the item on the heap and returns a pointer.
Implements Annotation1DItem.
◆ draw()
| void draw |
( |
Plot1DCanvas *const |
canvas, |
|
|
QPainter & |
painter, |
|
|
bool |
flipped = false |
|
) |
| |
|
overridevirtual |
◆ ensureWithinDataRange()
| void ensureWithinDataRange |
( |
Plot1DCanvas *const |
canvas, |
|
|
const int |
layer_index |
|
) |
| |
|
overridevirtual |
Ensures that the item has coordinates within the visible area of the canvas.
Implements Annotation1DItem.
◆ getFlags()
◆ getPosition()
◆ move()
Moves the item on the drawing canvas; behavior depends on item type and is implemented in the subclasses.
Implements Annotation1DItem.
◆ setFlags()
| void setFlags |
( |
int |
flags | ) |
|
|
inline |
◆ setPosition()
◆ flags_
◆ position_