Medical Imaging Interaction Toolkit  2021.10.99-9c07a326
Medical Imaging Interaction Toolkit
QmitkSimpleTextOverlayWidget.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 QMITK_SIMPLE_TEXT_OVERLAY_WIDGET_H
14 #define QMITK_SIMPLE_TEXT_OVERLAY_WIDGET_H
15 
16 #include "QmitkOverlayWidget.h"
17 #include <MitkQtWidgetsExports.h>
18 
23 {
24  Q_OBJECT
25  Q_PROPERTY(QString overlayText READ GetOverlayText WRITE SetOverlayText)
26 
27 public:
28  explicit QmitkSimpleTextOverlayWidget(QWidget* parent = nullptr);
29  ~QmitkSimpleTextOverlayWidget() override;
30 
31  QString GetOverlayText() const;
32  void SetOverlayText(const QString& text);
33 
34 protected:
35  void paintEvent(QPaintEvent* event) override;
36 
37 private:
38  QString m_Text;
39 };
40 
41 #endif
void paintEvent(QPaintEvent *event) override
#define MITKQTWIDGETS_EXPORT