| 234 | } |
| 235 | |
| 236 | bool VarTableModel::setData(const QModelIndex &index, const QVariant &value, int role) { |
| 237 | if (index.isValid() && index.column() == VAR_NAME_COL && role == Qt::CheckStateRole) { |
| 238 | vars[index.row()].checked = qvariant_cast<Qt::CheckState>(value) == Qt::Checked; |
| 239 | emit dataChanged(index, index, { Qt::CheckStateRole }); |
| 240 | return true; |
| 241 | } |
| 242 | return false; |
| 243 | } |
| 244 | |
| 245 | QVariant VarTableModel::headerData(int section, Qt::Orientation orientation, int role) const { |
| 246 | if (orientation == Qt::Horizontal && role == Qt::DisplayRole) { |
no test coverage detected