Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkScreenshotQuestionWidget.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 QmitkScreenshotQuestionWidget_h
14 #define QmitkScreenshotQuestionWidget_h
15 
16 #include <QmitkQuestionWidget.h>
17 #include <mitkScreenshotQuestion.h>
18 
20 
21 class QMenu;
22 class QPushButton;
23 
32 {
33  Q_OBJECT
34 
35 public:
40  explicit QmitkScreenshotQuestionWidget(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 OnTakeScreenshotButtonClicked();
72  void OnPopupMenuTriggered(const QString& action);
73  void AddScreenshotWidget(const QString& screenshotFileName);
74  void OnRemoveScreenshot(QmitkScreenshotWidget* sender);
75 
77 
78  QVBoxLayout* m_Layout;
79  QPushButton* m_TakeScreenshotButton;
80  QMenu* m_PopupMenu;
81 };
82 
83 #endif
#define MITKFORMSUI_EXPORT
Abstract base class for all types of question widgets used in a QmitkForm.
Question widget for ScreenshotQuestion, allowing users to take screenshots of render windows.
void Reset() override
Remove all screenshot widgets and clear all responses.
QmitkScreenshotQuestionWidget(QWidget *parent=nullptr)
Construct the widget.
mitk::Forms::Question * GetQuestion() const override
Get the associated ScreenshotQuestion.
~QmitkScreenshotQuestionWidget() override
Destructor.
void SetQuestion(mitk::Forms::Question *question) override
Initialize the widget for a ScreenshotQuestion.
QmitkQuestionWidget * CreateAnother(QWidget *parent=nullptr) const override
Create a new QmitkScreenshotQuestionWidget instance.
Widget that displays a screenshot thumbnail with a remove button.
Abstract base class for all types of questions used in a Form.
Definition: mitkQuestion.h:38
A Question whose responses are screenshot image files.