| 1 | // Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB). |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QT3DEXTRAS_QTEXT2DENTITY_H |
| 5 | #define |
| 6 | |
| 7 | #include <QtCore/qrect.h> |
| 8 | #include <QtGui/qcolor.h> |
| 9 | #include <QtGui/qfont.h> |
| 10 | #include <Qt3DCore/qentity.h> |
| 11 | #include <Qt3DExtras/qt3dextras_global.h> |
| 12 | |
| 13 | QT_BEGIN_NAMESPACE |
| 14 | |
| 15 | namespace Qt3DExtras { |
| 16 | |
| 17 | class ; |
| 18 | |
| 19 | class Q_3DEXTRASSHARED_EXPORT : public Qt3DCore::QEntity |
| 20 | { |
| 21 | Q_OBJECT |
| 22 | Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged) |
| 23 | Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged) |
| 24 | Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) |
| 25 | Q_PROPERTY(float width READ width WRITE setWidth NOTIFY widthChanged) |
| 26 | Q_PROPERTY(float height READ height WRITE setHeight NOTIFY heightChanged) |
| 27 | Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment) |
| 28 | |
| 29 | public: |
| 30 | explicit (Qt3DCore::QNode *parent = nullptr); |
| 31 | (); |
| 32 | |
| 33 | QFont () const; |
| 34 | void (const QFont &font); |
| 35 | |
| 36 | QColor () const; |
| 37 | void (const QColor &color); |
| 38 | |
| 39 | QString () const; |
| 40 | void (const QString &text); |
| 41 | |
| 42 | float () const; |
| 43 | float () const; |
| 44 | |
| 45 | void (float width); |
| 46 | void (float height); |
| 47 | |
| 48 | Qt::Alignment () const; |
| 49 | void (Qt::Alignment alignment); |
| 50 | |
| 51 | Q_SIGNALS: |
| 52 | void (const QFont &font); |
| 53 | void (const QColor &color); |
| 54 | void (const QString &text); |
| 55 | void (float width); |
| 56 | void (float height); |
| 57 | |
| 58 | private: |
| 59 | Q_DECLARE_PRIVATE(QText2DEntity) |
| 60 | }; |
| 61 | |
| 62 | } // namespace Qt3DExtras |
| 63 | |
| 64 | QT_END_NAMESPACE |
| 65 | |
| 66 | #endif // QT3DEXTRAS_QTEXT2DENTITY_H |
| 67 | |