Add signals targetReached and animationStep
svn path=/trunk/KDE/kdelibs/; revision=1030619
This commit is contained in:
parent
7387d79cbd
commit
b8d35a709c
@ -243,6 +243,9 @@ void ItemBackgroundPrivate::animationUpdate(qreal progress)
|
||||
{
|
||||
if (progress == 1) {
|
||||
animId = 0;
|
||||
if ((!fading) || (fadeIn)) {
|
||||
emit q->targetReached(target);
|
||||
}
|
||||
}
|
||||
|
||||
if (fading) {
|
||||
@ -260,6 +263,7 @@ void ItemBackgroundPrivate::animationUpdate(qreal progress)
|
||||
}
|
||||
|
||||
q->update();
|
||||
emit q->animationStep(progress);
|
||||
}
|
||||
|
||||
void ItemBackgroundPrivate::targetDestroyed(QObject*)
|
||||
|
@ -68,6 +68,20 @@ Q_SIGNALS:
|
||||
*/
|
||||
void appearanceChanged();
|
||||
|
||||
|
||||
/**
|
||||
* Emitted at each animation frame. Useful for synchronizing item animations
|
||||
*/
|
||||
|
||||
void animationStep(qreal progress);
|
||||
|
||||
/**
|
||||
* Emitted when the target has been reached. Useful to consider this instead of
|
||||
* the corresponding hoverEnterEvent;
|
||||
*/
|
||||
|
||||
void targetReached(QGraphicsItem *);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @reimp from QGraphicsWidget
|
||||
|
Loading…
Reference in New Issue
Block a user