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

Method OnIdToggled

Modules/FormsUI/src/QmitkCheckboxesQuestionWidget.cpp:132–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132void QmitkCheckboxesQuestionWidget::OnIdToggled(int id, bool checked)
133{
134 if (checked)
135 {
136 if (id == m_OtherId)
137 {
138 m_Question->AddOtherResponse(m_OtherLineEdit->text().toStdString());
139 m_OtherLineEdit->setFocus();
140 }
141 else
142 {
143 m_Question->AddResponse(static_cast<size_t>(id));
144 }
145 }
146 else
147 {
148 if (id == m_OtherId)
149 {
150 m_Question->RemoveOtherResponse();
151 }
152 else
153 {
154 m_Question->RemoveResponse(static_cast<size_t>(id));
155 }
156 }
157
158 if (m_Question->IsRequired())
159 this->SetRequirementVisible(!m_Question->IsComplete());
160}
161
162void QmitkCheckboxesQuestionWidget::OnTextEdited(const QString&)
163{

Callers

nothing calls this directly

Calls 8

AddOtherResponseMethod · 0.80
textMethod · 0.80
AddResponseMethod · 0.80
RemoveOtherResponseMethod · 0.80
RemoveResponseMethod · 0.80
IsRequiredMethod · 0.80
SetRequirementVisibleMethod · 0.80
IsCompleteMethod · 0.45

Tested by

no test coverage detected