From 82a2ff900b86e51758c91fc5164512bb41e9635a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Lindstr=C3=B6m?= Date: Wed, 11 Jan 2012 01:22:22 +0100 Subject: [PATCH] Fetches artistdata from infosystem --- src/libtomahawk/widgets/whatshotwidget.cpp | 15 ++++++++------- src/libtomahawk/widgets/whatshotwidget.ui | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/libtomahawk/widgets/whatshotwidget.cpp b/src/libtomahawk/widgets/whatshotwidget.cpp index 062139050..114e12e61 100644 --- a/src/libtomahawk/widgets/whatshotwidget.cpp +++ b/src/libtomahawk/widgets/whatshotwidget.cpp @@ -57,8 +57,8 @@ WhatsHotWidget::WhatsHotWidget( QWidget* parent ) { ui->setupUi( this ); - ui->additionsView->setFrameShape( QFrame::NoFrame ); - ui->additionsView->setAttribute( Qt::WA_MacShowFocusRect, 0 ); + ui->albumsView->setFrameShape( QFrame::NoFrame ); + ui->albumsView->setAttribute( Qt::WA_MacShowFocusRect, 0 ); TomahawkUtils::unmarginLayout( layout() ); TomahawkUtils::unmarginLayout( ui->stackLeft->layout() ); @@ -91,7 +91,7 @@ WhatsHotWidget::WhatsHotWidget( QWidget* parent ) ui->artistsViewLeft->setAttribute( Qt::WA_MacShowFocusRect, 0 ); ui->artistsViewLeft->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff ); - ui->artistsViewLeft->header()->setVisible( false ); + ui->artistsViewLeft->header()->setVisible( true ); m_playlistInterface = Tomahawk::playlistinterface_ptr( new ChartsPlaylistInterface( this ) ); @@ -257,7 +257,8 @@ WhatsHotWidget::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestDat connect( loader, SIGNAL( artists( Tomahawk::ChartDataLoader*, QList< Tomahawk::artist_ptr > ) ), this, SLOT( chartArtistsLoaded( Tomahawk::ChartDataLoader*, QList< Tomahawk::artist_ptr > ) ) ); TreeModel* artistsModel = new TreeModel( ui->artistsViewLeft ); - artistsModel->setColumnStyle( TreeModel::TrackOnly ); + artistsModel->setMode( InfoSystemMode ); + artistsModel->setColumnStyle( TreeModel::AllColumns ); m_artistModels[ chartId ] = artistsModel; @@ -272,7 +273,7 @@ WhatsHotWidget::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestDat connect( loader, SIGNAL( albums( Tomahawk::ChartDataLoader*, QList< Tomahawk::album_ptr > ) ), this, SLOT( chartAlbumsLoaded( Tomahawk::ChartDataLoader*, QList< Tomahawk::album_ptr > ) ) ); - AlbumModel* albumModel = new AlbumModel( ui->additionsView ); + AlbumModel* albumModel = new AlbumModel( ui->albumsView ); m_albumModels[ chartId ] = albumModel; @@ -448,8 +449,8 @@ WhatsHotWidget::parseNode( QStandardItem* parentItem, const QString &label, cons void WhatsHotWidget::setLeftViewAlbums( AlbumModel* model ) { - ui->additionsView->setAlbumModel( model ); - ui->additionsView->proxyModel()->sort( -1 ); // disable sorting, must be called after artistsViewLeft->setTreeModel + ui->albumsView->setAlbumModel( model ); + ui->albumsView->proxyModel()->sort( -1 ); // disable sorting, must be called after artistsViewLeft->setTreeModel ui->stackLeft->setCurrentIndex( 2 ); } diff --git a/src/libtomahawk/widgets/whatshotwidget.ui b/src/libtomahawk/widgets/whatshotwidget.ui index 7c635acf8..d62df772d 100644 --- a/src/libtomahawk/widgets/whatshotwidget.ui +++ b/src/libtomahawk/widgets/whatshotwidget.ui @@ -47,7 +47,7 @@ - + true