Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkLinearScaleQuestionWidget Class Reference

Question widget for LinearScaleQuestion, displaying radio buttons on a numeric scale. More...

#include <QmitkLinearScaleQuestionWidget.h>

Inheritance diagram for QmitkLinearScaleQuestionWidget:
Collaboration diagram for QmitkLinearScaleQuestionWidget:

Public Member Functions

 QmitkLinearScaleQuestionWidget (QWidget *parent=nullptr)
 Construct the widget. More...
 
 ~QmitkLinearScaleQuestionWidget () override
 Destructor. More...
 
QmitkQuestionWidget * CreateAnother (QWidget *parent=nullptr) const override
 Create a new QmitkLinearScaleQuestionWidget instance. More...
 
mitk::Forms::Question * GetQuestion () const override
 Get the associated LinearScaleQuestion. More...
 
void SetQuestion (mitk::Forms::Question *question) override
 Initialize the widget for a LinearScaleQuestion. More...
 
void Reset () override
 Reset the radio button 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 LinearScaleQuestion, displaying radio buttons on a numeric scale.

The widget renders a row of radio buttons between the range bounds with optional low-end and high-end labels. A "Clear selection" button appears after an option is selected (unless the question is required).

See also
mitk::Forms::LinearScaleQuestion, QmitkQuestionWidget

Definition at line 31 of file QmitkLinearScaleQuestionWidget.h.

Constructor & Destructor Documentation

◆ QmitkLinearScaleQuestionWidget()

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

Construct the widget.

Parameters
[in]parentThe parent widget.

◆ ~QmitkLinearScaleQuestionWidget()

QmitkLinearScaleQuestionWidget::~QmitkLinearScaleQuestionWidget ( )
override

Destructor.

Member Function Documentation

◆ CreateAnother()

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

Create a new QmitkLinearScaleQuestionWidget instance.

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

Implements QmitkQuestionWidget.

◆ GetQuestion()

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

Get the associated LinearScaleQuestion.

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

Implements QmitkQuestionWidget.

◆ Reset()

void QmitkLinearScaleQuestionWidget::Reset ( )
overridevirtual

Reset the radio button selection and clear all responses.

Implements QmitkQuestionWidget.

◆ SetQuestion()

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

Initialize the widget for a LinearScaleQuestion.

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

Implements QmitkQuestionWidget.


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