| 91 | } |
| 92 | |
| 93 | void PresetRuleDialog::onRemoveClicked() |
| 94 | { |
| 95 | auto* select = ui->ruleTable->selectionModel(); |
| 96 | if (select->hasSelection()) |
| 97 | { |
| 98 | auto indexes = select->selectedRows(); |
| 99 | for(int i = indexes.count(); i > 0; i--) |
| 100 | { |
| 101 | ruleModel->removeRow(indexes.at(i-1).row(), QModelIndex()); |
| 102 | } |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | void PresetRuleDialog::onSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected) |
| 107 | { |