| 18 | int PresetRuleTableModel::columnCount(const QModelIndex &) const { return 3; } |
| 19 | |
| 20 | bool PresetRuleTableModel::removeRows(int row, int count, const QModelIndex &parent) |
| 21 | { |
| 22 | Q_UNUSED(parent); |
| 23 | |
| 24 | beginRemoveRows({}, row, row + count - 1); |
| 25 | rules.remove(row, count); |
| 26 | endRemoveRows(); |
| 27 | |
| 28 | QModelIndex begin = index(row, 0); |
| 29 | QModelIndex end = index(row, 2); |
| 30 | emit dataChanged(begin, end); |
| 31 | return true; |
| 32 | } |
| 33 | |
| 34 | bool PresetRuleTableModel::setData(const QModelIndex &index, const QVariant &value, int role) |
| 35 | { |