46void QAnimationGroupJob::appendAnimation(QAbstractAnimationJob *animation)
48 if (QAnimationGroupJob *oldGroup = animation->m_group)
49 oldGroup->removeAnimation(animation);
51 Q_ASSERT(!animation->isInList());
53 m_children.append(animation);
54 animation->m_group =
this;
55 animationInserted(animation);
58void QAnimationGroupJob::prependAnimation(QAbstractAnimationJob *animation)
60 if (QAnimationGroupJob *oldGroup = animation->m_group)
61 oldGroup->removeAnimation(animation);
63 Q_ASSERT(!animation->isInList());
65 m_children.prepend(animation);
66 animation->m_group =
this;
67 animationInserted(animation);
70void QAnimationGroupJob::removeAnimation(QAbstractAnimationJob *animation)
72 QAbstractAnimationJob *prev = m_children.prev(animation);
73 QAbstractAnimationJob *next = m_children.next(animation);
74 ungroupChild(animation);
75 animationRemoved(animation, prev, next);
88void QAnimationGroupJob::resetUncontrolledAnimationsFinishTime()
90 for (QAbstractAnimationJob *animation : m_children) {
91 if (animation->duration() == -1 || animation->loopCount() < 0) {
92 resetUncontrolledAnimationFinishTime(animation);
117void QAnimationGroupJob::debugChildren(QDebug d)
const
120 const QAnimationGroupJob *group =
this;
121 while ((group = group->m_group))
124 QByteArray ind(indentLevel,
' ');
125 for (
const QAbstractAnimationJob *child : m_children)
126 d <<
"\n" << ind.constData() << child;