@ -1534,6 +1534,7 @@ public:
return m_target ;
}
inline void setTarget ( const T target ) {
m_start = m_value ;
m_target = target ;
}
inline T velocity ( ) const {
@ -1555,6 +1556,9 @@ public:
inline void setSmoothness ( const double smoothness ) {
m_smoothness = smoothness ;
}
inline T startValue ( ) {
return m_start ;
}
/**
* The distance between the current position and the target .
@ -1576,7 +1580,7 @@ public:
private :
T m_value ;
T m_start ;
T m_target ;
T m_velocity ;
double m_strength ;
@ -1753,6 +1757,13 @@ public:
inline bool areWindowsMoving ( ) {
return ! m_movingWindowsSet . isEmpty ( ) ;
}
/**
* Returns whether a window has reached its targets yet
* or not .
*/
inline bool isWindowMoving ( EffectWindow * w ) {
return m_movingWindowsSet . contains ( w ) ;
}
private :
bool m_useGlobalAnimationModifier ;
@ -2067,6 +2078,7 @@ double WindowQuad::originalBottom() const
template < typename T >
Motion < T > : : Motion ( T initial , double strength , double smoothness )
: m_value ( initial )
, m_start ( initial )
, m_target ( initial )
, m_velocity ( )
, m_strength ( strength )
@ -2077,6 +2089,7 @@ Motion<T>::Motion(T initial, double strength, double smoothness)
template < typename T >
Motion < T > : : Motion ( const Motion & other )
: m_value ( other . value ( ) )
, m_start ( other . target ( ) )
, m_target ( other . target ( ) )
, m_velocity ( other . velocity ( ) )
, m_strength ( other . strength ( ) )