| 279 | }; |
| 280 | |
| 281 | bool QmitkMAPAlgorithmModel::SetPropertyValue(const map::algorithm::MetaPropertyInfo *pInfo, const QVariant &value) |
| 282 | { |
| 283 | if (!m_pMetaInterface) |
| 284 | { |
| 285 | return false; |
| 286 | } |
| 287 | |
| 288 | bool result = CheckCastAndSetProp<bool>(pInfo, value); |
| 289 | |
| 290 | if (!result) |
| 291 | result = CheckCastAndSetProp<int>(pInfo, value); |
| 292 | if (!result) |
| 293 | result = CheckCastAndSetProp<unsigned int>(pInfo, value); |
| 294 | if (!result) |
| 295 | result = CheckCastAndSetProp<long>(pInfo, value); |
| 296 | if (!result) |
| 297 | result = CheckCastAndSetProp<unsigned long>(pInfo, value); |
| 298 | if (!result) |
| 299 | result = CheckCastAndSetProp<float>(pInfo, value); |
| 300 | if (!result) |
| 301 | result = CheckCastAndSetProp<double>(pInfo, value); |
| 302 | if (!result && pInfo->getTypeInfo() == typeid(map::core::String)) |
| 303 | { |
| 304 | map::core::String val = value.toString().toStdString(); |
| 305 | map::core::MetaPropertyBase::Pointer spMetaProp = map::core::MetaProperty<map::core::String>::New(val).GetPointer(); |
| 306 | |
| 307 | result = m_pMetaInterface->setProperty(pInfo, spMetaProp); |
| 308 | }; |
| 309 | |
| 310 | return result; |
| 311 | }; |
nothing calls this directly
no test coverage detected