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

source code of qt3d/src/render/materialsystem/qshaderdata.h