mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-21 00:09:47 +01:00
* ArtistView now uses LoadingSpinner and new OverlayWidget.
This commit is contained in:
parent
3e8d131c16
commit
2860bfc704
@ -51,8 +51,7 @@ ArtistView::ArtistView( QWidget* parent )
|
||||
, m_overlay( new OverlayWidget( this ) )
|
||||
, m_model( 0 )
|
||||
, m_proxyModel( 0 )
|
||||
// , m_delegate( 0 )
|
||||
, m_loadingSpinner( new AnimatedSpinner( this ) )
|
||||
, m_loadingSpinner( new LoadingSpinner( this ) )
|
||||
, m_updateContextView( true )
|
||||
, m_contextMenu( new ContextMenu( this ) )
|
||||
, m_showModes( true )
|
||||
@ -137,8 +136,6 @@ ArtistView::setTreeModel( TreeModel* model )
|
||||
m_proxyModel->sort( 0 );
|
||||
}
|
||||
|
||||
connect( m_model, SIGNAL( loadingStarted() ), m_loadingSpinner, SLOT( fadeIn() ) );
|
||||
connect( m_model, SIGNAL( loadingFinished() ), m_loadingSpinner, SLOT( fadeOut() ) );
|
||||
connect( m_proxyModel, SIGNAL( filteringStarted() ), SLOT( onFilteringStarted() ) );
|
||||
connect( m_proxyModel, SIGNAL( filteringFinished() ), m_loadingSpinner, SLOT( fadeOut() ) );
|
||||
|
||||
@ -148,7 +145,7 @@ ArtistView::setTreeModel( TreeModel* model )
|
||||
|
||||
guid(); // this will set the guid on the header
|
||||
|
||||
if ( model->columnStyle() == TreeModel::TrackOnly )
|
||||
if ( model->style() == PlayableModel::Large )
|
||||
{
|
||||
setHeaderHidden( true );
|
||||
setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
|
||||
@ -158,6 +155,8 @@ ArtistView::setTreeModel( TreeModel* model )
|
||||
setHeaderHidden( false );
|
||||
setHorizontalScrollBarPolicy( Qt::ScrollBarAsNeeded );
|
||||
}
|
||||
|
||||
emit modelChanged();
|
||||
}
|
||||
|
||||
|
||||
|
@ -83,6 +83,9 @@ public:
|
||||
public slots:
|
||||
void onItemActivated( const QModelIndex& index );
|
||||
|
||||
signals:
|
||||
void modelChanged();
|
||||
|
||||
protected:
|
||||
virtual void startDrag( Qt::DropActions supportedActions );
|
||||
virtual void resizeEvent( QResizeEvent* event );
|
||||
@ -107,7 +110,6 @@ private:
|
||||
OverlayWidget* m_overlay;
|
||||
TreeModel* m_model;
|
||||
TreeProxyModel* m_proxyModel;
|
||||
// PlaylistItemDelegate* m_delegate;
|
||||
AnimatedSpinner* m_loadingSpinner;
|
||||
|
||||
bool m_updateContextView;
|
||||
|
Loading…
x
Reference in New Issue
Block a user