73 const int currentDuration = (*it)->totalDuration();
74 if (currentDuration == -1)
89 if (
d->animations.isEmpty())
92 if (
d->currentLoop >
d->lastLoop) {
102 }
else if (
d->currentLoop <
d->lastLoop) {
114#ifdef QANIMATION_DEBUG
115 qDebug(
"QParallellAnimationGroup %5d: setCurrentTime(%d), loop:%d, last:%d, timeFwd:%d, lastcurrent:%d, %d",
116 __LINE__,
d->currentTime,
d->currentLoop,
d->lastLoop, timeFwd,
d->lastCurrentTime,
state());
123 if (
d->currentLoop >
d->lastLoop
126 ||
d->shouldAnimationStart(
animation,
d->lastCurrentTime > dura )) {
136 d->lastLoop =
d->currentLoop;
153 d->disconnectUncontrolledAnimations();
162 d->connectUncontrolledAnimations();
182 int uncontrolledRunningCount = 0;
188 if (
it.value() == -1)
189 ++uncontrolledRunningCount;
193 if (uncontrolledRunningCount > 0)
198 maxDuration =
qMax(maxDuration, (*it)->totalDuration());
278 d->lastCurrentTime = 0;
281 d->lastLoop = (
d->loopCount == -1 ? 0 :
d->loopCount - 1);
297#include "moc_qparallelanimationgroup.cpp"
State state
state of the animation.
Direction direction
the direction of the animation when it is in \l Running state.
State
This enum describes the state of the animation.
void stop()
Stops the animation.
void start(QAbstractAnimation::DeletionPolicy policy=KeepWhenStopped)
Starts the animation.
int loopCount
the loop count of the animation
int totalDuration() const
Returns the total and effective duration of the animation, including the loop count.
void setDirection(Direction direction)
int currentTime
the current time and progress of the animation
void setCurrentTime(int msecs)
virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)
This virtual function is called by QAbstractAnimation when the state of the animation is changed from...
Direction
This enum describes the direction of the animation when in \l Running state.
void pause()
Pauses the animation.
QList< QAbstractAnimation * > animations
void disconnectUncontrolledAnimation(QAbstractAnimation *anim)
void connectUncontrolledAnimation(QAbstractAnimation *anim)
virtual void animationRemoved(qsizetype, QAbstractAnimation *)
bool event(QEvent *event) override
\reimp
bool remove(const Key &key)
Removes the item that has the key from the hash.
iterator begin()
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
const_iterator constEnd() const noexcept
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the ...
const_iterator constBegin() const noexcept
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
T value(const Key &key) const noexcept
iterator end() noexcept
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last ...
void clear() noexcept(std::is_nothrow_destructible< Node >::value)
Removes all items from the hash and frees up all memory used by it.
const_iterator constBegin() const noexcept
const_iterator constEnd() const noexcept
void applyGroupState(QAbstractAnimation *animation)
bool isUncontrolledAnimationFinished(QAbstractAnimation *anim) const
void _q_uncontrolledAnimationFinished()
void disconnectUncontrolledAnimations()
bool shouldAnimationStart(QAbstractAnimation *animation, bool startIfAtEnd) const
void animationRemoved(qsizetype index, QAbstractAnimation *) override
QHash< QAbstractAnimation *, int > uncontrolledFinishTime
void connectUncontrolledAnimations()
void updateDirection(QAbstractAnimation::Direction direction) override
\reimp
bool event(QEvent *event) override
\reimp
~QParallelAnimationGroup()
Destroys the animation group.
int duration() const override
\reimp
QParallelAnimationGroup(QObject *parent=nullptr)
Constructs a QParallelAnimationGroup.
void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) override
\reimp
void updateCurrentTime(int currentTime) override
\reimp
int duration
the duration of the animation
QSet< QString >::iterator it
void newState(QList< State > &states, const char *token, const char *lexem, bool pre)
Combined button and popup list for selecting options.
QList< QAbstractAnimation * >::ConstIterator AnimationListConstIt
constexpr const T & qMax(const T &a, const T &b)
GLdouble GLdouble GLdouble GLdouble q
QT_BEGIN_NAMESPACE typedef QList< QAbstractAnimation * >::ConstIterator AnimationListConstIt
QHash< QAbstractAnimation *, int >::ConstIterator AnimationTimeHashConstIt
QHash< QAbstractAnimation *, int >::Iterator AnimationTimeHashIt
static double currentTime()
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent