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

* SocialPlaylistWidget uses new AlbumView/AlbumModel API.

This commit is contained in:
Christian Muehlhaeuser 2012-05-31 23:13:53 +02:00
parent cd198db31d
commit a2f8a2ae11
2 changed files with 6 additions and 5 deletions

View File

@ -23,6 +23,7 @@
#include "database/DatabaseCommand_LoadDynamicPlaylist.h"
#include "database/Database.h"
#include "SourceList.h"
#include "PlayableModel.h"
#include "dynamic/GeneratorInterface.h"
#include "dynamic/database/DatabaseGenerator.h"
#include "utils/Logger.h"
@ -71,8 +72,8 @@ SocialPlaylistWidget::SocialPlaylistWidget ( QWidget* parent )
m_topForeignTracksModel->setStyle( PlayableModel::Short );
ui->newTracksView->overlay()->setEnabled( false );
m_popularNewAlbumsModel = new AlbumModel( ui->newAlbumsView );
ui->newAlbumsView->setAlbumModel( m_popularNewAlbumsModel );
m_popularNewAlbumsModel = new PlayableModel( ui->newAlbumsView );
ui->newAlbumsView->setPlayableModel( m_popularNewAlbumsModel );
// TODO run the genericselect command
// m_recentAlbumsModel->addFilteredCollection( collection_ptr(), 20, DatabaseCommand_AllAlbums::ModificationTime );
/*
@ -139,7 +140,7 @@ SocialPlaylistWidget::popularAlbumsFetched( QList< album_ptr > albums )
{
m_popularNewAlbumsModel->clear();
m_popularNewAlbumsModel->addAlbums( albums );
m_popularNewAlbumsModel->append( albums );
}

View File

@ -38,7 +38,7 @@
#include "Album.h"
#include "Query.h"
class AlbumModel;
class PlayableModel;
class PlaylistModel;
class TreeModel;
@ -81,7 +81,7 @@ private:
Ui_SocialPlaylistWidget *ui;
PlaylistModel* m_topForeignTracksModel;
AlbumModel* m_popularNewAlbumsModel;
PlayableModel* m_popularNewAlbumsModel;
QString m_title;
QString m_description;