15 #ifndef BORNAGAIN_GUI_COREGUI_VIEWS_MASKWIDGETS_RECTANGLEBASEVIEW_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_MASKWIDGETS_RECTANGLEBASEVIEW_H
36 QVariant
itemChange(GraphicsItemChange change,
const QVariant& value);
43 virtual qreal
left()
const = 0;
44 virtual qreal
right()
const = 0;
45 virtual qreal
top()
const = 0;
Defines interface IShape2DView.
Defines SizeHandleElement class.
Main interface class for views representing MaskItems, Projections on graphics scene.
Base view for all rectangular-like masks.
void create_size_handle_elements()
virtual qreal right() const =0
virtual QRectF mask_rectangle()=0
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
SizeHandleElement * m_activeHandleElement
virtual qreal top() const =0
QRectF m_mask_rect
mask rectangle in scene coordinates
qreal width() const
returns width of the rectangle
QVariant itemChange(GraphicsItemChange change, const QVariant &value)
Track if item selected/deselected and show/hide size handles.
void onSizeHandleElementRequest(bool going_to_resize)
triggered by SizeHandleElement
virtual void update_position()=0
QMap< SizeHandleElement::EHandleLocation, SizeHandleElement * > m_resize_handles
coordinates of corner opposite to the grip corner at the moment it first clicked in scene coordinates
void update_view()
update visual appearance of view (triggered by ISceneAdaptor)
virtual void update_bounding_rect()
updates view's bounding rectangle using item properties
QPointF m_resize_opposite_origin
virtual qreal left() const =0
virtual qreal bottom() const =0
Size handle on top of RectangleView represented as small circle or small rectangle.