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

Method GetPropertyName

Modules/QtWidgets/src/QmitkPropertyItemDelegate.cpp:256–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256std::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
276void QmitkPropertyItemDelegate::OnComboBoxCurrentIndexChanged(int)
277{

Callers 3

createEditorMethod · 0.95
OnCurrentRowChangedMethod · 0.45
OnCurrentRowChangedMethod · 0.45

Calls 6

IsNotNullMethod · 0.80
PropertyEqualToClass · 0.70
LockMethod · 0.45
dataMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected