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// Qt-Security score:significant reason:default
4
5#ifndef QANIMATIONGROUP_P_H
6#define QANIMATIONGROUP_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include "qanimationgroup.h"
20
21#include <QtCore/qlist.h>
22
23#include "private/qabstractanimation_p.h"
24
25QT_REQUIRE_CONFIG(animation);
26
27QT_BEGIN_NAMESPACE
28
29class QAnimationGroupPrivate : public QAbstractAnimationPrivate
30{
31 Q_DECLARE_PUBLIC(QAnimationGroup)
32public:
33 QAnimationGroupPrivate()
34 {
35 isGroup = true;
36 }
37
38 virtual void animationInsertedAt(qsizetype) { }
39 virtual void animationRemoved(qsizetype, QAbstractAnimation *);
40
41 void clear(bool onDestruction);
42
43 void disconnectUncontrolledAnimation(QAbstractAnimation *anim)
44 {
45 //0 for the signal here because we might be called from the animation destructor
46 QObject::disconnect(sender: anim, signal: nullptr, receiver: q_func(), SLOT(_q_uncontrolledAnimationFinished()));
47 }
48
49 void connectUncontrolledAnimation(QAbstractAnimation *anim)
50 {
51 QObject::connect(sender: anim, SIGNAL(finished()), receiver: q_func(), SLOT(_q_uncontrolledAnimationFinished()));
52 }
53
54 QList<QAbstractAnimation *> animations;
55};
56
57QT_END_NAMESPACE
58
59#endif //QANIMATIONGROUP_P_H
60

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