1// Copyright (C) 2016 The Qt Company Ltd.
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_QANIMATIONGROUP_H
5#define QT3DANIMATION_QANIMATIONGROUP_H
6
7#include <QtCore/qobject.h>
8
9#include <Qt3DAnimation/qabstractanimation.h>
10
11#include <Qt3DAnimation/qt3danimation_global.h>
12
13QT_BEGIN_NAMESPACE
14
15namespace Qt3DAnimation {
16
17class QAnimationGroupPrivate;
18
19class Q_3DANIMATIONSHARED_EXPORT QAnimationGroup : public QObject
20{
21 Q_OBJECT
22 Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
23 Q_PROPERTY(float position READ position WRITE setPosition NOTIFY positionChanged)
24 Q_PROPERTY(float duration READ duration NOTIFY durationChanged)
25
26public:
27 explicit QAnimationGroup(QObject *parent = nullptr);
28
29 QString name() const;
30 QList<Qt3DAnimation::QAbstractAnimation *> animationList();
31 float position() const;
32 float duration() const;
33
34 void setAnimations(const QList<Qt3DAnimation::QAbstractAnimation *> &animations);
35 void addAnimation(Qt3DAnimation::QAbstractAnimation *animation);
36 void removeAnimation(Qt3DAnimation::QAbstractAnimation *animation);
37
38public Q_SLOTS:
39 void setName(const QString &name);
40 void setPosition(float position);
41
42Q_SIGNALS:
43 void nameChanged(const QString &name);
44 void positionChanged(float position);
45 void durationChanged(float duration);
46
47private:
48
49 Q_DECLARE_PRIVATE(QAnimationGroup)
50};
51
52} // Qt3DAnimation
53
54QT_END_NAMESPACE
55
56#endif // QT3DANIMATION_QANIMATIONGROUP_H
57

source code of qt3d/src/animation/frontend/qanimationgroup.h