diff --git a/src/libtomahawk/infosystem/infoplugins/generic/chartsplugin.cpp b/src/libtomahawk/infosystem/infoplugins/generic/chartsplugin.cpp index e75ddf95b..868b90739 100644 --- a/src/libtomahawk/infosystem/infoplugins/generic/chartsplugin.cpp +++ b/src/libtomahawk/infosystem/infoplugins/generic/chartsplugin.cpp @@ -265,7 +265,7 @@ ChartsPlugin::chartResources() foreach(QVariant resource, m_chartResources){ tDebug() << "ChartsPlugin: InfoChart fetching possible types for "<< resource.toString(); - QUrl url = QUrl( QString( CHART_URL "/source/%1" ).arg(resource.toString() ) ); + QUrl url = QUrl( QString( CHART_URL "source/%1" ).arg(resource.toString() ) ); qDebug() << "Getting types from " << url; QNetworkReply* reply = lastfm::nam()->get( QNetworkRequest( url ) ); @@ -298,8 +298,10 @@ ChartsPlugin::chartTypes() return; } - foreach(QVariant chart, res.value( "charts" ).toMap() ) + foreach(QVariant chart, res.value( "charts" ).toMap() ){ m_chartTypes.append(chart); + qDebug() << "Chart types" << chart; + } } diff --git a/src/libtomahawk/widgets/whatshotwidget.cpp b/src/libtomahawk/widgets/whatshotwidget.cpp index 9a189b859..26c83a7fd 100644 --- a/src/libtomahawk/widgets/whatshotwidget.cpp +++ b/src/libtomahawk/widgets/whatshotwidget.cpp @@ -78,8 +78,11 @@ WhatsHotWidget::WhatsHotWidget( QWidget* parent ) ui->breadCrumbRight->setModel(m_crumbModelLeft); ui->breadCrumbRight->setUseAnimation(true);*/ - m_tracksModel = new PlaylistModel( ui->tracksViewLeft ); - m_tracksModel->setStyle( TrackModel::Short ); + + m_tracksModel = new TreeModel( ui->tracksViewLeft ); + ui->tracksViewLeft->setTreeModel( m_tracksModel ); + + ui->tracksViewLeft->setFrameShape( QFrame::NoFrame ); ui->tracksViewLeft->setAttribute( Qt::WA_MacShowFocusRect, 0 ); @@ -207,17 +210,20 @@ WhatsHotWidget::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestDat } else if( type == "albums" ) { - - setLeftViewTracks(); - m_tracksModel->clear(); + setLeftViewArtists(); + m_artistsModel->clear(); const QList albums = returnedData["albums"].value >(); tDebug( LOGVERBOSE ) << "WhatsHot: got albums! " << albums.size(); foreach ( const Tomahawk::InfoSystem::ArtistAlbumPair& album, albums ) { - query_ptr query = Query::get( album.artist, QString(), album.album, uuid() ); - m_tracksModel->append( query ); + //query_ptr query = Query::get( album.artist, QString(), album.album, uuid() ); + artist_ptr artistPtr = Artist::get( album.artist ); + //album_ptr albumPtr = Album::get( 0, album.album, artistPtr ); + + m_artistsModel->addArtists( artistPtr ); + //m_albumsModel->append( query ); } } else if( type == "tracks" ) @@ -255,9 +261,7 @@ WhatsHotWidget::infoSystemFinished( QString target ) void WhatsHotWidget::leftCrumbIndexChanged( QModelIndex index ) { - - - tDebug( LOGVERBOSE ) << "WhatsHot:: left crumb current changed" << index.data(); + tDebug( LOGVERBOSE ) << "WhatsHot:: left crumb changed" << index.data(); QStandardItem* item = m_crumbModelLeft->itemFromIndex(index); if( !item ) return; @@ -265,7 +269,6 @@ WhatsHotWidget::leftCrumbIndexChanged( QModelIndex index ) return; - // Get the base eg. source identifier QList indexes; while (index.parent().isValid()) { @@ -288,9 +291,6 @@ WhatsHotWidget::leftCrumbIndexChanged( QModelIndex index ) requestData.input = QVariant::fromValue< Tomahawk::InfoSystem::InfoCriteriaHash >( criteria ); requestData.type = Tomahawk::InfoSystem::InfoChart; - qDebug() << Q_FUNC_INFO << "RequestData custom" << requestData.customData; - qDebug() << Q_FUNC_INFO << "RequestData caller" << requestData.caller; - qDebug() << Q_FUNC_INFO << "RequestData input" << requestData.input; Tomahawk::InfoSystem::InfoSystem::instance()->getInfo( requestData ); } diff --git a/src/libtomahawk/widgets/whatshotwidget.ui b/src/libtomahawk/widgets/whatshotwidget.ui index 56e09ebc1..902455cfb 100644 --- a/src/libtomahawk/widgets/whatshotwidget.ui +++ b/src/libtomahawk/widgets/whatshotwidget.ui @@ -30,30 +30,6 @@ - - - true - - - - true - - - - 9 - 9 - 839 - 471 - - - - - 320 - 0 - - - - @@ -81,7 +57,7 @@ ArtistView QTreeView -
artistview.h
+
artistview.h
HeaderBreadCrumb