diff options
Diffstat (limited to 'src/qmmpui')
| -rw-r--r-- | src/qmmpui/playlistmodel.cpp | 7 | ||||
| -rw-r--r-- | src/qmmpui/playlistmodel.h | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/qmmpui/playlistmodel.cpp b/src/qmmpui/playlistmodel.cpp index 7fe8daacb..4033aaa20 100644 --- a/src/qmmpui/playlistmodel.cpp +++ b/src/qmmpui/playlistmodel.cpp @@ -462,6 +462,13 @@ void PlayListModel::setSelected(int first, int last, bool selected) emit listChanged(SELECTION); } +void PlayListModel::setSelected(QList<int> indexes, bool selected) +{ + foreach (int idx, indexes) + m_container->setSelected(idx, selected); + emit listChanged(SELECTION); +} + void PlayListModel::removeSelected() { removeSelection(false); diff --git a/src/qmmpui/playlistmodel.h b/src/qmmpui/playlistmodel.h index 37fe5497d..1ad03d613 100644 --- a/src/qmmpui/playlistmodel.h +++ b/src/qmmpui/playlistmodel.h @@ -214,6 +214,9 @@ public: * @param selected Selection state (\b true - select, \b false - unselect). */ void setSelected(int first, int last, bool selected = true); + + + void setSelected(QList<int> indexes, bool selected = true); /*! * Advances to the next item. Returns \b false if next iten doesn't exist, * otherwise returns \b true |
