Question widget for MultipleChoiceQuestion, displaying radio buttons with an optional "Other" field.
More...
#include <QmitkMultipleChoiceQuestionWidget.h>
|
| void | InsertLayout (QLayout *layout) |
| | Insert a layout containing all GUI elements specific to the derived question widget type. More...
|
| |
Question widget for MultipleChoiceQuestion, displaying radio buttons with an optional "Other" field.
Each option is shown as a radio button. If the question has an "Other" option enabled, an additional radio button with a text field is shown. A "Clear selection" button appears after a selection is made (unless the question is required).
- See also
- mitk::Forms::MultipleChoiceQuestion, QmitkQuestionWidget
Definition at line 32 of file QmitkMultipleChoiceQuestionWidget.h.
◆ QmitkMultipleChoiceQuestionWidget()
| QmitkMultipleChoiceQuestionWidget::QmitkMultipleChoiceQuestionWidget |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
Construct the widget.
- Parameters
-
| [in] | parent | The parent widget. |
◆ ~QmitkMultipleChoiceQuestionWidget()
| QmitkMultipleChoiceQuestionWidget::~QmitkMultipleChoiceQuestionWidget |
( |
| ) |
|
|
override |
◆ CreateAnother()
| QmitkQuestionWidget* QmitkMultipleChoiceQuestionWidget::CreateAnother |
( |
QWidget * |
parent = nullptr | ) |
const |
|
overridevirtual |
◆ GetQuestion()
Get the associated MultipleChoiceQuestion.
- Returns
- A pointer to the MultipleChoiceQuestion, or
nullptr if not set.
Implements QmitkQuestionWidget.
◆ Reset()
| void QmitkMultipleChoiceQuestionWidget::Reset |
( |
| ) |
|
|
overridevirtual |
Reset the radio button selection, clear the "Other" text, and clear all responses.
Implements QmitkQuestionWidget.
◆ SetQuestion()
Initialize the widget for a MultipleChoiceQuestion.
- Parameters
-
| [in] | question | Must be a MultipleChoiceQuestion. The widget does not take ownership. |
- Exceptions
-
Implements QmitkQuestionWidget.
The documentation for this class was generated from the following file: