MCPcopy Create free account
hub / github.com/MITK/MITK / setData

Method setData

Modules/MatchPointRegistrationUI/src/QmitkMAPAlgorithmModel.cpp:129–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129bool 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
155void QmitkMAPAlgorithmModel::UpdateMetaProperties() const
156{

Callers 5

setModelDataMethod · 0.45
setModelDataMethod · 0.45
setModelDataMethod · 0.45
setModelDataMethod · 0.45
setModelDataMethod · 0.45

Calls 3

UpdateMetaPropertiesMethod · 0.95
sizeMethod · 0.45
rowMethod · 0.45

Tested by

no test coverage detected