Medical Imaging Interaction Toolkit
2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
|
Abstract base class for all types of question widgets used in a QmitkForm. More...
#include <QmitkQuestionWidget.h>
Public Member Functions | |
QmitkQuestionWidget (QWidget *parent=nullptr) | |
~QmitkQuestionWidget () override | |
void | SetRequirementVisible (bool visible) |
void | ShowRequirement () |
void | HideRequirement () |
Pure virtual functions | |
QmitkQuestionWidget is an abstract base class. Derive from this class to add a widget for a certain type of Question and override the following pure virtual functions. Please read the full documentation for all of these functions to fully understand implications and requirements. Do not forget to register any new question widget by calling mitk::Forms::UI::IQuestionWidgetFactory::Register() like it is done in this module's activator class. | |
virtual QmitkQuestionWidget * | CreateAnother (QWidget *parent=nullptr) const =0 |
Create a new instance of the derived question widget class type. More... | |
virtual mitk::Forms::Question * | GetQuestion () const =0 |
Get the question associated with this widget. More... | |
virtual void | SetQuestion (mitk::Forms::Question *question)=0 |
Initialize the widget based on the given question. More... | |
virtual void | Reset ()=0 |
Reset the state of the GUI as if no interaction would have been happened yet. More... | |
Protected Member Functions | |
void | InsertLayout (QLayout *layout) |
Insert a layout containing all GUI elements specific to the derived question widget type. More... | |
Abstract base class for all types of question widgets used in a QmitkForm.
This class manages GUI elements common to all questions like labels for the question text and a reminder that a response might be required. All specific GUI elements of derived classes must be put into a layout and inserted by calling InsertLayout().
Please make sure to read the full documentation of the pure virtual functions in particular to fully understand implications and requirements.
Definition at line 36 of file QmitkQuestionWidget.h.
|
explicit |
|
override |
|
pure virtual |
Create a new instance of the derived question widget class type.
This method is mainly used by mitk::Forms::UI::IQuestionWidgetFactory to create new instances from registered prototype instances.
Implemented in QmitkMultipleChoiceQuestionWidget, QmitkScreenshotQuestionWidget, QmitkCheckboxesQuestionWidget, QmitkLinearScaleQuestionWidget, QmitkDropdownQuestionWidget, QmitkParagraphQuestionWidget, and QmitkShortAnswerQuestionWidget.
|
pure virtual |
Get the question associated with this widget.
Implemented in QmitkMultipleChoiceQuestionWidget, QmitkScreenshotQuestionWidget, QmitkCheckboxesQuestionWidget, QmitkLinearScaleQuestionWidget, QmitkDropdownQuestionWidget, QmitkParagraphQuestionWidget, and QmitkShortAnswerQuestionWidget.
void QmitkQuestionWidget::HideRequirement | ( | ) |
|
protected |
Insert a layout containing all GUI elements specific to the derived question widget type.
This method is typically called from the constructor of a derived class after all GUI elements have been set up and organized in a layout.
|
pure virtual |
Reset the state of the GUI as if no interaction would have been happened yet.
Implemented in QmitkMultipleChoiceQuestionWidget, QmitkScreenshotQuestionWidget, QmitkCheckboxesQuestionWidget, QmitkLinearScaleQuestionWidget, QmitkDropdownQuestionWidget, QmitkParagraphQuestionWidget, and QmitkShortAnswerQuestionWidget.
|
pure virtual |
Initialize the widget based on the given question.
This method is rarely used explicitly since it is automatically called by mitk::Forms::UI::IQuestionWidgetFactory::Create().
You are excepted to throw an mitk::Exception if the Question type does not match the expectations of the widget.
Implemented in QmitkMultipleChoiceQuestionWidget, QmitkScreenshotQuestionWidget, QmitkCheckboxesQuestionWidget, QmitkLinearScaleQuestionWidget, QmitkDropdownQuestionWidget, QmitkParagraphQuestionWidget, and QmitkShortAnswerQuestionWidget.
void QmitkQuestionWidget::SetRequirementVisible | ( | bool | visible | ) |
void QmitkQuestionWidget::ShowRequirement | ( | ) |