Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkDropdownQuestionWidget Class Reference

Question widget for DropdownQuestion, displaying options in a QComboBox. More...

#include <QmitkDropdownQuestionWidget.h>

Inheritance diagram for QmitkDropdownQuestionWidget:
Collaboration diagram for QmitkDropdownQuestionWidget:

Public Member Functions

 QmitkDropdownQuestionWidget (QWidget *parent=nullptr)
 Construct the widget. More...
 
 ~QmitkDropdownQuestionWidget () override
 Destructor. More...
 
QmitkQuestionWidget * CreateAnother (QWidget *parent=nullptr) const override
 Create a new QmitkDropdownQuestionWidget instance. More...
 
mitk::Forms::Question * GetQuestion () const override
 Get the associated DropdownQuestion. More...
 
void SetQuestion (mitk::Forms::Question *question) override
 Initialize the widget for a DropdownQuestion. More...
 
void Reset () override
 Reset the combo box selection and clear all responses. More...
 
- Public Member Functions inherited from QmitkQuestionWidget
 QmitkQuestionWidget (QWidget *parent=nullptr)
 Construct the question widget with common GUI elements. More...
 
 ~QmitkQuestionWidget () override
 Destructor. More...
 
void SetRequirementVisible (bool visible)
 Show or hide the requirement reminder. More...
 
void ShowRequirement ()
 Show the requirement reminder label and highlight the widget border in red. More...
 
void HideRequirement ()
 Hide the requirement reminder label and reset the widget border style. More...
 

Additional Inherited Members

- Protected Member Functions inherited from QmitkQuestionWidget
void InsertLayout (QLayout *layout)
 Insert a layout containing all GUI elements specific to the derived question widget type. More...
 

Detailed Description

Question widget for DropdownQuestion, displaying options in a QComboBox.

The combo box shows a "Choose" placeholder item followed by a separator and the actual options. Only a single option may be selected at a time.

See also
mitk::Forms::DropdownQuestion, QmitkQuestionWidget

Definition at line 28 of file QmitkDropdownQuestionWidget.h.

Constructor & Destructor Documentation

◆ QmitkDropdownQuestionWidget()

QmitkDropdownQuestionWidget::QmitkDropdownQuestionWidget ( QWidget *  parent = nullptr)
explicit

Construct the widget.

Parameters
[in]parentThe parent widget.

◆ ~QmitkDropdownQuestionWidget()

QmitkDropdownQuestionWidget::~QmitkDropdownQuestionWidget ( )
override

Destructor.

Member Function Documentation

◆ CreateAnother()

QmitkQuestionWidget* QmitkDropdownQuestionWidget::CreateAnother ( QWidget *  parent = nullptr) const
overridevirtual

Create a new QmitkDropdownQuestionWidget instance.

Parameters
[in]parentThe parent widget.
Returns
A pointer to the new widget. The caller takes ownership.

Implements QmitkQuestionWidget.

◆ GetQuestion()

mitk::Forms::Question* QmitkDropdownQuestionWidget::GetQuestion ( ) const
overridevirtual

Get the associated DropdownQuestion.

Returns
A pointer to the DropdownQuestion, or nullptr if not set.

Implements QmitkQuestionWidget.

◆ Reset()

void QmitkDropdownQuestionWidget::Reset ( )
overridevirtual

Reset the combo box selection and clear all responses.

Implements QmitkQuestionWidget.

◆ SetQuestion()

void QmitkDropdownQuestionWidget::SetQuestion ( mitk::Forms::Question *  question)
overridevirtual

Initialize the widget for a DropdownQuestion.

Parameters
[in]questionMust be a DropdownQuestion. The widget does not take ownership.
Exceptions
mitk::ExceptionIf question is not a DropdownQuestion.

Implements QmitkQuestionWidget.


The documentation for this class was generated from the following file: