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

Method OnBtnAddPoint

Modules/QtWidgetsExt/src/QmitkPointListWidget.cpp:336–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334}
335
336void QmitkPointListWidget::OnBtnAddPoint(bool checked)
337{
338 if (m_PointSetNode.IsNotNull())
339 {
340 if (checked)
341 {
342 m_DataInteractor = m_PointSetNode->GetDataInteractor();
343 // If no data Interactor is present create a new one
344 if (m_DataInteractor.IsNull())
345 {
346 // Create PointSetData Interactor
347 m_DataInteractor = mitk::PointSetDataInteractor::New();
348 // Load the according state machine for regular point set interaction
349 m_DataInteractor->LoadStateMachine("PointSet.xml");
350 // Set the configuration file that defines the triggers for the transitions
351 m_DataInteractor->SetEventConfig("PointSetConfig.xml");
352 // set the DataNode (which already is added to the DataStorage
353 m_DataInteractor->SetDataNode(m_PointSetNode);
354 }
355 }
356 else
357 {
358 m_PointSetNode->SetDataInteractor(nullptr);
359 m_DataInteractor = nullptr;
360 }
361 emit PointListChanged();
362 }
363}
364
365void QmitkPointListWidget::OnBtnAddPointManually()
366{

Callers

nothing calls this directly

Calls 8

IsNotNullMethod · 0.80
GetDataInteractorMethod · 0.80
LoadStateMachineMethod · 0.80
SetEventConfigMethod · 0.80
SetDataInteractorMethod · 0.80
NewFunction · 0.50
IsNullMethod · 0.45
SetDataNodeMethod · 0.45

Tested by

no test coverage detected