Make playlist's selection buttons work
This commit is contained in:
parent
c988db9f31
commit
eef3e53bd9
4 changed files with 23 additions and 3 deletions
|
@ -109,6 +109,16 @@ PlaylistView::PlaylistView (QWidget *parent) : QListView (parent)
|
|||
this, SLOT(handleStatus(Xmms::Playback::Status)));
|
||||
}
|
||||
|
||||
void
|
||||
PlaylistView::invertSelection () {
|
||||
QItemSelection selection = QItemSelection (model ()->index (0, 0),
|
||||
model ()->index (model ()->rowCount ()-1, 0));
|
||||
selectionModel ()->select (selection, QItemSelectionModel::Toggle |
|
||||
QItemSelectionModel::Columns);
|
||||
selectionModel()->setCurrentIndex(model ()->index (0, 0),
|
||||
QItemSelectionModel::NoUpdate);
|
||||
}
|
||||
|
||||
void
|
||||
PlaylistView::setModel (QAbstractItemModel *model) {
|
||||
QListView::setModel (model);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue