2019-08-25 16:28:08 +08:00
|
|
|
#ifndef QQTBODYRESIZER_P_H
|
|
|
|
#define QQTBODYRESIZER_P_H
|
2019-08-25 11:14:05 +08:00
|
|
|
|
|
|
|
#include <QtCore/qglobal.h>
|
2019-08-25 16:28:08 +08:00
|
|
|
#include <QObject>
|
2019-08-25 11:14:05 +08:00
|
|
|
#include <QMouseEvent>
|
|
|
|
|
2019-08-25 16:28:08 +08:00
|
|
|
class QQtBodyResizer;
|
|
|
|
class QQtBodyResizerPrivate
|
2019-08-25 11:14:05 +08:00
|
|
|
{
|
|
|
|
public:
|
2019-08-25 16:28:08 +08:00
|
|
|
explicit QQtBodyResizerPrivate ( QQtBodyResizer* q );
|
|
|
|
~QQtBodyResizerPrivate();
|
|
|
|
|
|
|
|
enum MoveDirection
|
|
|
|
{
|
|
|
|
None = 0,
|
|
|
|
Left,
|
|
|
|
Right,
|
|
|
|
LeftTop,
|
|
|
|
RightTop,
|
|
|
|
LeftBottom,
|
|
|
|
RightBottom,
|
|
|
|
Top,
|
|
|
|
Bottom,
|
|
|
|
};
|
2019-08-25 11:14:05 +08:00
|
|
|
|
|
|
|
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 );
|
|
|
|
|
2019-08-25 16:28:08 +08:00
|
|
|
protected:
|
|
|
|
virtual void checkDirection ( QMouseEvent* event, QWidget* target = 0 );
|
2019-08-25 11:14:05 +08:00
|
|
|
private:
|
2019-08-25 16:28:08 +08:00
|
|
|
QQtBodyResizer* q_ptr;
|
|
|
|
Q_DECLARE_PUBLIC ( QQtBodyResizer )
|
2019-08-25 11:14:05 +08:00
|
|
|
|
|
|
|
bool bMousePressed;
|
|
|
|
QPoint pressedPoint;
|
2019-08-25 16:28:08 +08:00
|
|
|
|
|
|
|
QMargins margins;
|
|
|
|
MoveDirection direction;
|
2019-08-25 11:14:05 +08:00
|
|
|
};
|
|
|
|
|
2019-08-25 16:28:08 +08:00
|
|
|
#endif //QQTBODYRESIZER_P_H
|