OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
OverlayWidgetBase.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OpenTwin header
10#include "OTGui/GuiTypes.h"
12
13// Qt header
14#include <QtWidgets/qframe.h>
15
16namespace ot {
17
22 public:
23 OverlayWidgetBase(QWidget* _parent, Alignment _overlayAlignment, const QMargins& _overlayMargins = QMargins());
24 virtual ~OverlayWidgetBase();
25
26 void setOverlayMargins(const QMargins& _margins) { m_margins = _margins; this->updateOverlayGeometry(); };
27 const QMargins& overlayMargins(void) const { return m_margins; };
28
29 void setOverlayHidden(bool _hidden) { m_hidden = _hidden; this->updateOverlayGeometry(); };
30
31 protected:
32 virtual bool eventFilter(QObject* _watched, QEvent* _event) override;
33
34 private:
35 void updateOverlayGeometry(void);
36
37 bool m_hidden;
38 QMargins m_margins;
39 Alignment m_alignment;
40 QWidget* m_parent;
41 };
42
43}
This file contains defines that may be used simplyfy class creation.
#define OT_DECL_NODEFAULT(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:22
#define OT_DECL_NOCOPY(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:14
#define OT_WIDGETS_API_EXPORT
Definition OTWidgetsAPIExport.h:12
Definition OverlayWidgetBase.h:19
void setOverlayHidden(bool _hidden)
Definition OverlayWidgetBase.h:29
void setOverlayMargins(const QMargins &_margins)
Definition OverlayWidgetBase.h:26
const QMargins & overlayMargins(void) const
Definition OverlayWidgetBase.h:27
Definition Connector.h:8
Alignment
Alignment.
Definition GuiTypes.h:21