1 | // Copyright (C) 2014 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 QT3DRENDER_QSHADERDATA_H |
5 | #define QT3DRENDER_QSHADERDATA_H |
6 | |
7 | #include <Qt3DCore/qcomponent.h> |
8 | #include <Qt3DRender/qt3drender_global.h> |
9 | #include <QtCore/QList> |
10 | |
11 | QT_BEGIN_NAMESPACE |
12 | |
13 | namespace Qt3DRender { |
14 | |
15 | class QShaderDataPrivate; |
16 | |
17 | class Q_3DRENDERSHARED_EXPORT PropertyReaderInterface |
18 | { |
19 | public: |
20 | virtual ~PropertyReaderInterface(); |
21 | virtual QVariant readProperty(const QVariant &v) = 0; |
22 | }; |
23 | |
24 | typedef QSharedPointer<PropertyReaderInterface> PropertyReaderInterfacePtr; |
25 | |
26 | class Q_3DRENDERSHARED_EXPORT QShaderData : public Qt3DCore::QComponent |
27 | { |
28 | Q_OBJECT |
29 | public: |
30 | explicit QShaderData(Qt3DCore::QNode *parent = nullptr); |
31 | ~QShaderData(); |
32 | |
33 | PropertyReaderInterfacePtr propertyReader() const; |
34 | |
35 | bool event(QEvent *event) override; |
36 | |
37 | protected: |
38 | explicit QShaderData(QShaderDataPrivate &dd, Qt3DCore::QNode *parent = nullptr); |
39 | |
40 | private: |
41 | Q_DECLARE_PRIVATE(QShaderData) |
42 | }; |
43 | |
44 | } // namespace Qt3DRender |
45 | |
46 | QT_END_NAMESPACE |
47 | |
48 | Q_DECLARE_METATYPE(Qt3DRender::QShaderData*) // LCOV_EXCL_LINE |
49 | Q_DECLARE_METATYPE(QList<Qt3DRender::QShaderData*>) // LCOV_EXCL_LINE |
50 | |
51 | #endif // QT3DRENDER_QSHADERDATA_H |
52 |