15 #ifndef BORNAGAIN_GUI_VIEW_MASK_SIZEHANDLEELEMENT_H
16 #define BORNAGAIN_GUI_VIEW_MASK_SIZEHANDLEELEMENT_H
20 #include <QGraphicsObject>
63 void paint(QPainter* painter,
const QStyleOptionGraphicsItem*, QWidget*)
override;
70 static QMap<EHandleLocation, Qt::CursorShape>
m_cursors;
Defines class MaskEditorHelper.
Size handle on top of RectangleView represented as small circle or small rectangle....
EHandleLocation m_handleLocation
QRectF boundingRect() const override
void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override
SizeHandleElement(EHandleLocation pointType, QGraphicsObject *parent=nullptr)
static QMap< EHandleLocation, EHandleType > m_location_to_type
static QMap< EHandleLocation, Qt::CursorShape > m_cursors
void resize_request(bool going_to_resize)
void updateHandleElementPosition(const QRectF &rect)
set position from location type using coordinates of external rectangle
virtual void update_view()
static QMap< EHandleLocation, EHandleLocation > m_opposite_handle_location
EHandleType getHandleType() const
EHandleLocation getHandleLocation() const
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
int type() const override
void mousePressEvent(QGraphicsSceneMouseEvent *event) override
EHandleLocation getOppositeHandleLocation() const