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

Method UpdateQuestionWidgets

Modules/FormsUI/src/QmitkForm.cpp:257–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255}
256
257void QmitkForm::UpdateQuestionWidgets()
258{
259 if (m_HasBeenSubmitted || m_Ui->sectionWidget->currentIndex() == -1)
260 {
261 m_Ui->sectionWidget->hide();
262 return;
263 }
264 else
265 {
266 m_Ui->sectionWidget->show();
267 }
268
269 int currentSectionIndex = m_Ui->sectionWidget->currentIndex();
270 int numberOfSections = m_Ui->sectionWidget->count();
271
272 for (int sectionIndex = 0; sectionIndex < numberOfSections; ++sectionIndex)
273 {
274 auto sectionWidget = m_Ui->sectionWidget->widget(sectionIndex);
275 auto questionWidgets = sectionWidget->findChildren<QmitkQuestionWidget*>();
276
277 for (auto questionWidget : questionWidgets)
278 questionWidget->setVisible(sectionIndex == currentSectionIndex);
279 }
280}
281
282void QmitkForm::UpdateFormButtons()
283{

Callers 1

UpdateMethod · 0.95

Calls 2

showMethod · 0.80
countMethod · 0.80

Tested by

no test coverage detected