MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
draggableframelesswidget.h
Go to the documentation of this file.
1//=============================================================================================================
35#ifndef DRAGGABLEFRAMELESSWIDGET_H
36#define DRAGGABLEFRAMELESSWIDGET_H
37
38//=============================================================================================================
39// INCLUDES
40//=============================================================================================================
41
42#include "../../disp_global.h"
43
44//=============================================================================================================
45// QT INCLUDES
46//=============================================================================================================
47
48#include <QWidget>
49
50//=============================================================================================================
51// EIGEN INCLUDES
52//=============================================================================================================
53
54//=============================================================================================================
55// FORWARD DECLARATIONS
56//=============================================================================================================
57
58//=============================================================================================================
59// DEFINE NAMESPACE DISPLIB
60//=============================================================================================================
61
62namespace DISPLIB
63{
64
65//=============================================================================================================
66// DISPLIB FORWARD DECLARATIONS
67//=============================================================================================================
68
69//=============================================================================================================
76{
77 Q_OBJECT
78
79public:
80 typedef QSharedPointer<DraggableFramelessWidget> SPtr;
81 typedef QSharedPointer<const DraggableFramelessWidget> ConstSPtr;
83 //=========================================================================================================
93 DraggableFramelessWidget(QWidget *parent = 0,
94 Qt::WindowFlags flags = Qt::Window,
95 bool bRoundEdges = false,
96 bool bDraggable = true,
97 bool bFrameless = true);
98
99 //=========================================================================================================
104
105 //=========================================================================================================
111 void setDraggable(bool bFlag);
112
113protected:
114 //=========================================================================================================
118 void mouseMoveEvent(QMouseEvent *event);
119
120 //=========================================================================================================
124 void mousePressEvent(QMouseEvent *event);
125
126 //=========================================================================================================
130 void mouseReleaseEvent(QMouseEvent *event);
131
132 //=========================================================================================================
136 void resizeEvent(QResizeEvent *event);
137
138 //=========================================================================================================
146 QRegion roundedRect(const QRect& rect, int r);
147
148private:
149 QPoint m_dragPosition;
150 bool m_bRoundEdges;
151 bool m_bDraggable;
152 bool m_bMousePressed;
153};
154} // NAMESPACE DISPLIB
155
156#endif // DRAGGABLEFRAMELESSWIDGET_H
#define DISPSHARED_EXPORT
Definition disp_global.h:55
The DraggableFramelessWidget class provides draggable and frameless QWidget.
QSharedPointer< DraggableFramelessWidget > SPtr
QSharedPointer< const DraggableFramelessWidget > ConstSPtr