1 | // Copyright (C) 2023 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | // |
5 | // W A R N I N G |
6 | // ------------- |
7 | // |
8 | // This file is not part of the Qt API. It exists purely as an |
9 | // implementation detail. This header file may change from version to |
10 | // version without notice, or even be removed. |
11 | // |
12 | // We mean it. |
13 | // |
14 | |
15 | #ifndef QQUICK3DTEXTUREDATAFRONTEND_H |
16 | #define QQUICK3DTEXTUREDATAFRONTEND_H |
17 | |
18 | #include <QtQuick3D/QQuick3DTextureData> |
19 | #include <QtQml/QQmlEngine> |
20 | |
21 | #include <QtCore/QByteArray> |
22 | |
23 | QT_BEGIN_NAMESPACE |
24 | |
25 | class QQuick3DTextureDataFrontend : public QQuick3DTextureData |
26 | { |
27 | Q_OBJECT |
28 | Q_PROPERTY(QQuick3DTextureData::Format format READ format WRITE setFormat NOTIFY formatChanged) |
29 | Q_PROPERTY(int width READ width WRITE setWidth NOTIFY widthChanged) |
30 | Q_PROPERTY(int height READ height WRITE setHeight NOTIFY heightChanged) |
31 | Q_PROPERTY(int depth READ depth WRITE setDepth NOTIFY depthChanged) |
32 | Q_PROPERTY(bool hasTransparency READ hasTransparency WRITE setHasTransparency NOTIFY hasTransparencyChanged) |
33 | Q_PROPERTY(QByteArray textureData READ textureData WRITE setTextureData NOTIFY textureDataChanged) |
34 | |
35 | QML_NAMED_ELEMENT(ProceduralTextureData) |
36 | QML_ADDED_IN_VERSION(6, 6) |
37 | public: |
38 | QQuick3DTextureDataFrontend(); |
39 | QQuick3DTextureData::Format format() const; |
40 | void setFormat(const QQuick3DTextureData::Format &newFormat); |
41 | |
42 | int depth() const; |
43 | void setDepth(int newDepth); |
44 | |
45 | bool hasTransparency() const; |
46 | void setHasTransparency(bool newHasTransparency); |
47 | |
48 | QByteArray textureData() const; |
49 | void setTextureData(const QByteArray &newTextureData); |
50 | |
51 | int width() const; |
52 | void setWidth(int newWidth); |
53 | |
54 | int height() const; |
55 | void setHeight(int newHeight); |
56 | |
57 | Q_SIGNALS: |
58 | void formatChanged(); |
59 | void depthChanged(); |
60 | void hasTransparencyChanged(); |
61 | void textureDataChanged(); |
62 | void widthChanged(); |
63 | void heightChanged(); |
64 | }; |
65 | |
66 | QT_END_NAMESPACE |
67 | |
68 | #endif // QQUICK3DTEXTUREDATAFRONTEND_H |
69 | |