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

Method ClearPointList

Modules/QtWidgetsExt/src/QmitkPointListView.cpp:286–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286void QmitkPointListView::ClearPointList()
287{
288 if (!m_PointListModel->GetPointSet())
289 return;
290 mitk::PointSet::Pointer curPS = m_PointListModel->GetPointSet();
291 if (curPS->GetSize() == 0)
292 return;
293
294 switch (QMessageBox::question(this,
295 tr("Clear Points"),
296 tr("Remove all points from the displayed list?"),
297 QMessageBox::Yes | QMessageBox::No,
298 QMessageBox::No))
299 {
300 case QMessageBox::Yes:
301 {
302 mitk::PointSet::PointsIterator it;
303 mitk::PointSet::PointsContainer *curPsPoints;
304 while (!curPS->IsEmptyTimeStep(0))
305 {
306 curPsPoints = curPS->GetPointSet()->GetPoints();
307 it = curPsPoints->Begin();
308 curPS->SetSelectInfo(it->Index(), true);
309 m_PointListModel->RemoveSelectedPoint();
310 }
311 mitk::RenderingManager::GetInstance()->RequestUpdateAll();
312 break;
313 }
314 case QMessageBox::No:
315 default:
316 break;
317 }
318}
319
320void QmitkPointListView::ClearPointListTS()
321{

Callers

nothing calls this directly

Calls 7

SetSelectInfoMethod · 0.80
GetPointSetMethod · 0.45
GetSizeMethod · 0.45
IsEmptyTimeStepMethod · 0.45
BeginMethod · 0.45
RemoveSelectedPointMethod · 0.45
RequestUpdateAllMethod · 0.45

Tested by

no test coverage detected