1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 11:20:22 +02:00

* TrackView now uses LoadingSpinner and new OverlayWidget.

This commit is contained in:
Christian Muehlhaeuser
2012-05-31 21:34:19 +02:00
parent 2860bfc704
commit 172a4a8d77
2 changed files with 4 additions and 4 deletions

View File

@@ -52,7 +52,7 @@ TrackView::TrackView( QWidget* parent )
, m_delegate( 0 ) , m_delegate( 0 )
, m_header( new TrackHeader( this ) ) , m_header( new TrackHeader( this ) )
, m_overlay( new OverlayWidget( this ) ) , m_overlay( new OverlayWidget( this ) )
, m_loadingSpinner( new AnimatedSpinner( this ) ) , m_loadingSpinner( new LoadingSpinner( this ) )
, m_resizing( false ) , m_resizing( false )
, m_dragging( false ) , m_dragging( false )
, m_updateContextView( true ) , m_updateContextView( true )
@@ -147,9 +147,6 @@ TrackView::setPlayableModel( PlayableModel* model )
m_proxyModel->setSourcePlayableModel( m_model ); m_proxyModel->setSourcePlayableModel( m_model );
} }
connect( m_model, SIGNAL( loadingStarted() ), m_loadingSpinner, SLOT( fadeIn() ) );
connect( m_model, SIGNAL( loadingFinished() ), m_loadingSpinner, SLOT( fadeOut() ) );
connect( m_proxyModel, SIGNAL( filterChanged( QString ) ), SLOT( onFilterChanged( QString ) ) ); connect( m_proxyModel, SIGNAL( filterChanged( QString ) ), SLOT( onFilterChanged( QString ) ) );
connect( m_proxyModel, SIGNAL( rowsInserted( QModelIndex, int, int ) ), SLOT( onViewChanged() ) ); connect( m_proxyModel, SIGNAL( rowsInserted( QModelIndex, int, int ) ), SLOT( onViewChanged() ) );
@@ -168,6 +165,8 @@ TrackView::setPlayableModel( PlayableModel* model )
setHeaderHidden( false ); setHeaderHidden( false );
setHorizontalScrollBarPolicy( Qt::ScrollBarAsNeeded ); setHorizontalScrollBarPolicy( Qt::ScrollBarAsNeeded );
} }
emit modelChanged();
} }

View File

@@ -80,6 +80,7 @@ public slots:
signals: signals:
void itemActivated( const QModelIndex& index ); void itemActivated( const QModelIndex& index );
void modelChanged();
protected: protected:
virtual void resizeEvent( QResizeEvent* event ); virtual void resizeEvent( QResizeEvent* event );