| 1 | // Copyright (C) 2015 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 QT3DLOGIC_QFRAMEACTION_H |
| 5 | #define QT3DLOGIC_QFRAMEACTION_H |
| 6 | |
| 7 | #include <Qt3DCore/qcomponent.h> |
| 8 | #include <Qt3DLogic/qt3dlogic_global.h> |
| 9 | |
| 10 | QT_BEGIN_NAMESPACE |
| 11 | |
| 12 | namespace Qt3DLogic { |
| 13 | |
| 14 | class QLogicAspect; |
| 15 | class QFrameActionPrivate; |
| 16 | |
| 17 | namespace Logic { |
| 18 | class Executor; |
| 19 | } |
| 20 | |
| 21 | class Q_3DLOGICSHARED_EXPORT QFrameAction : public Qt3DCore::QComponent |
| 22 | { |
| 23 | Q_OBJECT |
| 24 | |
| 25 | public: |
| 26 | explicit QFrameAction(Qt3DCore::QNode *parent = nullptr); |
| 27 | ~QFrameAction(); |
| 28 | |
| 29 | protected: |
| 30 | QFrameAction(QFrameActionPrivate &dd, QNode *parent = nullptr); |
| 31 | |
| 32 | Q_SIGNALS: |
| 33 | void triggered(float dt); |
| 34 | |
| 35 | private: |
| 36 | Q_DECLARE_PRIVATE(QFrameAction) |
| 37 | void onTriggered(float dt); |
| 38 | |
| 39 | friend class Logic::Executor; |
| 40 | }; |
| 41 | |
| 42 | } // namespace Qt3DLogic |
| 43 | |
| 44 | QT_END_NAMESPACE |
| 45 | |
| 46 | #endif // QT3DLOGIC_QFRAMEACTION_H |
| 47 | |