| 1 | // Copyright (C) 2017 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 QT3DANIMATION_QCHANNELMAPPING_H |
| 5 | #define QT3DANIMATION_QCHANNELMAPPING_H |
| 6 | |
| 7 | #include <Qt3DAnimation/qt3danimation_global.h> |
| 8 | #include <Qt3DAnimation/qanimationcallback.h> |
| 9 | #include <Qt3DAnimation/qabstractchannelmapping.h> |
| 10 | |
| 11 | QT_BEGIN_NAMESPACE |
| 12 | |
| 13 | namespace Qt3DAnimation { |
| 14 | |
| 15 | class QChannelMappingPrivate; |
| 16 | |
| 17 | class Q_3DANIMATIONSHARED_EXPORT QChannelMapping : public QAbstractChannelMapping |
| 18 | { |
| 19 | Q_OBJECT |
| 20 | Q_PROPERTY(QString channelName READ channelName WRITE setChannelName NOTIFY channelNameChanged) |
| 21 | Q_PROPERTY(Qt3DCore::QNode *target READ target WRITE setTarget NOTIFY targetChanged) |
| 22 | Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY propertyChanged) |
| 23 | |
| 24 | public: |
| 25 | explicit QChannelMapping(Qt3DCore::QNode *parent = nullptr); |
| 26 | ~QChannelMapping(); |
| 27 | |
| 28 | QString channelName() const; |
| 29 | Qt3DCore::QNode *target() const; |
| 30 | QString property() const; |
| 31 | |
| 32 | public Q_SLOTS: |
| 33 | void setChannelName(const QString &channelName); |
| 34 | void setTarget(Qt3DCore::QNode *target); |
| 35 | void setProperty(const QString &property); |
| 36 | |
| 37 | Q_SIGNALS: |
| 38 | void channelNameChanged(QString channelName); |
| 39 | void targetChanged(Qt3DCore::QNode *target); |
| 40 | void propertyChanged(QString property); |
| 41 | |
| 42 | protected: |
| 43 | explicit QChannelMapping(QChannelMappingPrivate &dd, Qt3DCore::QNode *parent = nullptr); |
| 44 | |
| 45 | private: |
| 46 | Q_DECLARE_PRIVATE(QChannelMapping) |
| 47 | }; |
| 48 | |
| 49 | } // namespace Qt3DAnimation |
| 50 | |
| 51 | QT_END_NAMESPACE |
| 52 | |
| 53 | #endif // QT3DANIMATION_QCHANNELMAPPING_H |
| 54 | |