aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/mpris/playerobject.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-11-12 22:00:02 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-11-12 22:00:02 +0000
commit90d3aeb642ba4d6445932343010294a39b33efe2 (patch)
treeea9380c8aa1c8086b2258a8c21e8bf6486fcc141 /src/plugins/General/mpris/playerobject.cpp
parente7115704de07fd7a4a474447b36ae2c9cc8a8f25 (diff)
downloadqmmp-90d3aeb642ba4d6445932343010294a39b33efe2.tar.gz
qmmp-90d3aeb642ba4d6445932343010294a39b33efe2.tar.bz2
qmmp-90d3aeb642ba4d6445932343010294a39b33efe2.zip
added multiple playlists support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1363 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/mpris/playerobject.cpp')
-rw-r--r--src/plugins/General/mpris/playerobject.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/plugins/General/mpris/playerobject.cpp b/src/plugins/General/mpris/playerobject.cpp
index 894b68617..d7166e964 100644
--- a/src/plugins/General/mpris/playerobject.cpp
+++ b/src/plugins/General/mpris/playerobject.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2008 by Ilya Kotov *
+ * Copyright (C) 2008-2009 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -24,7 +24,7 @@
#include <qmmp/soundcore.h>
#include <qmmp/metadatamanager.h>
#include <qmmpui/mediaplayer.h>
-#include <qmmpui/playlistmodel.h>
+#include <qmmpui/playlistmanager.h>
#include "playerobject.h"
@@ -53,18 +53,17 @@ const QDBusArgument &operator >> (const QDBusArgument &arg, PlayerStatus &status
return arg;
}
-PlayerObject::PlayerObject(QObject *parent)
- : QObject(parent)
+PlayerObject::PlayerObject(QObject *parent) : QObject(parent)
{
qDBusRegisterMetaType<PlayerStatus>();
m_core = SoundCore::instance();
m_player = MediaPlayer::instance();
- m_model = m_player->playListModel();
+ m_pl_manager = m_player->playListManager();
connect(m_core, SIGNAL(stateChanged (Qmmp::State)), SLOT(updateCaps()));
connect(m_core, SIGNAL(metaDataChanged ()), SLOT(updateTrack()));
connect(m_core, SIGNAL(stateChanged (Qmmp::State)), SLOT(updateStatus()));
- connect(m_model, SIGNAL(repeatableListChanged(bool)), SLOT(updateStatus()));
- connect(m_model, SIGNAL(shuffleChanged(bool)), SLOT(updateStatus()));
+ connect(m_pl_manager, SIGNAL(repeatableListChanged(bool)), SLOT(updateStatus()));
+ connect(m_pl_manager, SIGNAL(shuffleChanged(bool)), SLOT(updateStatus()));
connect(m_player, SIGNAL(repeatableChanged(bool)), SLOT(updateStatus()));
}
@@ -118,9 +117,9 @@ PlayerStatus PlayerObject::GetStatus()
case Qmmp::Paused:
st.state = 1;
};
- st.random = int(m_model->isShuffle());
+ st.random = int(m_pl_manager->isShuffle());
st.repeat = int(m_player->isRepeatable());
- st.repeatPlayList = int(m_model->isRepeatableList());
+ st.repeatPlayList = int(m_pl_manager->isRepeatableList());
return st;
}