1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00
LibQQt/test/testbodyresizer/qqtbodyresizer_p.h
tianduanrui 4aa199b715 add qqtbodyresizer.
remove qqtframelesshelper
2019-08-25 16:28:08 +08:00

47 lines
1.0 KiB
C++

#ifndef QQTBODYRESIZER_P_H
#define QQTBODYRESIZER_P_H
#include <QtCore/qglobal.h>
#include <QObject>
#include <QMouseEvent>
class QQtBodyResizer;
class QQtBodyResizerPrivate
{
public:
explicit QQtBodyResizerPrivate ( QQtBodyResizer* q );
~QQtBodyResizerPrivate();
enum MoveDirection
{
None = 0,
Left,
Right,
LeftTop,
RightTop,
LeftBottom,
RightBottom,
Top,
Bottom,
};
public:
virtual void mousePressEvent ( QMouseEvent* event, QWidget* target = 0 );
virtual void mouseReleaseEvent ( QMouseEvent* event, QWidget* target = 0 );
virtual void mouseMoveEvent ( QMouseEvent* event, QWidget* target = 0 );
protected:
virtual void checkDirection ( QMouseEvent* event, QWidget* target = 0 );
private:
QQtBodyResizer* q_ptr;
Q_DECLARE_PUBLIC ( QQtBodyResizer )
bool bMousePressed;
QPoint pressedPoint;
QMargins margins;
MoveDirection direction;
};
#endif //QQTBODYRESIZER_P_H