| 130 | } |
| 131 | |
| 132 | void 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 | |
| 162 | void QmitkCheckboxesQuestionWidget::OnTextEdited(const QString&) |
| 163 | { |
nothing calls this directly
no test coverage detected