diff --git a/clients/oxygen/oxygenbutton.cpp b/clients/oxygen/oxygenbutton.cpp index 4c0a4bb324..0032fa531e 100644 --- a/clients/oxygen/oxygenbutton.cpp +++ b/clients/oxygen/oxygenbutton.cpp @@ -65,11 +65,11 @@ namespace Oxygen setToolTip(tip); // setup animation - glowAnimation().data()->setStartValue( 0 ); - glowAnimation().data()->setEndValue( 1.0 ); - glowAnimation().data()->setTargetObject( this ); - glowAnimation().data()->setPropertyName( "glowIntensity" ); - glowAnimation().data()->setEasingCurve( QEasingCurve::InOutQuad ); + glowAnimation()->setStartValue( 0 ); + glowAnimation()->setEndValue( 1.0 ); + glowAnimation()->setTargetObject( this ); + glowAnimation()->setPropertyName( "glowIntensity" ); + glowAnimation()->setEasingCurve( QEasingCurve::InOutQuad ); // setup connections reset(0); @@ -107,7 +107,7 @@ namespace Oxygen //___________________________________________________ void Button::reset( unsigned long ) - { glowAnimation().data()->setDuration( client_.configuration().animationsDuration() ); } + { glowAnimation()->setDuration( client_.configuration().animationsDuration() ); } //___________________________________________________ @@ -119,8 +119,8 @@ namespace Oxygen if( animateButtonHover() ) { - glowAnimation().data()->setDirection( Animation::Forward ); - if( !isAnimated() ) glowAnimation().data()->start(); + glowAnimation()->setDirection( Animation::Forward ); + if( !isAnimated() ) glowAnimation()->start(); } else update(); @@ -134,8 +134,8 @@ namespace Oxygen if( status_ == Oxygen::Hovered && animateButtonHover() ) { - glowAnimation().data()->setDirection( Animation::Backward ); - if( !isAnimated() ) glowAnimation().data()->start(); + glowAnimation()->setDirection( Animation::Backward ); + if( !isAnimated() ) glowAnimation()->start(); } status_ = Oxygen::Normal; diff --git a/clients/oxygen/oxygenbutton.h b/clients/oxygen/oxygenbutton.h index 236e692c89..381cecb2c2 100644 --- a/clients/oxygen/oxygenbutton.h +++ b/clients/oxygen/oxygenbutton.h @@ -80,11 +80,6 @@ namespace Oxygen //!@name glow animation //@{ - - //! return animation object - virtual const Animation::Pointer& glowAnimation() const - { return glowAnimation_; } - void setGlowIntensity( qreal value ) { if( glowIntensity_ == value ) return; @@ -99,6 +94,15 @@ namespace Oxygen protected: + //!@name glow animation + //@{ + + //! return animation object + Animation* glowAnimation() const + { return glowAnimation_; } + + //@} + //! press event void mousePressEvent(QMouseEvent* ); @@ -130,7 +134,7 @@ namespace Oxygen //! true if animation is in progress bool isAnimated( void ) const - { return glowAnimation().data()->isRunning(); } + { return glowAnimation()->isRunning(); } //! true if button is active bool isActive( void ) const; @@ -177,7 +181,8 @@ namespace Oxygen bool forceInactive_; //! glow animation - Animation::Pointer glowAnimation_; + //Animation::Pointer glowAnimation_; + Animation* glowAnimation_; //! glow intensity qreal glowIntensity_;