| 254 | } |
| 255 | |
| 256 | std::string QmitkPropertyItemDelegate::GetPropertyName(const QModelIndex &index) const |
| 257 | { |
| 258 | auto propertyList = m_PropertyList.Lock(); |
| 259 | |
| 260 | if (propertyList.IsNotNull()) |
| 261 | { |
| 262 | mitk::BaseProperty *property = |
| 263 | reinterpret_cast<mitk::BaseProperty *>(index.data(mitk::PropertyRole).value<void *>()); |
| 264 | const mitk::PropertyList::PropertyMap *propertyMap = propertyList->GetMap(); |
| 265 | |
| 266 | mitk::PropertyList::PropertyMap::const_iterator it = |
| 267 | std::find_if(propertyMap->begin(), propertyMap->end(), PropertyEqualTo(property)); |
| 268 | |
| 269 | if (it != propertyMap->end()) |
| 270 | return it->first; |
| 271 | } |
| 272 | |
| 273 | return ""; |
| 274 | } |
| 275 | |
| 276 | void QmitkPropertyItemDelegate::OnComboBoxCurrentIndexChanged(int) |
| 277 | { |