aboutsummaryrefslogtreecommitdiff
path: root/src/qmmpui/playlistmodel.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2013-09-06 05:55:41 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2013-09-06 05:55:41 +0000
commit70637af7415d4b318355eaf670611331908530f2 (patch)
treeb82194c2c5ec7817c1202b7cc07e6c1646ccd655 /src/qmmpui/playlistmodel.cpp
parentdc76e6a2b1672620f66bbaf4033341cdf5b600f7 (diff)
downloadqmmp-70637af7415d4b318355eaf670611331908530f2.tar.gz
qmmp-70637af7415d4b318355eaf670611331908530f2.tar.bz2
qmmp-70637af7415d4b318355eaf670611331908530f2.zip
select all group if needed
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3681 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/playlistmodel.cpp')
-rw-r--r--src/qmmpui/playlistmodel.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/qmmpui/playlistmodel.cpp b/src/qmmpui/playlistmodel.cpp
index 9431bc954..ef77e72a4 100644
--- a/src/qmmpui/playlistmodel.cpp
+++ b/src/qmmpui/playlistmodel.cpp
@@ -224,7 +224,7 @@ bool PlayListModel::isGroup(int index) const
{
if (index > count()-1 || index < 0)
return false;
- return !m_container->item(index)->isGroup();
+ return m_container->item(index)->isGroup();
}
bool PlayListModel::next()
@@ -306,6 +306,20 @@ void PlayListModel::setSelected(int index, bool selected)
emit listChanged();
}
+void PlayListModel::setSelected(QList<PlayListTrack *> tracks, bool selected)
+{
+ foreach(PlayListTrack *t, tracks)
+ t->setSelected(selected);
+ emit listChanged();
+}
+
+void PlayListModel::setSelected(QList<PlayListItem *> items, bool selected)
+{
+ foreach(PlayListItem *i, items)
+ i->setSelected(selected);
+ emit listChanged();
+}
+
void PlayListModel::removeSelected()
{
removeSelection(false);