ReAdded the isAnimating() function to Phase.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=797010
This commit is contained in:
parent
d5dd4e16ac
commit
54a3279aa7
@ -480,6 +480,14 @@ QPixmap Phase::animationResult(AnimId id)
|
||||
return state->pixmap;
|
||||
}
|
||||
|
||||
bool Phase::isAnimating() const
|
||||
{
|
||||
return (!d->animatedItems.isEmpty() ||
|
||||
!d->movingItems.isEmpty() ||
|
||||
!d->animatedElements.isEmpty() ||
|
||||
!d->customAnims.isEmpty());
|
||||
}
|
||||
|
||||
void Phase::timerEvent(QTimerEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
|
8
phase.h
8
phase.h
@ -116,6 +116,14 @@ public:
|
||||
Q_INVOKABLE void setAnimationPixmap(AnimId id, const QPixmap &pixmap);
|
||||
Q_INVOKABLE QPixmap animationResult(AnimId id);
|
||||
|
||||
/**
|
||||
* Can be used to query if there are other animations happening. This way
|
||||
* heavy operations can be delayed until all animations are finished.
|
||||
* @return true if there are animations going on.
|
||||
* @since 4.1
|
||||
*/
|
||||
Q_INVOKABLE bool isAnimating() const;
|
||||
|
||||
Q_SIGNALS:
|
||||
void animationComplete(QGraphicsItem *item, Plasma::Phase::Animation anim);
|
||||
void movementComplete(QGraphicsItem *item);
|
||||
|
Loading…
x
Reference in New Issue
Block a user