Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkLinearScaleQuestionWidget.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef QmitkLinearScaleQuestionWidget_h
14 #define QmitkLinearScaleQuestionWidget_h
15 
16 #include <QmitkQuestionWidget.h>
18 
19 class QButtonGroup;
20 class QGridLayout;
21 class QPushButton;
22 
32 {
33  Q_OBJECT
34 
35 public:
40  explicit QmitkLinearScaleQuestionWidget(QWidget* parent = nullptr);
41 
45 
51  QmitkQuestionWidget* CreateAnother(QWidget* parent = nullptr) const override;
52 
58 
64  void SetQuestion(mitk::Forms::Question* question) override;
65 
68  void Reset() override;
69 
70 private:
71  void CreateWidgets();
72  void RemoveWidgets();
73 
74  void OnIdClicked(int id);
75  void OnClearButtonClicked();
76 
78 
79  QGridLayout* m_Layout;
80  QButtonGroup* m_ButtonGroup;
81  QPushButton* m_ClearButton;
82 };
83 
84 #endif
#define MITKFORMSUI_EXPORT
Question widget for LinearScaleQuestion, displaying radio buttons on a numeric scale.
QmitkQuestionWidget * CreateAnother(QWidget *parent=nullptr) const override
Create a new QmitkLinearScaleQuestionWidget instance.
void Reset() override
Reset the radio button selection and clear all responses.
~QmitkLinearScaleQuestionWidget() override
Destructor.
QmitkLinearScaleQuestionWidget(QWidget *parent=nullptr)
Construct the widget.
mitk::Forms::Question * GetQuestion() const override
Get the associated LinearScaleQuestion.
void SetQuestion(mitk::Forms::Question *question) override
Initialize the widget for a LinearScaleQuestion.
Abstract base class for all types of question widgets used in a QmitkForm.
A Question whose possible responses are represented by a discrete linear scale.
Abstract base class for all types of questions used in a Form.
Definition: mitkQuestion.h:38