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

Method reset

Modules/QtWidgets/src/QmitkDataStorageListModel.cpp:146–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146void QmitkDataStorageListModel::reset()
147{
148 mitk::DataStorage::SetOfObjects::ConstPointer modelNodes;
149
150 if (m_DataStorage != nullptr)
151 {
152 if (m_NodePredicate != nullptr)
153 {
154 modelNodes = m_DataStorage->GetSubset(m_NodePredicate);
155 }
156 else
157 {
158 modelNodes = m_DataStorage->GetAll();
159 }
160 }
161
162 ClearInternalNodeList();
163
164 // add all filtered nodes to our list
165 if (modelNodes != nullptr)
166 {
167 for (auto &node : *modelNodes)
168 {
169 AddNodeToInternalList(node);
170 }
171 }
172}
173
174void QmitkDataStorageListModel::AddNodeToInternalList(mitk::DataNode *node)
175{

Callers 15

StartMethod · 0.80
StartMethod · 0.80
StartMethod · 0.80
StartMethod · 0.80
RenderWindowSelectedMethod · 0.80
RegisterMethod · 0.80
TestServiceTrackerFunction · 0.80

Calls 2

GetSubsetMethod · 0.80
GetAllMethod · 0.80

Tested by 15

StartMethod · 0.64
TestServiceTrackerFunction · 0.64
tearDownMethod · 0.64
tearDownMethod · 0.64
tearDownMethod · 0.64
tearDownMethod · 0.64
tearDownMethod · 0.64
tearDownMethod · 0.64
tearDownMethod · 0.64
tearDownMethod · 0.64
tearDownMethod · 0.64
tearDownMethod · 0.64