mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 07:49:42 +01:00
* Set empty-tooltips for Artist-,Album- and TrackInfoWidgets.
This commit is contained in:
parent
707c2a93d0
commit
393d3370d3
@ -237,7 +237,8 @@ TreeModel::addTracks( const album_ptr& album, const QModelIndex& parent, bool au
|
||||
connect( album.data(), SIGNAL( tracksAdded( QList<Tomahawk::query_ptr>, Tomahawk::ModelMode, Tomahawk::collection_ptr ) ),
|
||||
SLOT( onTracksFound( QList<Tomahawk::query_ptr>, Tomahawk::ModelMode, Tomahawk::collection_ptr ) ) );
|
||||
|
||||
onTracksAdded( album->tracks( m_mode, m_collection ), parent );
|
||||
if ( !album->tracks( m_mode, m_collection ).isEmpty() )
|
||||
onTracksAdded( album->tracks( m_mode, m_collection ), parent );
|
||||
}
|
||||
|
||||
|
||||
|
@ -49,11 +49,13 @@ AlbumInfoWidget::AlbumInfoWidget( const Tomahawk::album_ptr& album, QWidget* par
|
||||
|
||||
m_albumsModel = new PlayableModel( ui->albumsView );
|
||||
ui->albumsView->setPlayableModel( m_albumsModel );
|
||||
ui->albumsView->setEmptyTip( tr( "Sorry, we could not find any other albums for this artist!" ) );
|
||||
|
||||
m_tracksModel = new TreeModel( ui->tracksView );
|
||||
m_tracksModel->setMode( Mixed );
|
||||
ui->tracksView->setTreeModel( m_tracksModel );
|
||||
ui->tracksView->setRootIsDecorated( false );
|
||||
ui->tracksView->setEmptyTip( tr( "Sorry, we could not find any tracks for this album!" ) );
|
||||
|
||||
m_pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultAlbumCover, TomahawkUtils::ScaledCover, QSize( 48, 48 ) );
|
||||
|
||||
@ -154,7 +156,8 @@ AlbumInfoWidget::loadAlbums( bool autoRefetch )
|
||||
connect( m_album->artist().data(), SIGNAL( albumsAdded( QList<Tomahawk::album_ptr>, Tomahawk::ModelMode ) ),
|
||||
SLOT( gotAlbums( QList<Tomahawk::album_ptr> ) ) );
|
||||
|
||||
gotAlbums( m_album->artist()->albums( Mixed ) );
|
||||
if ( !m_album->artist()->albums( Mixed ).isEmpty() )
|
||||
gotAlbums( m_album->artist()->albums( Mixed ) );
|
||||
|
||||
/* tDebug() << "Auto refetching";
|
||||
m_buttonAlbums->setChecked( false );
|
||||
|
@ -58,15 +58,18 @@ ArtistInfoWidget::ArtistInfoWidget( const Tomahawk::artist_ptr& artist, QWidget*
|
||||
|
||||
m_albumsModel = new PlayableModel( ui->albums );
|
||||
ui->albums->setPlayableModel( m_albumsModel );
|
||||
ui->topHits->setEmptyTip( tr( "Sorry, we could not find any albums for this artist!" ) );
|
||||
|
||||
m_relatedModel = new PlayableModel( ui->relatedArtists );
|
||||
ui->relatedArtists->setPlayableModel( m_relatedModel );
|
||||
ui->relatedArtists->proxyModel()->sort( -1 );
|
||||
ui->topHits->setEmptyTip( tr( "Sorry, we could not find any related artists!" ) );
|
||||
|
||||
m_topHitsModel = new PlaylistModel( ui->topHits );
|
||||
m_topHitsModel->setStyle( PlayableModel::Short );
|
||||
ui->topHits->setPlayableModel( m_topHitsModel );
|
||||
ui->topHits->setSortingEnabled( false );
|
||||
ui->topHits->setEmptyTip( tr( "Sorry, we could not find any top hits for this artist!" ) );
|
||||
|
||||
m_pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultArtistImage, TomahawkUtils::ScaledCover, QSize( 48, 48 ) );
|
||||
|
||||
@ -161,9 +164,15 @@ ArtistInfoWidget::load( const artist_ptr& artist )
|
||||
connect( m_artist.data(), SIGNAL( tracksAdded( QList<Tomahawk::query_ptr>, Tomahawk::ModelMode, Tomahawk::collection_ptr ) ),
|
||||
SLOT( onTracksFound( QList<Tomahawk::query_ptr>, Tomahawk::ModelMode ) ) );
|
||||
|
||||
onAlbumsFound( artist->albums( Mixed ), Mixed );
|
||||
onTracksFound( m_artist->tracks(), Mixed );
|
||||
onSimilarArtistsLoaded();
|
||||
if ( !m_artist->albums( Mixed ).isEmpty() )
|
||||
onAlbumsFound( m_artist->albums( Mixed ), Mixed );
|
||||
|
||||
if ( !m_artist->tracks().isEmpty() )
|
||||
onTracksFound( m_artist->tracks(), Mixed );
|
||||
|
||||
if ( !m_artist->similarArtists().isEmpty() )
|
||||
onSimilarArtistsLoaded();
|
||||
|
||||
onArtistImageUpdated();
|
||||
|
||||
Tomahawk::InfoSystem::InfoStringHash artistInfo;
|
||||
|
Loading…
x
Reference in New Issue
Block a user