diff options
Diffstat (limited to 'src/plugins/General/dbuscontrol')
| -rw-r--r-- | src/plugins/General/dbuscontrol/dbusadaptor.cpp | 6 | ||||
| -rw-r--r-- | src/plugins/General/dbuscontrol/dbusadaptor.h | 3 | ||||
| -rw-r--r-- | src/plugins/General/dbuscontrol/dbuscontrol.cpp | 1 | ||||
| -rw-r--r-- | src/plugins/General/dbuscontrol/dbuscontrol.h | 1 |
4 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/General/dbuscontrol/dbusadaptor.cpp b/src/plugins/General/dbuscontrol/dbusadaptor.cpp index 29e7f6960..86a5115ac 100644 --- a/src/plugins/General/dbuscontrol/dbusadaptor.cpp +++ b/src/plugins/General/dbuscontrol/dbusadaptor.cpp @@ -31,6 +31,7 @@ DBUSAdaptor::DBUSAdaptor(Control *ctrl, QObject *parent) connect(parent, SIGNAL(stateChanged()), SLOT (processState())); connect(parent, SIGNAL(volumeChanged()), SLOT (processVolume())); connect(parent, SIGNAL(timeChanged()), SLOT (processTime())); + connect(parent, SIGNAL(songChanged()), SIGNAL(songChanged())); } DBUSAdaptor::~DBUSAdaptor() @@ -109,6 +110,11 @@ QString DBUSAdaptor::genre() return qobject_cast<DBUSControl *>(parent())->info()->genre(); } +QString DBUSAdaptor::path() +{ + return qobject_cast<DBUSControl *>(parent())->info()->path(); +} + bool DBUSAdaptor::isPlaying() { return qobject_cast<DBUSControl *>(parent())->state() == General::Playing; diff --git a/src/plugins/General/dbuscontrol/dbusadaptor.h b/src/plugins/General/dbuscontrol/dbusadaptor.h index 225de2aca..a78c78008 100644 --- a/src/plugins/General/dbuscontrol/dbusadaptor.h +++ b/src/plugins/General/dbuscontrol/dbusadaptor.h @@ -40,6 +40,7 @@ Q_PROPERTY(QString artist READ artist) Q_PROPERTY(QString album READ album) Q_PROPERTY(QString comment READ comment) Q_PROPERTY(QString genre READ genre) +Q_PROPERTY(QString path READ path) Q_PROPERTY(bool isPlaying READ isPlaying) Q_PROPERTY(bool isPaused READ isPaused) Q_PROPERTY(bool isStopped READ isStopped) @@ -62,6 +63,7 @@ public: QString album(); QString comment(); QString genre(); + QString path(); bool isPlaying(); bool isPaused(); bool isStopped(); @@ -73,6 +75,7 @@ signals: void stopped(); void volumeChanged(int vol, int bal); void timeChanged(int newTime); + void songChanged(); public slots: void play(); diff --git a/src/plugins/General/dbuscontrol/dbuscontrol.cpp b/src/plugins/General/dbuscontrol/dbuscontrol.cpp index c2925db3b..7a72fff51 100644 --- a/src/plugins/General/dbuscontrol/dbuscontrol.cpp +++ b/src/plugins/General/dbuscontrol/dbuscontrol.cpp @@ -67,6 +67,7 @@ void DBUSControl::setState(const uint &state) void DBUSControl::setSongInfo(const SongInfo &song) { m_song = song; + emit songChanged(); } void DBUSControl::setVolume(int left, int right) diff --git a/src/plugins/General/dbuscontrol/dbuscontrol.h b/src/plugins/General/dbuscontrol/dbuscontrol.h index b75ccc000..61f369bb7 100644 --- a/src/plugins/General/dbuscontrol/dbuscontrol.h +++ b/src/plugins/General/dbuscontrol/dbuscontrol.h @@ -52,6 +52,7 @@ signals: void stateChanged(); void timeChanged(); void volumeChanged(); + void songChanged(); public slots: int leftVolume(); |
