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 | |
9 | QT_REQUIRE_CONFIG(animation); |
10 | |
11 | QT_BEGIN_NAMESPACE |
12 | |
13 | class QAnimationGroupPrivate; |
14 | class Q_CORE_EXPORT QAnimationGroup : public QAbstractAnimation |
15 | { |
16 | Q_OBJECT |
17 | |
18 | public: |
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 | |
31 | protected: |
32 | QAnimationGroup(QAnimationGroupPrivate &dd, QObject *parent); |
33 | bool event(QEvent *event) override; |
34 | |
35 | private: |
36 | Q_DISABLE_COPY(QAnimationGroup) |
37 | Q_DECLARE_PRIVATE(QAnimationGroup) |
38 | }; |
39 | |
40 | QT_END_NAMESPACE |
41 | |
42 | #endif //QANIMATIONGROUP_H |
43 |