mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-21 13:21:52 +02:00
* Style cleanup for AnimationHelper.
This commit is contained in:
@@ -36,12 +36,16 @@ AnimationHelper::AnimationHelper( const QModelIndex& index, QObject *parent )
|
||||
connect( &m_collapseTimer, SIGNAL( timeout() ), SLOT(collapseTimeout() ) );
|
||||
}
|
||||
|
||||
bool AnimationHelper::initialized() const
|
||||
|
||||
bool
|
||||
AnimationHelper::initialized() const
|
||||
{
|
||||
return m_expandAnimation != 0;
|
||||
}
|
||||
|
||||
void AnimationHelper::initialize( const QSize& startValue, const QSize& endValue, int duration )
|
||||
|
||||
void
|
||||
AnimationHelper::initialize( const QSize& startValue, const QSize& endValue, int duration )
|
||||
{
|
||||
m_size = startValue;
|
||||
m_targetSize = endValue;
|
||||
@@ -64,20 +68,26 @@ void AnimationHelper::initialize( const QSize& startValue, const QSize& endValue
|
||||
|
||||
}
|
||||
|
||||
void AnimationHelper::setSize( const QSize& size )
|
||||
|
||||
void
|
||||
AnimationHelper::setSize( const QSize& size )
|
||||
{
|
||||
m_size = size;
|
||||
emit sizeChanged();
|
||||
//qDebug() << "animaton setting size to" << size;
|
||||
}
|
||||
|
||||
void AnimationHelper::expand()
|
||||
|
||||
void
|
||||
AnimationHelper::expand()
|
||||
{
|
||||
m_collapseTimer.stop();
|
||||
m_expandTimer.start();
|
||||
}
|
||||
|
||||
void AnimationHelper::collapse( bool immediately )
|
||||
|
||||
void
|
||||
AnimationHelper::collapse( bool immediately )
|
||||
{
|
||||
if ( m_expandTimer.isActive() )
|
||||
{
|
||||
@@ -95,7 +105,9 @@ void AnimationHelper::collapse( bool immediately )
|
||||
m_collapseTimer.start();
|
||||
}
|
||||
|
||||
bool AnimationHelper::partlyExpanded()
|
||||
|
||||
bool
|
||||
AnimationHelper::partlyExpanded()
|
||||
{
|
||||
return m_size != m_startSize;
|
||||
// return m_fullyExpanded
|
||||
@@ -103,28 +115,38 @@ bool AnimationHelper::partlyExpanded()
|
||||
// || ( m_collapseAnimation->state() == QPropertyAnimation::Running && m_collapseAnimation->currentTime() < 100 );
|
||||
}
|
||||
|
||||
bool AnimationHelper::fullyExpanded()
|
||||
|
||||
bool
|
||||
AnimationHelper::fullyExpanded()
|
||||
{
|
||||
return m_fullyExpanded;
|
||||
}
|
||||
|
||||
void AnimationHelper::expandTimeout()
|
||||
|
||||
void
|
||||
AnimationHelper::expandTimeout()
|
||||
{
|
||||
m_expandAnimation->start();
|
||||
}
|
||||
|
||||
void AnimationHelper::collapseTimeout()
|
||||
|
||||
void
|
||||
AnimationHelper::collapseTimeout()
|
||||
{
|
||||
m_fullyExpanded = false;
|
||||
m_collapseAnimation->start();
|
||||
}
|
||||
|
||||
void AnimationHelper::expandAnimationFinished()
|
||||
|
||||
void
|
||||
AnimationHelper::expandAnimationFinished()
|
||||
{
|
||||
m_fullyExpanded = true;
|
||||
}
|
||||
|
||||
void AnimationHelper::collapseAnimationFinished()
|
||||
|
||||
void
|
||||
AnimationHelper::collapseAnimationFinished()
|
||||
{
|
||||
emit finished( m_index );
|
||||
}
|
||||
|
Reference in New Issue
Block a user