1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-21 00:09:47 +01:00

* ArtistInfoWidget uses new AlbumView/AlbumModel API.

This commit is contained in:
Christian Muehlhaeuser 2012-05-31 23:12:50 +02:00
parent 2a4f2d3802
commit bf9052bb1b
2 changed files with 10 additions and 11 deletions

View File

@ -23,6 +23,7 @@
#include "audio/AudioEngine.h"
#include "playlist/TrackHeader.h"
#include "playlist/PlayableModel.h"
#include "playlist/TreeModel.h"
#include "playlist/PlaylistModel.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->albumHeader->layout() );
m_albumsModel = new AlbumModel( ui->albums );
ui->albums->setAlbumModel( m_albumsModel );
m_albumsModel = new PlayableModel( ui->albums );
ui->albums->setPlayableModel( m_albumsModel );
m_relatedModel = new AlbumModel( ui->relatedArtists );
// m_relatedModel->setColumnStyle( TreeModel::TrackOnly );
ui->relatedArtists->setAlbumModel( m_relatedModel );
// ui->relatedArtists->setSortingEnabled( false );
m_relatedModel = new PlayableModel( ui->relatedArtists );
ui->relatedArtists->setPlayableModel( m_relatedModel );
ui->relatedArtists->proxyModel()->sort( -1 );
m_topHitsModel = new PlaylistModel( ui->topHits );
@ -191,7 +190,7 @@ ArtistInfoWidget::onAlbumsFound( const QList<Tomahawk::album_ptr>& albums, Model
{
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
ArtistInfoWidget::onSimilarArtistsLoaded()
{
m_relatedModel->addArtists( m_artist->similarArtists() );
m_relatedModel->append( m_artist->similarArtists() );
}

View File

@ -39,7 +39,7 @@
#include "DllMacro.h"
class AlbumModel;
class PlayableModel;
class PlaylistModel;
class OverlayButton;
@ -106,8 +106,8 @@ private:
Tomahawk::artist_ptr m_artist;
AlbumModel* m_relatedModel;
AlbumModel* m_albumsModel;
PlayableModel* m_relatedModel;
PlayableModel* m_albumsModel;
PlaylistModel* m_topHitsModel;
Tomahawk::playlistinterface_ptr m_plInterface;