89 #include <QtCore/qdebug.h> 90 #include <QtCore/qcoreevent.h> 93 #ifndef QT_NO_ANIMATION 133 if (index < 0 || index >=
d->animations.size()) {
134 qWarning(
"QAnimationGroup::animationAt: index is out of bounds");
138 return d->animations.at(index);
150 return d->animations.size();
162 return d->animations.indexOf(animation);
192 if (index < 0 || index >
d->animations.size()) {
193 qWarning(
"QAnimationGroup::insertAnimation: index is out of bounds");
198 oldGroup->removeAnimation(animation);
200 d->animations.insert(index, animation);
204 d->animationInsertedAt(index);
218 qWarning(
"QAnimationGroup::remove: cannot remove null animation");
221 int index =
d->animations.indexOf(animation);
223 qWarning(
"QAnimationGroup::remove: animation is not part of this group");
240 if (index < 0 || index >=
d->animations.size()) {
241 qWarning(
"QAnimationGroup::takeAnimation: no animation at index %d", index);
248 d->animations.removeAt(index);
250 d->animationRemoved(index, animation);
275 if (
a->group() !=
this)
283 int index =
d->animations.indexOf(a);
295 if (animations.isEmpty()) {
303 #include "moc_qanimationgroup.cpp" 305 #endif //QT_NO_ANIMATION
QAbstractAnimation * animationAt(int index) const
Returns a pointer to the animation at index in this group.
#define QT_END_NAMESPACE
This macro expands to.
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.
int animationCount() const
Returns the number of animations managed by this group.
static QAbstractAnimationPrivate * get(QAbstractAnimation *q)
long ASN1_INTEGER_get ASN1_INTEGER * a
The QObject class is the base class of all Qt objects.
void setParent(QObject *)
Makes the object a child of parent.
QAnimationGroup * group() const
If this animation is part of a QAnimationGroup, this function returns a pointer to the group; otherwi...
#define QT_BEGIN_NAMESPACE
This macro expands to.
void clear()
Removes and deletes all animations in this animation group, and resets the current time to 0...
void addAnimation(QAbstractAnimation *animation)
Adds animation to this group.
virtual void childEvent(QChildEvent *)
This event handler can be reimplemented in a subclass to receive child events.
Q_CORE_EXPORT void qWarning(const char *,...)
void removeAnimation(QAbstractAnimation *animation)
Removes animation from this group.
The QAbstractAnimation class is the base of all animations.
~QAnimationGroup()
Destroys the animation group.
bool event(QEvent *event)
Reimplemented Function
The QChildEvent class contains event parameters for child object events.
virtual void animationRemoved(int, QAbstractAnimation *)
QObject * parent() const
Returns a pointer to the parent object.
QAnimationGroup(QObject *parent=0)
Constructs a QAnimationGroup.
bool event(QEvent *event)
Reimplemented Function
int indexOfAnimation(QAbstractAnimation *animation) const
Returns the index of animation.
The QAnimationGroup class is an abstract base class for groups of animations.
The QEvent class is the base class of all event classes.
Type type() const
Returns the event type.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Q_OUTOFLINE_TEMPLATE void qDeleteAll(ForwardIterator begin, ForwardIterator end)
QObject * child() const
Returns the child object that was added or removed.