OGS
QNonScalableGraphicsTextItem.h
Go to the documentation of this file.
1
15#pragma once
16
17#include <QGraphicsTextItem>
18
24class QNonScalableGraphicsTextItem : public QGraphicsTextItem
25{
26public:
27 explicit QNonScalableGraphicsTextItem(QGraphicsItem* parent = nullptr);
28 explicit QNonScalableGraphicsTextItem(const QString& text,
29 QGraphicsItem* parent = nullptr);
31
32 void paint(QPainter* painter,
33 const QStyleOptionGraphicsItem* option,
34 QWidget* widget) override;
35 QRectF boundingRect() const override;
36};
A QGraphicsTextItem that will ignore all geometric transformations.
QRectF boundingRect() const override
Returns the bounding rectangle of the text item.
QNonScalableGraphicsTextItem(QGraphicsItem *parent=nullptr)
Constructor using a QGraphicsTextItem.
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
Paints the text item.
~QNonScalableGraphicsTextItem() override