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 QPARALLELANIMATIONGROUP_P_H
5#define QPARALLELANIMATIONGROUP_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "qparallelanimationgroup.h"
19#include "private/qanimationgroup_p.h"
20#include <QtCore/qhash.h>
21
22QT_REQUIRE_CONFIG(animation);
23
24QT_BEGIN_NAMESPACE
25
26class QParallelAnimationGroupPrivate : public QAnimationGroupPrivate
27{
28 Q_DECLARE_PUBLIC(QParallelAnimationGroup)
29public:
30 QParallelAnimationGroupPrivate()
31 : lastLoop(0), lastCurrentTime(0)
32 {
33 }
34
35 QHash<QAbstractAnimation*, int> uncontrolledFinishTime;
36 int lastLoop;
37 int lastCurrentTime;
38
39 bool shouldAnimationStart(QAbstractAnimation *animation, bool startIfAtEnd) const;
40 void applyGroupState(QAbstractAnimation *animation);
41 bool isUncontrolledAnimationFinished(QAbstractAnimation *anim) const;
42 void connectUncontrolledAnimations();
43 void disconnectUncontrolledAnimations();
44
45 void animationRemoved(qsizetype index, QAbstractAnimation *) override;
46
47 // private slot
48 void _q_uncontrolledAnimationFinished();
49};
50
51QT_END_NAMESPACE
52
53#endif //QPARALLELANIMATIONGROUP_P_H
54

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