| 127 | } |
| 128 | |
| 129 | bool QmitkMAPAlgorithmModel::setData(const QModelIndex &index, const QVariant &value, int role) |
| 130 | { |
| 131 | if (!index.isValid() || (static_cast<int>(m_MetaProperties.size()) <= index.row()) || (1 != index.column())) |
| 132 | { |
| 133 | return false; |
| 134 | } |
| 135 | |
| 136 | if (Qt::EditRole == role) |
| 137 | { |
| 138 | map::algorithm::MetaPropertyInfo *pInfo = m_MetaProperties[index.row()]; |
| 139 | |
| 140 | bool result = SetPropertyValue(pInfo, value); |
| 141 | |
| 142 | if (result) |
| 143 | { |
| 144 | emit beginResetModel(); |
| 145 | this->UpdateMetaProperties(); |
| 146 | emit endResetModel(); |
| 147 | } |
| 148 | |
| 149 | return result; |
| 150 | } |
| 151 | |
| 152 | return false; |
| 153 | }; |
| 154 | |
| 155 | void QmitkMAPAlgorithmModel::UpdateMetaProperties() const |
| 156 | { |
no test coverage detected