mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-24 14:42:53 +02:00
* Fixed PlayableItem & added properties.
This commit is contained in:
@@ -205,6 +205,14 @@ PlayableItem::artistName() const
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
@@ -31,6 +31,10 @@
|
||||
class DLLEXPORT PlayableItem : public QObject
|
||||
{
|
||||
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:
|
||||
~PlayableItem();
|
||||
|
Reference in New Issue
Block a user