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 QANIMATIONGROUP_H
5#define QANIMATIONGROUP_H
6
7#include <QtCore/qabstractanimation.h>
8
9QT_REQUIRE_CONFIG(animation);
10
11QT_BEGIN_NAMESPACE
12
13class QAnimationGroupPrivate;
14class Q_CORE_EXPORT QAnimationGroup : public QAbstractAnimation
15{
16 Q_OBJECT
17
18public:
19 QAnimationGroup(QObject *parent = nullptr);
20 ~QAnimationGroup();
21
22 QAbstractAnimation *animationAt(int index) const;
23 int animationCount() const;
24 int indexOfAnimation(QAbstractAnimation *animation) const;
25 void addAnimation(QAbstractAnimation *animation);
26 void insertAnimation(int index, QAbstractAnimation *animation);
27 void removeAnimation(QAbstractAnimation *animation);
28 QAbstractAnimation *takeAnimation(int index);
29 void clear();
30
31protected:
32 QAnimationGroup(QAnimationGroupPrivate &dd, QObject *parent);
33 bool event(QEvent *event) override;
34
35private:
36 Q_DISABLE_COPY(QAnimationGroup)
37 Q_DECLARE_PRIVATE(QAnimationGroup)
38};
39
40QT_END_NAMESPACE
41
42#endif //QANIMATIONGROUP_H
43

source code of qtbase/src/corelib/animation/qanimationgroup.h