| 136 | } |
| 137 | |
| 138 | void InputEventWindow::slotRemove() |
| 139 | { |
| 140 | int min_row = 1 << 30; |
| 141 | int max_row = 0; |
| 142 | const QModelIndexList indexes = inputEventView->selectionModel()->selectedRows(); |
| 143 | |
| 144 | for (const QModelIndex index : indexes) { |
| 145 | if (index.row() < min_row) |
| 146 | min_row = index.row(); |
| 147 | if (index.row() > max_row) |
| 148 | max_row = index.row(); |
| 149 | } |
| 150 | |
| 151 | inputEventModel->remove(min_row, max_row); |
| 152 | } |
| 153 | |
| 154 | void InputEventWindow::slotClear() |
| 155 | { |