Medical Imaging Interaction Toolkit  2021.10.99-9c07a326
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 QMITK_OVERLAY_WIDGET_H
14 #define QMITK_OVERLAY_WIDGET_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
#define MITKQTWIDGETS_EXPORT