Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
QmitkOverlayWidget.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 QmitkOverlayWidget_h
14 #define QmitkOverlayWidget_h
15 
16 #include <QWidget>
17 
18 #include <MitkQtWidgetsExports.h>
19 
24 {
25  Q_OBJECT
26  Q_PROPERTY(bool transparentForMouseEvents READ isTransparentForMouseEvents WRITE setTransparentForMouseEvents)
27 
28 public:
29  explicit QmitkOverlayWidget(QWidget* parent = nullptr);
30  ~QmitkOverlayWidget() override;
31 
32  bool isTransparentForMouseEvents() const;
33  void setTransparentForMouseEvents(bool transparent = true);
34 
35 protected:
36  bool event(QEvent* e) override;
37  bool eventFilter(QObject* watched, QEvent* event) override;
38  void paintEvent(QPaintEvent* event) override;
39 
40 private:
41  void installEventFilterOnParent();
42  void removeEventFilterFromParent();
43 };
44 
45 #endif
MITKQTWIDGETS_EXPORT
#define MITKQTWIDGETS_EXPORT
Definition: MitkQtWidgetsExports.h:15
QmitkOverlayWidget
Definition: QmitkOverlayWidget.h:23
MitkQtWidgetsExports.h