mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-13 20:39:57 +01:00
* Make global Recently Played a FlexibleView.
This commit is contained in:
parent
d06b0e824d
commit
e21f2a5e87
@ -408,18 +408,19 @@ ViewManager::showRecentPlaysPage()
|
||||
{
|
||||
if ( !m_recentPlaysWidget )
|
||||
{
|
||||
PlaylistView* pv = new PlaylistView( m_widget );
|
||||
FlexibleView* pv = new FlexibleView( m_widget );
|
||||
pv->setPixmap( QPixmap( RESPATH "images/recently-played.png" ) );
|
||||
|
||||
RecentlyPlayedModel* raModel = new RecentlyPlayedModel( pv );
|
||||
raModel->setTitle( tr( "Recently Played Tracks" ) );
|
||||
raModel->setDescription( tr( "Recently played tracks from all your friends" ) );
|
||||
pv->proxyModel()->setStyle( PlayableProxyModel::Large );
|
||||
|
||||
PlaylistLargeItemDelegate* del = new PlaylistLargeItemDelegate( PlaylistLargeItemDelegate::RecentlyPlayed, pv, pv->proxyModel() );
|
||||
connect( del, SIGNAL( updateIndex( QModelIndex ) ), pv, SLOT( update( QModelIndex ) ) );
|
||||
pv->setItemDelegate( del );
|
||||
PlaylistLargeItemDelegate* del = new PlaylistLargeItemDelegate( PlaylistLargeItemDelegate::RecentlyPlayed, pv->trackView(), pv->trackView()->proxyModel() );
|
||||
connect( del, SIGNAL( updateIndex( QModelIndex ) ), pv->trackView(), SLOT( update( QModelIndex ) ) );
|
||||
pv->trackView()->setItemDelegate( del );
|
||||
|
||||
pv->setPlaylistModel( raModel );
|
||||
pv->setPlayableModel( raModel );
|
||||
pv->setEmptyTip( tr( "Sorry, we could not find any recent plays!" ) );
|
||||
raModel->setSource( source_ptr() );
|
||||
|
||||
m_recentPlaysWidget = pv;
|
||||
|
Loading…
x
Reference in New Issue
Block a user