15 #ifndef BORNAGAIN_GUI_VIEW_MASK_RECTANGLEBASEVIEW_H
16 #define BORNAGAIN_GUI_VIEW_MASK_RECTANGLEBASEVIEW_H
36 QVariant
itemChange(GraphicsItemChange change,
const QVariant& value)
override;
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
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.
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
void onSizeHandleElementRequest(bool going_to_resize)
triggered by SizeHandleElement
int type() const override
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override
Track if item selected/deselected and show/hide size handles.
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
virtual void update_bounding_rect()
updates view's bounding rectangle using item properties
void update_view() override
update visual appearance of view (triggered by ISceneAdaptor)
QPointF m_resize_opposite_origin
virtual qreal left() const =0
RectangleBaseView(SessionItem *item)
virtual qreal bottom() const =0
Base class for a GUI data item.
Size handle on top of RectangleView represented as small circle or small rectangle....