mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
* Set empty-tooltips for Artist-,Album- and TrackInfoWidgets.
This commit is contained in:
@@ -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 ) ),
|
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 ) ) );
|
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 );
|
m_albumsModel = new PlayableModel( ui->albumsView );
|
||||||
ui->albumsView->setPlayableModel( m_albumsModel );
|
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 = new TreeModel( ui->tracksView );
|
||||||
m_tracksModel->setMode( Mixed );
|
m_tracksModel->setMode( Mixed );
|
||||||
ui->tracksView->setTreeModel( m_tracksModel );
|
ui->tracksView->setTreeModel( m_tracksModel );
|
||||||
ui->tracksView->setRootIsDecorated( false );
|
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 ) );
|
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 ) ),
|
connect( m_album->artist().data(), SIGNAL( albumsAdded( QList<Tomahawk::album_ptr>, Tomahawk::ModelMode ) ),
|
||||||
SLOT( gotAlbums( QList<Tomahawk::album_ptr> ) ) );
|
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";
|
/* tDebug() << "Auto refetching";
|
||||||
m_buttonAlbums->setChecked( false );
|
m_buttonAlbums->setChecked( false );
|
||||||
|
@@ -58,15 +58,18 @@ ArtistInfoWidget::ArtistInfoWidget( const Tomahawk::artist_ptr& artist, QWidget*
|
|||||||
|
|
||||||
m_albumsModel = new PlayableModel( ui->albums );
|
m_albumsModel = new PlayableModel( ui->albums );
|
||||||
ui->albums->setPlayableModel( m_albumsModel );
|
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 );
|
m_relatedModel = new PlayableModel( ui->relatedArtists );
|
||||||
ui->relatedArtists->setPlayableModel( m_relatedModel );
|
ui->relatedArtists->setPlayableModel( m_relatedModel );
|
||||||
ui->relatedArtists->proxyModel()->sort( -1 );
|
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 = new PlaylistModel( ui->topHits );
|
||||||
m_topHitsModel->setStyle( PlayableModel::Short );
|
m_topHitsModel->setStyle( PlayableModel::Short );
|
||||||
ui->topHits->setPlayableModel( m_topHitsModel );
|
ui->topHits->setPlayableModel( m_topHitsModel );
|
||||||
ui->topHits->setSortingEnabled( false );
|
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 ) );
|
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 ) ),
|
connect( m_artist.data(), SIGNAL( tracksAdded( QList<Tomahawk::query_ptr>, Tomahawk::ModelMode, Tomahawk::collection_ptr ) ),
|
||||||
SLOT( onTracksFound( QList<Tomahawk::query_ptr>, Tomahawk::ModelMode ) ) );
|
SLOT( onTracksFound( QList<Tomahawk::query_ptr>, Tomahawk::ModelMode ) ) );
|
||||||
|
|
||||||
onAlbumsFound( artist->albums( Mixed ), Mixed );
|
if ( !m_artist->albums( Mixed ).isEmpty() )
|
||||||
onTracksFound( m_artist->tracks(), Mixed );
|
onAlbumsFound( m_artist->albums( Mixed ), Mixed );
|
||||||
onSimilarArtistsLoaded();
|
|
||||||
|
if ( !m_artist->tracks().isEmpty() )
|
||||||
|
onTracksFound( m_artist->tracks(), Mixed );
|
||||||
|
|
||||||
|
if ( !m_artist->similarArtists().isEmpty() )
|
||||||
|
onSimilarArtistsLoaded();
|
||||||
|
|
||||||
onArtistImageUpdated();
|
onArtistImageUpdated();
|
||||||
|
|
||||||
Tomahawk::InfoSystem::InfoStringHash artistInfo;
|
Tomahawk::InfoSystem::InfoStringHash artistInfo;
|
||||||
|
Reference in New Issue
Block a user