Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qanimationgroupjob.cpp
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
4#include "private/qanimationgroupjob_p.h"
5
7
9{
10 m_isGroup = true;
11}
12
14{
16 Q_ASSERT(animation->m_group == this);
18 animation->m_group = nullptr;
19}
20
22{
24 if (m_children.isEmpty()) {
25 m_currentTime = 0;
26 stop();
27 }
28}
29
31{
35 delete animation;
36 }
37}
38
40{
42 animation->fireTopLevelAnimationLoopChanged();
43}
44
46{
47 if (QAnimationGroupJob *oldGroup = animation->m_group)
48 oldGroup->removeAnimation(animation);
49
50 Q_ASSERT(!animation->isInList());
51
53 animation->m_group = this;
55}
56
58{
59 if (QAnimationGroupJob *oldGroup = animation->m_group)
60 oldGroup->removeAnimation(animation);
61
62 Q_ASSERT(!animation->isInList());
63
65 animation->m_group = this;
67}
68
70{
75}
76
78{
81 delete child;
82 }
83
85}
86
88{
90 if (animation->duration() == -1 || animation->loopCount() < 0) {
92 }
93 }
94}
95
97{
99}
100
102{
104}
105
107{
109}
110
112{
114}
115
117{
118 int indentLevel = 1;
119 const QAnimationGroupJob *group = this;
120 while ((group = group->m_group))
121 ++indentLevel;
122
123 QByteArray ind(indentLevel, ' ');
125 d << "\n" << ind.constData() << child;
126}
127
int loopCount
the loop count of the animation
void prependAnimation(QAbstractAnimationJob *animation)
void topLevelAnimationLoopChanged() override
void appendAnimation(QAbstractAnimationJob *animation)
virtual void animationInserted(QAbstractAnimationJob *)
virtual void uncontrolledAnimationFinished(QAbstractAnimationJob *animation)
virtual void animationRemoved(QAbstractAnimationJob *, QAbstractAnimationJob *, QAbstractAnimationJob *)
void resetUncontrolledAnimationFinishTime(QAbstractAnimationJob *anim)
void resetUncontrolledAnimationsFinishTime()
void removeAnimation(QAbstractAnimationJob *animation)
void debugChildren(QDebug d) const
void handleAnimationRemoved(QAbstractAnimationJob *animation)
void ungroupChild(QAbstractAnimationJob *animation)
void setUncontrolledAnimationFinishTime(QAbstractAnimationJob *anim, int time)
\inmodule QtCore
Definition qbytearray.h:57
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
Definition qbytearray.h:122
\inmodule QtCore
const N * next(const N *current) const
const N * prev(const N *current) const
const N * first() const
int duration
the duration of the animation
short next
Definition keywords.cpp:445
Combined button and popup list for selecting options.
GLboolean GLuint group
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
#define Q_UNUSED(x)
QPropertyAnimation animation
[0]
QLayoutItem * child
[0]