1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 15:59:42 +01:00

* Implemented LovedTracksItem's isBeingPlayed().

This commit is contained in:
Christian Muehlhaeuser 2013-06-13 10:25:28 +02:00
parent 1fdd485207
commit 8f91f7d18f
2 changed files with 11 additions and 1 deletions

View File

@ -30,6 +30,7 @@
#include "playlist/PlaylistLargeItemDelegate.h"
#include "utils/ImageRegistry.h"
#include "utils/Logger.h"
using namespace Tomahawk;
@ -97,7 +98,7 @@ LovedTracksItem::activate()
pv->setGuid( QString( "lovedtracks/%1" ).arg( par->source()->nodeId() ) );
}
pv->setPlayableModel( raModel );
pv->setPlaylistModel( raModel );
raModel->setSource( !par ? source_ptr() : par->source() );
m_lovedTracksPage = pv;
@ -167,3 +168,10 @@ LovedTracksItem::loveDroppedTracks( QList< Tomahawk::query_ptr > qrys )
foreach( Tomahawk::query_ptr qry, qrys )
qry->track()->setLoved( true );
}
bool
LovedTracksItem::isBeingPlayed() const
{
return m_lovedTracksPage && m_lovedTracksPage->isBeingPlayed();
}

View File

@ -44,6 +44,8 @@ public:
void setSortValue( int value );
virtual bool isBeingPlayed() const;
private slots:
void loveDroppedTracks( QList< Tomahawk::query_ptr > qrys );