Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkScreenshotWidget.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 QmitkScreenshotWidget_h
14 #define QmitkScreenshotWidget_h
15 
16 #include <QWidget>
17 #include <memory>
18 
19 namespace Ui
20 {
22 }
23 
31 class QmitkScreenshotWidget : public QWidget
32 {
33  Q_OBJECT
34 
35 public:
40  explicit QmitkScreenshotWidget(QWidget* parent = nullptr);
41 
47  explicit QmitkScreenshotWidget(const QString& screenshotPath, QWidget* parent = nullptr);
49 
54  void SetScreenshot(const QString& path);
55 
57  QString GetScreenshotPath() const;
58 
59 signals:
65 
66 private:
67  void OnRemoveButtonClicked();
68 
69  std::unique_ptr<Ui::QmitkScreenshotWidget> m_Ui;
70  QString m_ScreenshotPath;
71 };
72 
73 #endif
Widget that displays a screenshot thumbnail with a remove button.
QString GetScreenshotPath() const
Return the file path of the currently displayed screenshot.
QmitkScreenshotWidget(const QString &screenshotPath, QWidget *parent=nullptr)
Construct a screenshot widget with an initial screenshot.
QmitkScreenshotWidget(QWidget *parent=nullptr)
Construct an empty screenshot widget.
void Remove(QmitkScreenshotWidget *sender)
Emitted when the user clicks the remove button.
void SetScreenshot(const QString &path)
Set the screenshot image to display.
~QmitkScreenshotWidget() override