virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
Updates position.
static void setText(QTextDocument &doc, const QString &text, unsigned color=0)
Sets text.
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr) override
Paints item.
virtual int type() const override
Returns specific QGraphicsItem type number.
Definition textitem.h:117
virtual QRectF boundingRect() const override
Calculates bounding rectangle.
void setText(const QString &text)
Sets text.
Definition textitem.h:105
void writePlo(KConfigGroup *plo) const
Writes into plot file.
TextItem(const KConfigGroup *plo, unsigned color=0, QGraphicsItem *parent=nullptr)
Constructor.
void setAlignment(Alignment alignment)
Sets alignment.
Definition textitem.h:88
TextItem(const TextItem &a)
Copy constructor.
Alignment alignment() const
Returns horizontal alignment.
Definition textitem.h:76
double dir() const
Returns rotation angle in deg.
Definition textitem.h:80
TextItem(double x0=0, double y0=0, unsigned color=0, QGraphicsItem *parent=nullptr, const QString &text=QString(), bool visible=true, Alignment alignment=AlignLeft, double relSize=1, double dir=0)
Constructor.
void setProperties()
Sets properties according to transformation matrix.
void setSize()
Sets size according to transformation matrix.
void setProperties(const QTransform &m)
Sets properties according to transformation matrix.
void update()
Applies changes and forces redrawing.
QString text() const
Returns text.
Definition textitem.h:115