summaryrefslogtreecommitdiffstats
path: root/src/animation/frontend/qanimationclip.h
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-01-14 15:23:49 +0000
committerSean Harmer <sean.harmer@kdab.com>2017-01-25 09:21:56 +0000
commit95dc166ad2b9110c1147a77fe15e3d44ea1101f1 (patch)
tree72f739d703a54bd0abc8b6d8cd5bc1fc6afe6d19 /src/animation/frontend/qanimationclip.h
parent48ed6dc99d25a69b418e699efe194f658f08d748 (diff)
Add QAnimationClip frontend class and test
Represents an animation clip. To keep the public API minimal just use a source property for now. API can be extended later to allow the user to procedurally create animation clips. Assumption for now is that we can export a suitable format from a digital content creation tool such as blender. Change-Id: Ie18b642a92e3cedb1833f013ffe1f7c0f5d07dac Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/animation/frontend/qanimationclip.h')
-rw-r--r--src/animation/frontend/qanimationclip.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/src/animation/frontend/qanimationclip.h b/src/animation/frontend/qanimationclip.h
new file mode 100644
index 000000000..f5394f8ff
--- /dev/null
+++ b/src/animation/frontend/qanimationclip.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt3D module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT3DANIMATION_QANIMATIONCLIP_H
+#define QT3DANIMATION_QANIMATIONCLIP_H
+
+#include <Qt3DAnimation/qt3danimation_global.h>
+#include <Qt3DCore/qnode.h>
+#include <QtCore/qurl.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3DAnimation {
+
+class QAnimationClipPrivate;
+
+class QT3DANIMATIONSHARED_EXPORT QAnimationClip : public Qt3DCore::QNode
+{
+ Q_OBJECT
+ Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
+
+public:
+ explicit QAnimationClip(Qt3DCore::QNode *parent = nullptr);
+ ~QAnimationClip();
+
+ QUrl source() const;
+
+public Q_SLOTS:
+ void setSource(QUrl source);
+
+Q_SIGNALS:
+ void sourceChanged(QUrl source);
+
+protected:
+ QAnimationClip(QAnimationClipPrivate &dd, Qt3DCore::QNode *parent = nullptr);
+
+private:
+ Q_DECLARE_PRIVATE(QAnimationClip)
+ Qt3DCore::QNodeCreatedChangeBasePtr createNodeCreationChange() const Q_DECL_OVERRIDE;
+};
+
+} // namespace Qt3DAnimation
+
+QT_END_NAMESPACE
+
+#endif // QT3DANIMATION_QANIMATIONCLIP_H