15 #ifndef BORNAGAIN_GUI_VIEW_MASK_POLYGONVIEW_H
16 #define BORNAGAIN_GUI_VIEW_MASK_POLYGONVIEW_H
40 QPainterPath
shape()
const override;
50 void paint(QPainter* painter,
const QStyleOptionGraphicsItem*, QWidget*)
override;
51 QVariant
itemChange(GraphicsItemChange change,
const QVariant& value)
override;
Defines interface IShape2DView.
Main interface class for views representing MaskItems, Projections on graphics scene.
This is a View of polygon mask (represented by PolygonItem) on GraphicsScene.
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
void onClosePolygonRequest(bool value)
bool closePolygonIfNecessary()
Returns true if there was a request to close polygon (emitted by its start point),...
void onItemDestroyed() override
int type() const override
PolygonView(PolygonItem *item)
bool m_close_polygon_request
QPointF lastAddedPoint() const
Returns last added poligon point in scene coordinates.
void addView(IShape2DView *childView, int row) override
void update_view() override
void update_polygon()
Runs through all PolygonPointItem and calculate bounding rectangle. Determines position of the rectan...
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override
QPainterPath shape() const override
void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override
SessionItem * parameterizedItem() const override
void update_points()
When polygon moves as a whole thing across the scene, given method updates coordinates of PolygonPoin...
bool m_block_on_point_update
void setChildrenVisible(bool value)
Base class for a GUI data item.