Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qanimationgroupjob_p.h
Go to the documentation of this file.
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
4
5#ifndef QANIMATIONGROUPJOB_P_H
6#define QANIMATIONGROUPJOB_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 <QtQml/private/qabstractanimationjob_p.h>
20#include <QtQml/private/qdoubleendedlist_p.h>
21#include <QtCore/qdebug.h>
22
24
26
27class Q_QML_EXPORT QAnimationGroupJob : public QAbstractAnimationJob
28{
29 Q_DISABLE_COPY(QAnimationGroupJob)
30public:
31 using Children = QDoubleEndedList<QAbstractAnimationJob>;
32
33 QAnimationGroupJob();
34 ~QAnimationGroupJob() override;
35
36 void appendAnimation(QAbstractAnimationJob *animation);
37 void prependAnimation(QAbstractAnimationJob *animation);
38 void removeAnimation(QAbstractAnimationJob *animation);
39
40 Children *children() { return &m_children; }
41 const Children *children() const { return &m_children; }
42
43 virtual void clear();
44
45 //called by QAbstractAnimationJob
46 virtual void uncontrolledAnimationFinished(QAbstractAnimationJob *animation);
47protected:
48 void topLevelAnimationLoopChanged() override;
49
50 virtual void animationInserted(QAbstractAnimationJob*) { }
51 virtual void animationRemoved(QAbstractAnimationJob*, QAbstractAnimationJob*, QAbstractAnimationJob*);
52
53 //TODO: confirm location of these (should any be moved into QAbstractAnimationJob?)
54 void resetUncontrolledAnimationsFinishTime();
55 void resetUncontrolledAnimationFinishTime(QAbstractAnimationJob *anim);
56 int uncontrolledAnimationFinishTime(const QAbstractAnimationJob *anim) const
57 {
58 return anim->m_uncontrolledFinishTime;
59 }
60 void setUncontrolledAnimationFinishTime(QAbstractAnimationJob *anim, int time);
61
62 void debugChildren(QDebug d) const;
63
64 void ungroupChild(QAbstractAnimationJob *animation);
65 void handleAnimationRemoved(QAbstractAnimationJob *animation);
66
67 Children m_children;
68};
69
70QT_END_NAMESPACE
71
72#endif //QANIMATIONGROUPJOB_P_H
QT_REQUIRE_CONFIG(qml_animation)