diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-04-04 19:58:49 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-04-04 19:58:49 +0000 |
| commit | 4c257a6d66604435127d877f6f663632a63a9688 (patch) | |
| tree | 5b6ab3a08688940249ec14e1ee2752a13ab41e10 /src | |
| parent | b02f09d54e9e492090cce54c9ce908b0c4a00145 (diff) | |
| download | qmmp-4c257a6d66604435127d877f6f663632a63a9688.tar.gz qmmp-4c257a6d66604435127d877f6f663632a63a9688.tar.bz2 qmmp-4c257a6d66604435127d877f6f663632a63a9688.zip | |
dbus plugin: more features
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@331 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
| -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(); |
