25 lines
516 B
C++
25 lines
516 B
C++
#ifndef RM_WIDGET_DRAG_H
|
|
#define RM_WIDGET_DRAG_H
|
|
|
|
#include "../rm_include.h"
|
|
//#include <QWidget>
|
|
|
|
class RMWidgetDrag : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit RMWidgetDrag(QWidget *target,int titleBarHeight);
|
|
~RMWidgetDrag();
|
|
private:
|
|
int _titleBarHeight;
|
|
QWidget* _target;
|
|
bool _dragStart;
|
|
QPoint _dragPos;
|
|
bool eventFilter(QObject *o, QEvent *e) override;
|
|
signals:
|
|
void onWindowMove();
|
|
public slots:
|
|
};
|
|
|
|
#endif // RM_WIDGET_DRAG_H
|