| 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_RENDER_RENDERFILTERKEY_P_H |
| 5 | #define QT3DRENDER_RENDER_RENDERFILTERKEY_P_H |
| 6 | |
| 7 | // |
| 8 | // W A R N I N G |
| 9 | // ------------- |
| 10 | // |
| 11 | // This file is not part of the Qt API. It exists for the convenience |
| 12 | // of other Qt classes. This header file may change from version to |
| 13 | // version without notice, or even be removed. |
| 14 | // |
| 15 | // We mean it. |
| 16 | // |
| 17 | |
| 18 | #include <Qt3DRender/private/backendnode_p.h> |
| 19 | #include <Qt3DRender/qfilterkey.h> |
| 20 | |
| 21 | QT_BEGIN_NAMESPACE |
| 22 | |
| 23 | namespace Qt3DRender { |
| 24 | |
| 25 | class QFilterKey; |
| 26 | |
| 27 | namespace Render { |
| 28 | |
| 29 | class Q_3DRENDERSHARED_PRIVATE_EXPORT FilterKey : public BackendNode |
| 30 | { |
| 31 | public: |
| 32 | FilterKey(); |
| 33 | ~FilterKey(); |
| 34 | void cleanup(); |
| 35 | |
| 36 | const QVariant &value() const { return m_value; } |
| 37 | const QString &name() const { return m_name; } |
| 38 | void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override; |
| 39 | |
| 40 | friend bool operator==(const FilterKey &lhs, const FilterKey &rhs) |
| 41 | { return lhs.equals(other: rhs); } |
| 42 | friend bool operator !=(const FilterKey &lhs, const FilterKey &rhs) |
| 43 | { return !lhs.equals(other: rhs); } |
| 44 | |
| 45 | private: |
| 46 | bool equals(const FilterKey &other) const; |
| 47 | |
| 48 | QVariant m_value; |
| 49 | QString m_name; |
| 50 | }; |
| 51 | |
| 52 | } // namespace Render |
| 53 | |
| 54 | } // namespace Qt3DRender |
| 55 | |
| 56 | QT_END_NAMESPACE |
| 57 | |
| 58 | #endif // QT3DRENDER_RENDER_RENDERFILTERKEY_P_H |
| 59 | |