diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2017-08-22 19:03:22 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2017-08-22 19:03:22 +0000 |
| commit | 3810b6fb810d298728d2195d0c8e7c98cbf540bc (patch) | |
| tree | 39d88dde77cf231e07cc9a4066104234dfe42f75 /src/qmmpui | |
| parent | 274b48eb6eadb359cfdc8d6ee752e67e667936bc (diff) | |
| download | qmmp-3810b6fb810d298728d2195d0c8e7c98cbf540bc.tar.gz qmmp-3810b6fb810d298728d2195d0c8e7c98cbf540bc.tar.bz2 qmmp-3810b6fb810d298728d2195d0c8e7c98cbf540bc.zip | |
quick search implementation
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@7387 90c681e8-e032-0410-971d-27865f9a5e38
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 |
