| 139 | } |
| 140 | |
| 141 | void ModelsManager::flagChanged(const QModelIndex& idx) |
| 142 | { |
| 143 | auto* view = static_cast<QAbstractItemView*>(sender()); |
| 144 | int row = idx.row(); |
| 145 | |
| 146 | QStandardItemModel* model = m_models->modelForView(view); |
| 147 | |
| 148 | QStandardItem* item = model->item(row, 0); |
| 149 | |
| 150 | Register r; |
| 151 | r.name = item->text(); |
| 152 | r.value = model->data(idx).toString(); |
| 153 | emit registerChanged(r); |
| 154 | } |
| 155 | |
| 156 | QStandardItemModel* Models::addModel(const Model& m) |
| 157 | { |