removed all connections to QPropertyAnimation::valueChanged() and call relevant update in the 'setValue' method directly, instead

svn path=/trunk/KDE/kdebase/workspace/; revision=1168989
This commit is contained in:
Hugo Pereira Da Costa 2010-08-28 02:52:26 +00:00
parent 393e2b86bc
commit 18042bba95
8 changed files with 22 additions and 17 deletions

View file

@ -72,7 +72,6 @@ namespace Oxygen
glowAnimation().data()->setEasingCurve( QEasingCurve::InOutQuad );
// setup connections
connect( glowAnimation().data(), SIGNAL( valueChanged( const QVariant& ) ), SLOT( update( void ) ) );
reset(0);
}

View file

@ -86,7 +86,11 @@ namespace Oxygen
{ return glowAnimation_; }
void setGlowIntensity( qreal value )
{ glowIntensity_ = value; }
{
if( glowIntensity_ == value ) return;
glowIntensity_ = value;
update();
}
qreal glowIntensity( void ) const
{ return glowIntensity_; }

View file

@ -116,8 +116,6 @@ namespace Oxygen
glowAnimation().data()->setTargetObject( this );
glowAnimation().data()->setPropertyName( "glowIntensity" );
glowAnimation().data()->setEasingCurve( QEasingCurve::InOutQuad );
connect( glowAnimation().data(), SIGNAL( valueChanged( const QVariant& ) ), widget(), SLOT( update( void ) ) );
connect( glowAnimation().data(), SIGNAL( finished( void ) ), this, SLOT( clearForceActive( void ) ) );

View file

@ -51,7 +51,6 @@ namespace Oxygen
Q_OBJECT
//! declare glow intensity property
//!Q_PROPERTY( qreal glowIntensity READ glowIntensity WRITE setGlowIntensity )
Q_PROPERTY( qreal glowIntensity READ glowIntensityUnbiased WRITE setGlowIntensity )
public:
@ -123,7 +122,11 @@ namespace Oxygen
{ return glowAnimation_; }
void setGlowIntensity( qreal value )
{ glowIntensity_ = value; }
{
if( glowIntensity_ == value ) return;
glowIntensity_ = value;
widget()->update();
}
//! unbiased glow intensity
qreal glowIntensityUnbiased( void ) const

View file

@ -53,9 +53,6 @@ namespace Oxygen
animation().data()->setTargetObject( this );
animation().data()->setPropertyName( "progress" );
// setup connections
connect( animation().data(), SIGNAL( valueChanged( const QVariant& ) ), SLOT( updateBoundingRects( void ) ) );
}
//________________________________________________________________

View file

@ -168,14 +168,18 @@ namespace Oxygen
{ return animation_; }
void setProgress( qreal value )
{ progress_ = value; }
{
if( progress_ == value ) return;
progress_ = value;
updateBoundingRects();
}
qreal progress( void ) const
{ return progress_; }
//@}
protected slots:
protected:
//! update bounding rects
void updateBoundingRects( bool alsoUpdate = true );

View file

@ -53,8 +53,6 @@ namespace Oxygen
animation().data()->setTargetObject( this );
animation().data()->setPropertyName( "opacity" );
animation().data()->setEasingCurve( QEasingCurve::InOutQuad );
connect( animation().data(), SIGNAL( valueChanged( const QVariant& ) ), SLOT( updatePixmaps( void ) ) );
connect( animation().data(), SIGNAL( finished( void ) ), SLOT( updatePixmaps( void ) ) );
}

View file

@ -134,7 +134,11 @@ namespace Oxygen
{ return opacity_; }
void setOpacity( qreal value )
{ opacity_ = value; }
{
if( opacity_ == value ) return;
opacity_ = value;
updatePixmaps();
}
//@}
@ -154,13 +158,11 @@ namespace Oxygen
void pixmapsChanged( void );
protected slots:
protected:
//! update pixmaps
virtual void updatePixmaps( void );
protected:
//! timer event
void timerEvent( QTimerEvent* );