1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-24 22:46:03 +02:00

* Fixed PlayableItem & added properties.

This commit is contained in:
Christian Muehlhaeuser
2013-05-19 00:31:15 +02:00
parent aaebfe39c5
commit 3490975de5
2 changed files with 12 additions and 0 deletions

View File

@@ -205,6 +205,14 @@ PlayableItem::artistName() const
{ {
return m_query->track()->artist(); return m_query->track()->artist();
} }
else if ( !m_album.isNull() )
{
return m_album->artist()->name();
}
else if ( !m_artist.isNull() )
{
return m_artist->name();
}
return QString(); return QString();
} }

View File

@@ -31,6 +31,10 @@
class DLLEXPORT PlayableItem : public QObject class DLLEXPORT PlayableItem : public QObject
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(QString name READ name NOTIFY dataChanged)
Q_PROPERTY(QString artistName READ artistName NOTIFY dataChanged)
Q_PROPERTY(QString albumName READ albumName NOTIFY dataChanged)
Q_PROPERTY(bool isPlaying READ isPlaying NOTIFY dataChanged)
public: public:
~PlayableItem(); ~PlayableItem();