49#include <QtCore/qdebug.h>
50#include <QtCore/qcoreevent.h>
98 if (index < 0 || index >=
d->animations.size()) {
99 qWarning(
"QAnimationGroup::animationAt: index is out of bounds");
103 return d->animations.at(
index);
115 return d->animations.size();
157 if (index < 0 || index >
d->animations.size()) {
158 qWarning(
"QAnimationGroup::insertAnimation: index is out of bounds");
172 d->animationInsertedAt(
index);
186 qWarning(
"QAnimationGroup::remove: cannot remove null animation");
191 qWarning(
"QAnimationGroup::remove: animation is not part of this group");
208 if (index < 0 || index >=
d->animations.size()) {
209 qWarning(
"QAnimationGroup::takeAnimation: no animation at index %d",
index);
216 d->animations.removeAt(
index);
243 if (
a->group() !=
this)
252 = std::find(
d->animations.cbegin(),
d->animations.cend(),
childEvent->child());
253 if (
it !=
d->animations.
cend())
261 const QList<QAbstractAnimation *> animationsCopy =
animations;
264 for (
qsizetype i = animationsCopy.size() - 1;
i >= 0; --
i) {
290#include "moc_qanimationgroup.cpp"
static QAbstractAnimationPrivate * get(QAbstractAnimation *q)
bool event(QEvent *event) override
\reimp
QAnimationGroup * group() const
If this animation is part of a QAnimationGroup, this function returns a pointer to the group; otherwi...
QList< QAbstractAnimation * > animations
void clear(bool onDestruction)
virtual void animationRemoved(qsizetype, QAbstractAnimation *)
void addAnimation(QAbstractAnimation *animation)
Adds animation to this group.
QAnimationGroup(QObject *parent=nullptr)
Constructs a QAnimationGroup.
void clear()
Removes and deletes all animations in this animation group, and resets the current time to 0.
void insertAnimation(int index, QAbstractAnimation *animation)
Inserts animation into this animation group at index.
QAbstractAnimation * takeAnimation(int index)
Returns the animation at index and removes it from the animation group.
~QAnimationGroup()
Destroys the animation group.
QAbstractAnimation * animationAt(int index) const
Returns a pointer to the animation at index in this group.
int indexOfAnimation(QAbstractAnimation *animation) const
Returns the index of animation.
int animationCount() const
Returns the number of animations managed by this group.
void removeAnimation(QAbstractAnimation *animation)
Removes animation from this group.
bool event(QEvent *event) override
\reimp
bool isEmpty() const noexcept
virtual void childEvent(QChildEvent *event)
This event handler can be reimplemented in a subclass to receive child events.
void setParent(QObject *parent)
Makes the object a child of parent.
const_iterator cend() const noexcept
const_iterator cbegin() const noexcept
QSet< QString >::iterator it
Combined button and popup list for selecting options.
constexpr const T & qMin(const T &a, const T &b)
GLboolean GLboolean GLboolean GLboolean a
[7]
GLdouble GLdouble GLdouble GLdouble q
static double currentTime()