45void QAnimationGroupJob::appendAnimation(QAbstractAnimationJob *animation)
47 if (QAnimationGroupJob *oldGroup = animation->m_group)
48 oldGroup->removeAnimation(animation);
50 Q_ASSERT(!animation->isInList());
52 m_children.append(animation);
53 animation->m_group =
this;
54 animationInserted(animation);
57void QAnimationGroupJob::prependAnimation(QAbstractAnimationJob *animation)
59 if (QAnimationGroupJob *oldGroup = animation->m_group)
60 oldGroup->removeAnimation(animation);
62 Q_ASSERT(!animation->isInList());
64 m_children.prepend(animation);
65 animation->m_group =
this;
66 animationInserted(animation);
69void QAnimationGroupJob::removeAnimation(QAbstractAnimationJob *animation)
71 QAbstractAnimationJob *prev = m_children.prev(animation);
72 QAbstractAnimationJob *next = m_children.next(animation);
73 ungroupChild(animation);
74 animationRemoved(animation, prev, next);
87void QAnimationGroupJob::resetUncontrolledAnimationsFinishTime()
89 for (QAbstractAnimationJob *animation : m_children) {
90 if (animation->duration() == -1 || animation->loopCount() < 0) {
91 resetUncontrolledAnimationFinishTime(animation);
116void QAnimationGroupJob::debugChildren(QDebug d)
const
119 const QAnimationGroupJob *group =
this;
120 while ((group = group->m_group))
123 QByteArray ind(indentLevel,
' ');
124 for (
const QAbstractAnimationJob *child : m_children)
125 d <<
"\n" << ind.constData() << child;