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

Method OnOkButtonClicked

Modules/QtWidgetsExt/src/QmitkEditPointDialog.cpp:91–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91void QmitkEditPointDialog::OnOkButtonClicked(bool)
92{
93 if (d->m_PointSet == nullptr)
94 {
95 MITK_WARN << "Pointset is 0.";
96 this->reject();
97 }
98 // check if digits of input value exceed double precision
99 auto x = d->m_XCoord->text().toDouble();
100 auto y = d->m_YCoord->text().toDouble();
101 auto z = d->m_ZCoord->text().toDouble();
102
103 if (ValidateCoordinate("X", x) && ValidateCoordinate("Y", y) && ValidateCoordinate("Z", z))
104 {
105 auto point = d->m_PointSet->GetPoint(d->m_PointId, d->m_Timestep);
106 point.SetElement(0, x);
107 point.SetElement(1, y);
108 point.SetElement(2, z);
109 d->m_PointSet->SetPoint(d->m_PointId, point);
110 this->accept();
111 }
112}

Callers

nothing calls this directly

Calls 6

ValidateCoordinateFunction · 0.85
rejectMethod · 0.80
textMethod · 0.80
GetPointMethod · 0.45
SetPointMethod · 0.45
acceptMethod · 0.45

Tested by

no test coverage detected