mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 13:47:26 +02:00
* ArtistInfoWidget uses new AlbumView/AlbumModel API.
This commit is contained in:
@@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include "audio/AudioEngine.h"
|
#include "audio/AudioEngine.h"
|
||||||
#include "playlist/TrackHeader.h"
|
#include "playlist/TrackHeader.h"
|
||||||
|
#include "playlist/PlayableModel.h"
|
||||||
#include "playlist/TreeModel.h"
|
#include "playlist/TreeModel.h"
|
||||||
#include "playlist/PlaylistModel.h"
|
#include "playlist/PlaylistModel.h"
|
||||||
#include "playlist/TreeProxyModel.h"
|
#include "playlist/TreeProxyModel.h"
|
||||||
@@ -59,13 +60,11 @@ ArtistInfoWidget::ArtistInfoWidget( const Tomahawk::artist_ptr& artist, QWidget*
|
|||||||
TomahawkUtils::unmarginLayout( ui->layoutWidget2->layout() );
|
TomahawkUtils::unmarginLayout( ui->layoutWidget2->layout() );
|
||||||
TomahawkUtils::unmarginLayout( ui->albumHeader->layout() );
|
TomahawkUtils::unmarginLayout( ui->albumHeader->layout() );
|
||||||
|
|
||||||
m_albumsModel = new AlbumModel( ui->albums );
|
m_albumsModel = new PlayableModel( ui->albums );
|
||||||
ui->albums->setAlbumModel( m_albumsModel );
|
ui->albums->setPlayableModel( m_albumsModel );
|
||||||
|
|
||||||
m_relatedModel = new AlbumModel( ui->relatedArtists );
|
m_relatedModel = new PlayableModel( ui->relatedArtists );
|
||||||
// m_relatedModel->setColumnStyle( TreeModel::TrackOnly );
|
ui->relatedArtists->setPlayableModel( m_relatedModel );
|
||||||
ui->relatedArtists->setAlbumModel( m_relatedModel );
|
|
||||||
// ui->relatedArtists->setSortingEnabled( false );
|
|
||||||
ui->relatedArtists->proxyModel()->sort( -1 );
|
ui->relatedArtists->proxyModel()->sort( -1 );
|
||||||
|
|
||||||
m_topHitsModel = new PlaylistModel( ui->topHits );
|
m_topHitsModel = new PlaylistModel( ui->topHits );
|
||||||
@@ -191,7 +190,7 @@ ArtistInfoWidget::onAlbumsFound( const QList<Tomahawk::album_ptr>& albums, Model
|
|||||||
{
|
{
|
||||||
Q_UNUSED( mode );
|
Q_UNUSED( mode );
|
||||||
|
|
||||||
m_albumsModel->addAlbums( albums );
|
m_albumsModel->append( albums );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -207,7 +206,7 @@ ArtistInfoWidget::onTracksFound( const QList<Tomahawk::query_ptr>& queries, Mode
|
|||||||
void
|
void
|
||||||
ArtistInfoWidget::onSimilarArtistsLoaded()
|
ArtistInfoWidget::onSimilarArtistsLoaded()
|
||||||
{
|
{
|
||||||
m_relatedModel->addArtists( m_artist->similarArtists() );
|
m_relatedModel->append( m_artist->similarArtists() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
#include "DllMacro.h"
|
#include "DllMacro.h"
|
||||||
|
|
||||||
class AlbumModel;
|
class PlayableModel;
|
||||||
class PlaylistModel;
|
class PlaylistModel;
|
||||||
class OverlayButton;
|
class OverlayButton;
|
||||||
|
|
||||||
@@ -106,8 +106,8 @@ private:
|
|||||||
|
|
||||||
Tomahawk::artist_ptr m_artist;
|
Tomahawk::artist_ptr m_artist;
|
||||||
|
|
||||||
AlbumModel* m_relatedModel;
|
PlayableModel* m_relatedModel;
|
||||||
AlbumModel* m_albumsModel;
|
PlayableModel* m_albumsModel;
|
||||||
PlaylistModel* m_topHitsModel;
|
PlaylistModel* m_topHitsModel;
|
||||||
Tomahawk::playlistinterface_ptr m_plInterface;
|
Tomahawk::playlistinterface_ptr m_plInterface;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user