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

Method SetPropertyList

Modules/QtWidgets/src/QmitkPropertiesTableModel.cpp:189–211  ·  view source on GitHub ↗

PUBLIC SETTER

Source from the content-addressed store, hash-verified

187
188//# PUBLIC SETTER
189void QmitkPropertiesTableModel::SetPropertyList(mitk::PropertyList *_PropertyList)
190{
191 // if propertylist really changed
192 if (m_PropertyList != _PropertyList)
193 {
194 auto propertyList = m_PropertyList.Lock();
195 // Remove delete listener if there was a propertylist before
196 if (propertyList.IsNotNull())
197 propertyList->RemoveObserver(m_PropertyListDeleteObserverTag);
198
199 // set new list
200 m_PropertyList = _PropertyList;
201 propertyList = m_PropertyList.Lock();
202
203 if (propertyList.IsNotNull())
204 {
205 auto command = itk::SimpleMemberCommand<QmitkPropertiesTableModel>::New();
206 command->SetCallbackFunction(this, &QmitkPropertiesTableModel::PropertyListDelete);
207 m_PropertyListDeleteObserverTag = propertyList->AddObserver(itk::DeleteEvent(), command);
208 }
209 this->Reset();
210 }
211}
212
213void QmitkPropertiesTableModel::PropertyListDelete()
214{

Callers 2

Calls 5

ResetMethod · 0.95
IsNotNullMethod · 0.80
AddObserverMethod · 0.80
NewFunction · 0.50
LockMethod · 0.45

Tested by

no test coverage detected