15 #ifndef BORNAGAIN_GUI_COREGUI_VIEWS_MASKWIDGETS_POLYGONVIEW_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_MASKWIDGETS_POLYGONVIEW_H
43 void paint(QPainter* painter,
const QStyleOptionGraphicsItem*, QWidget*);
44 QVariant
itemChange(GraphicsItemChange change,
const QVariant& value);
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 onClosePolygonRequest(bool value)
bool closePolygonIfNecessary()
Returns true if there was a request to close polygon (emitted by its start point),...
void addView(IShape2DView *childView, int row)
bool m_close_polygon_request
QPointF lastAddedPoint() const
returns last added poligon point in scene coordinates
void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
void update_polygon()
Runs through all PolygonPointItem and calculate bounding rectangle.
QVariant itemChange(GraphicsItemChange change, const QVariant &value)
void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
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)