OGS
QNonScalableGraphicsTextItem.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <QGraphicsTextItem>
7
13class QNonScalableGraphicsTextItem : public QGraphicsTextItem
14{
15public:
16 explicit QNonScalableGraphicsTextItem(QGraphicsItem* parent = nullptr);
17 explicit QNonScalableGraphicsTextItem(const QString& text,
18 QGraphicsItem* parent = nullptr);
20
21 void paint(QPainter* painter,
22 const QStyleOptionGraphicsItem* option,
23 QWidget* widget) override;
24 QRectF boundingRect() const override;
25};
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