From ac7a7dffc31afe8a20a51db4ab7749bf4fdea67c Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sun, 21 Dec 2008 09:56:05 +0000 Subject: more mpris methods support git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@697 90c681e8-e032-0410-971d-27865f9a5e38 --- src/qmmpui/playlistmodel.cpp | 12 ++++++++++++ src/qmmpui/playlistmodel.h | 10 +++++----- 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'src/qmmpui') diff --git a/src/qmmpui/playlistmodel.cpp b/src/qmmpui/playlistmodel.cpp index 97d18e156..812ae51b2 100644 --- a/src/qmmpui/playlistmodel.cpp +++ b/src/qmmpui/playlistmodel.cpp @@ -826,11 +826,13 @@ void PlayListModel::prepareForShufflePlaying(bool val) else m_play_state = new NormalPlayState(this); + emit shuffleChanged(val); } void PlayListModel::prepareForRepeatablePlaying(bool val) { is_repeatable_list = val; + emit repeatableListChanged(val); } void PlayListModel::doCurrentVisibleRequest() @@ -895,6 +897,16 @@ void PlayListModel::savePlaylist(const QString & f_name) } } +bool PlayListModel::isRepeatableList() const +{ + return is_repeatable_list; +} + +bool PlayListModel::isShuffle() const +{ + return FALSE; //TODO fix this +} + bool PlayListModel::isFileLoaderRunning() const { foreach(FileLoader* l,m_running_loaders) diff --git a/src/qmmpui/playlistmodel.h b/src/qmmpui/playlistmodel.h index 04665b88c..c0a4e1168 100644 --- a/src/qmmpui/playlistmodel.h +++ b/src/qmmpui/playlistmodel.h @@ -116,11 +116,6 @@ public: */ bool isQueued(PlayListItem* item) const; - bool isRepeatableList()const - { - return is_repeatable_list; - } - /*! * Sets current song to the file that is nex in queue, if queue is empty - does nothing */ @@ -187,6 +182,9 @@ public: */ void savePlaylist(const QString& f_name); + bool isRepeatableList() const; + bool isShuffle() const; + /*! * Enum of available sort modes */ @@ -199,6 +197,8 @@ signals: void listChanged(); void currentChanged(); void firstAdded(); + void repeatableListChanged(bool); + void shuffleChanged(bool); public slots: void load(PlayListItem *); -- cgit v1.2.3-13-gbd6f