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

Method OnItemDataChanged

Modules/QtWidgetsExt/src/QmitkBoundingObjectWidget.cpp:213–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213void QmitkBoundingObjectWidget::OnItemDataChanged(QTreeWidgetItem *item, int col)
214{
215 if (m_ItemNodeMap.size() < 1)
216 return;
217
218 ItemNodeMapType::iterator it = m_ItemNodeMap.find(item);
219 if (it == m_ItemNodeMap.end())
220 return;
221
222 mitk::DataNode *node = it->second;
223
224 // name
225 if (col == 0)
226 {
227 m_TreeWidget->closePersistentEditor(item, col);
228 node->SetName(item->text(0).toLocal8Bit().data());
229 }
230 // positive
231 else if (col == 1)
232 {
233 mitk::BoundingObject *boundingObject = dynamic_cast<mitk::BoundingObject *>(node->GetData());
234 if (boundingObject)
235 boundingObject->SetPositive(!(item->checkState(1)));
236 emit BoundingObjectsChanged();
237 }
238 // visible
239 else if (col == 2)
240 {
241 node->SetVisibility(item->checkState(2));
242 }
243
244 mitk::RenderingManager::GetInstance()->RequestUpdateAll();
245}
246
247void QmitkBoundingObjectWidget::RemoveItem()
248{

Callers

nothing calls this directly

Calls 10

textMethod · 0.80
checkStateMethod · 0.80
sizeMethod · 0.45
findMethod · 0.45
endMethod · 0.45
SetNameMethod · 0.45
dataMethod · 0.45
GetDataMethod · 0.45
SetVisibilityMethod · 0.45
RequestUpdateAllMethod · 0.45

Tested by

no test coverage detected