9static const int OUTER_HITBOX_SIZE = 10;
10static const QMargins WIDGET_MARGIN(20, 20, 20, 20);
11static const QMargins CENTER_HITBOX_MARGIN(15, 15, 15, 15);
63 QRect mapRectFromParent(QRect);
64 static QRect squareByCenter(QPoint,
int);
65 QMap<DragDirection, QPoint> outerHitboxPositions();
66 QMap<DragDirection, QRect> hitboxes();
71 bool mouse_pressed =
false;
73 QPointF last_global_position;
void changedDelta(DragDirection, QPointF)
void mouseMoveEvent(QMouseEvent *) override
Definition resizeboundingbox.cpp:127
ResizeBoundingBox(QWidget *parent=nullptr)
Definition resizeboundingbox.cpp:3
void setBoxGeometry(QRect box_geometry)
Definition resizeboundingbox.cpp:9
void setBoxMinimumSize(QSize size)
Definition resizeboundingbox.cpp:15
void mousePressEvent(QMouseEvent *) override
Definition resizeboundingbox.cpp:141
void mouseReleaseEvent(QMouseEvent *) override
Definition resizeboundingbox.cpp:154
void paintEvent(QPaintEvent *) override
Definition resizeboundingbox.cpp:23
DragDirection
Definition resizeboundingbox.hpp:13
@ NorthWest
Definition resizeboundingbox.hpp:14
@ South
Definition resizeboundingbox.hpp:19
@ Center
Definition resizeboundingbox.hpp:22
@ North
Definition resizeboundingbox.hpp:15
@ None
Definition resizeboundingbox.hpp:23
@ NorthEast
Definition resizeboundingbox.hpp:16
@ SouthEast
Definition resizeboundingbox.hpp:18
@ East
Definition resizeboundingbox.hpp:17
@ West
Definition resizeboundingbox.hpp:21
@ SouthWest
Definition resizeboundingbox.hpp:20