BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
The RegionOfInterest class represent view of RegionOfInterestItem on graphics scene.
Definition at line 24 of file RegionOfInterestView.h.
Public Member Functions | |
RegionOfInterestView (RegionOfInterestItem *item) | |
virtual void | addView (IShape2DView *childView, int row=0) |
QRectF | boundingRect () const override |
SessionItem * | parameterizedItem () const override |
void | setSceneAdaptor (const ISceneAdaptor *adaptor) |
QPainterPath | shape () const override |
int | type () const override |
Protected Slots | |
void | onChangedX () override |
void | onChangedY () override |
void | onPropertyChange () override |
void | update_view () override |
Protected Member Functions | |
bool | blockOnProperty () const |
qreal | bottom () const override |
Returns the y-coordinate of the rectangle's bottom edge. More... | |
void | create_size_handle_elements () |
void | disconnectFromItem (SessionItem *item) |
qreal | fromSceneX (qreal value) const |
convert scene coordinates to ColorMap plot coordinates More... | |
qreal | fromSceneY (qreal value) const |
qreal | height () const |
QVariant | itemChange (GraphicsItemChange change, const QVariant &value) override |
Track if item selected/deselected and show/hide size handles. More... | |
qreal | left () const override |
Returns the x-coordinate of the rectangle's left edge. More... | |
QRectF | mask_rectangle () override |
QPainterPath | maskedShape () const |
Returns the shape with all masking already applied. More... | |
void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) override |
void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override |
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override |
qreal | right () const override |
Returns the x-coordinate of the rectangle's right edge. More... | |
void | setBlockOnProperty (bool value) |
qreal | top () const override |
Returns the y-coordinate of the rectangle's top edge. More... | |
qreal | toSceneX (qreal value) const |
qreal | toSceneY (qreal value) const |
virtual void | update_bounding_rect () |
updates view's bounding rectangle using item properties More... | |
void | update_position () override |
updates position of view using item properties More... | |
qreal | width () const |
Returns width of the rectangle. More... | |
Protected Attributes | |
SizeHandleElement * | m_activeHandleElement |
const ISceneAdaptor * | m_adaptor |
bool | m_block_on_property_change |
QRectF | m_bounding_rect |
QRectF | m_mask_rect |
mask rectangle in scene coordinates More... | |
QMap< SizeHandleElement::EHandleLocation, SizeHandleElement * > | m_resize_handles |
coordinates of corner opposite to the grip corner at the moment it first clicked in scene coordinates More... | |
QPointF | m_resize_opposite_origin |
Private Slots | |
void | onSizeHandleElementRequest (bool going_to_resize) |
triggered by SizeHandleElement More... | |
Private Member Functions | |
void | onItemDestroyed () override |
void | onItemPropertyChange (const QString &propertyName) |
Private Attributes | |
RectangleItem * | m_item |
|
explicit |
Definition at line 20 of file RegionOfInterestView.cpp.
|
virtualinherited |
Reimplemented in PolygonView.
Definition at line 129 of file IShape2DView.cpp.
Referenced by MaskGraphicsScene::updateViews().
|
protectedinherited |
Definition at line 140 of file IShape2DView.cpp.
References IShape2DView::m_block_on_property_change.
|
overrideprotectedvirtualinherited |
Returns the y-coordinate of the rectangle's bottom edge.
Implements RectangleBaseView.
Definition at line 125 of file RectangleView.cpp.
References RectangleView::m_item, IShape2DView::toSceneY(), and RectangleItem::yLow().
|
override |
Definition at line 25 of file RegionOfInterestView.cpp.
References IShape2DView::m_adaptor, and ISceneAdaptor::viewportRectangle().
Referenced by paint().
|
protectedinherited |
Definition at line 103 of file RectangleBaseView.cpp.
References SizeHandleElement::BOTTOMLEFT, SizeHandleElement::BOTTOMMIDLE, SizeHandleElement::BOTTOMRIGHT, RectangleBaseView::m_resize_handles, SizeHandleElement::MIDDLELEFT, SizeHandleElement::MIDDLERIGHT, RectangleBaseView::onSizeHandleElementRequest(), SizeHandleElement::resize_request(), SizeHandleElement::TOPLEFT, SizeHandleElement::TOPMIDDLE, and SizeHandleElement::TOPRIGHT.
Referenced by RectangleBaseView::RectangleBaseView().
|
protectedinherited |
Definition at line 145 of file IShape2DView.cpp.
References SessionItem::mapper(), and ModelMapper::unsubscribe().
Referenced by EllipseView::~EllipseView(), HorizontalLineView::~HorizontalLineView(), MaskAllView::~MaskAllView(), MaskContainerView::~MaskContainerView(), PolygonPointView::~PolygonPointView(), PolygonView::~PolygonView(), RectangleView::~RectangleView(), and VerticalLineView::~VerticalLineView().
|
protectedinherited |
convert scene coordinates to ColorMap plot coordinates
Definition at line 119 of file IShape2DView.cpp.
References ISceneAdaptor::fromSceneX(), and IShape2DView::m_adaptor.
Referenced by EllipseView::mouseMoveEvent(), RectangleView::mouseMoveEvent(), EllipseView::onChangedX(), VerticalLineView::onChangedX(), RectangleView::onChangedX(), and PolygonPointView::updateParameterizedItem().
|
protectedinherited |
Definition at line 124 of file IShape2DView.cpp.
References ISceneAdaptor::fromSceneY(), and IShape2DView::m_adaptor.
Referenced by EllipseView::mouseMoveEvent(), RectangleView::mouseMoveEvent(), EllipseView::onChangedY(), HorizontalLineView::onChangedY(), RectangleView::onChangedY(), and PolygonPointView::updateParameterizedItem().
|
protectedinherited |
Definition at line 98 of file RectangleBaseView.cpp.
References RectangleBaseView::bottom(), and RectangleBaseView::top().
Referenced by EllipseView::mask_rectangle(), RectangleView::mask_rectangle(), and EllipseView::mouseMoveEvent().
|
overrideprotectedinherited |
Track if item selected/deselected and show/hide size handles.
Definition at line 51 of file RectangleBaseView.cpp.
References RectangleBaseView::m_resize_handles.
|
overrideprotectedvirtualinherited |
Returns the x-coordinate of the rectangle's left edge.
Implements RectangleBaseView.
Definition at line 104 of file RectangleView.cpp.
References RectangleView::m_item, IShape2DView::toSceneX(), and RectangleItem::xLow().
|
overrideprotectedvirtualinherited |
Implements RectangleBaseView.
Definition at line 97 of file RectangleView.cpp.
References RectangleBaseView::height(), and RectangleBaseView::width().
|
protectedinherited |
Returns the shape with all masking already applied.
Definition at line 79 of file IShape2DView.cpp.
References MaskEditorHelper::ELLIPSE, MaskEditorHelper::HORIZONTALLINE, MaskEditorHelper::POLYGON, MaskEditorHelper::RECTANGLE, and MaskEditorHelper::VERTICALLINE.
Referenced by IShape2DView::paint().
|
overrideprotectedinherited |
Definition at line 64 of file RectangleView.cpp.
References IShape2DView::fromSceneX(), IShape2DView::fromSceneY(), SizeHandleElement::getHandleType(), RectangleBaseView::m_activeHandleElement, RectangleView::m_item, RectangleBaseView::m_resize_opposite_origin, SizeHandleElement::RESIZE, SizeHandleElement::RESIZE_HEIGHT, SizeHandleElement::RESIZE_WIDTH, RectangleItem::setXLow(), RectangleItem::setXUp(), RectangleItem::setYLow(), RectangleItem::setYUp(), and RectangleBaseView::update_view().
|
overrideprotectedinherited |
Definition at line 61 of file RectangleBaseView.cpp.
References RectangleBaseView::onSizeHandleElementRequest().
|
overrideprotectedslotinherited |
Definition at line 43 of file RectangleView.cpp.
References IShape2DView::fromSceneX(), RectangleView::m_item, RectangleBaseView::m_mask_rect, IShape2DView::setBlockOnProperty(), RectangleItem::setXLow(), and RectangleItem::setXUp().
|
overrideprotectedslotinherited |
Definition at line 51 of file RectangleView.cpp.
References IShape2DView::fromSceneY(), RectangleView::m_item, RectangleBaseView::m_mask_rect, IShape2DView::setBlockOnProperty(), RectangleItem::setYLow(), and RectangleItem::setYUp().
|
overrideprivatevirtualinherited |
Implements IShape2DView.
Definition at line 130 of file RectangleView.cpp.
References RectangleView::m_item.
|
privateinherited |
Definition at line 151 of file IShape2DView.cpp.
References MaskItem::isIsVisiblePropertyName(), MaskItem::isMaskValuePropertyName(), IShape2DView::m_block_on_property_change, IShape2DView::onPropertyChange(), and IShape2DView::parameterizedItem().
Referenced by IShape2DView::IShape2DView().
|
overrideprotectedslotinherited |
Definition at line 59 of file RectangleView.cpp.
References RectangleBaseView::update_view().
|
privateslotinherited |
triggered by SizeHandleElement
Definition at line 35 of file RectangleBaseView.cpp.
References SizeHandleElement::getOppositeHandleLocation(), RectangleBaseView::m_activeHandleElement, RectangleBaseView::m_resize_handles, and RectangleBaseView::m_resize_opposite_origin.
Referenced by RectangleBaseView::create_size_handle_elements(), and RectangleBaseView::mouseReleaseEvent().
|
overrideprotected |
Definition at line 37 of file RegionOfInterestView.cpp.
References boundingRect(), MaskEditorHelper::getMaskBrush(), and RectangleBaseView::m_mask_rect.
|
overridevirtualinherited |
Implements IShape2DView.
Definition at line 38 of file RectangleView.cpp.
References RectangleView::m_item.
|
overrideprotectedvirtualinherited |
Returns the x-coordinate of the rectangle's right edge.
Implements RectangleBaseView.
Definition at line 111 of file RectangleView.cpp.
References RectangleView::m_item, IShape2DView::toSceneX(), and RectangleItem::xUp().
|
protectedinherited |
Definition at line 135 of file IShape2DView.cpp.
References IShape2DView::m_block_on_property_change.
Referenced by EllipseView::onChangedX(), VerticalLineView::onChangedX(), RectangleView::onChangedX(), EllipseView::onChangedY(), HorizontalLineView::onChangedY(), and RectangleView::onChangedY().
|
inherited |
Definition at line 55 of file IShape2DView.cpp.
References IShape2DView::m_adaptor, ISceneAdaptor::update_request(), and IShape2DView::update_view().
Referenced by MaskViewFactory::createMaskView().
|
overrideinherited |
Definition at line 31 of file RectangleView.cpp.
References RectangleBaseView::m_mask_rect.
|
overrideprotectedvirtualinherited |
Returns the y-coordinate of the rectangle's top edge.
Implements RectangleBaseView.
Definition at line 118 of file RectangleView.cpp.
References RectangleView::m_item, IShape2DView::toSceneY(), and RectangleItem::yUp().
|
protectedinherited |
Definition at line 109 of file IShape2DView.cpp.
References IShape2DView::m_adaptor, and ISceneAdaptor::toSceneX().
Referenced by EllipseView::left(), RectangleView::left(), EllipseView::onPropertyChange(), VerticalLineView::onPropertyChange(), EllipseView::right(), RectangleView::right(), PolygonView::update_polygon(), EllipseView::update_position(), RectangleView::update_position(), and VerticalLineView::update_view().
|
protectedinherited |
Definition at line 114 of file IShape2DView.cpp.
References IShape2DView::m_adaptor, and ISceneAdaptor::toSceneY().
Referenced by EllipseView::bottom(), RectangleView::bottom(), EllipseView::onPropertyChange(), HorizontalLineView::onPropertyChange(), EllipseView::top(), RectangleView::top(), PolygonView::update_polygon(), EllipseView::update_position(), RectangleView::update_position(), and HorizontalLineView::update_view().
|
inlineoverride |
Definition at line 28 of file RegionOfInterestView.h.
References MaskEditorHelper::REGIONOFINTEREST.
|
protectedvirtualinherited |
updates view's bounding rectangle using item properties
Definition at line 76 of file RectangleBaseView.cpp.
References IShape2DView::m_bounding_rect, RectangleBaseView::m_mask_rect, RectangleBaseView::m_resize_handles, RectangleBaseView::mask_rectangle(), IShape2DView::parameterizedItem(), MaskEditorHelper::REGIONOFINTEREST, and RectangleBaseView::type().
Referenced by RectangleBaseView::update_view().
|
overrideprotectedvirtualinherited |
updates position of view using item properties
Implements RectangleBaseView.
Definition at line 91 of file RectangleView.cpp.
References RectangleView::m_item, IShape2DView::toSceneX(), IShape2DView::toSceneY(), RectangleItem::xLow(), and RectangleItem::yUp().
|
overrideprotectedslot |
Definition at line 30 of file RegionOfInterestView.cpp.
References IShape2DView::m_adaptor, IShape2DView::m_bounding_rect, RectangleBaseView::update_view(), and ISceneAdaptor::viewportRectangle().
|
protectedinherited |
Returns width of the rectangle.
Definition at line 93 of file RectangleBaseView.cpp.
References RectangleBaseView::left(), and RectangleBaseView::right().
Referenced by EllipseView::mask_rectangle(), RectangleView::mask_rectangle(), and EllipseView::mouseMoveEvent().
|
protectedinherited |
Definition at line 57 of file RectangleBaseView.h.
Referenced by EllipseView::mouseMoveEvent(), RectangleView::mouseMoveEvent(), and RectangleBaseView::onSizeHandleElementRequest().
|
protectedinherited |
Definition at line 67 of file IShape2DView.h.
Referenced by boundingRect(), IShape2DView::fromSceneX(), IShape2DView::fromSceneY(), IShape2DView::setSceneAdaptor(), IShape2DView::toSceneX(), IShape2DView::toSceneY(), VerticalLineView::update_view(), HorizontalLineView::update_view(), MaskAllView::update_view(), MaskContainerView::update_view(), and update_view().
|
protectedinherited |
Definition at line 69 of file IShape2DView.h.
Referenced by IShape2DView::blockOnProperty(), IShape2DView::onItemPropertyChange(), and IShape2DView::setBlockOnProperty().
|
protectedinherited |
Definition at line 68 of file IShape2DView.h.
Referenced by IShape2DView::boundingRect(), VerticalLineView::paint(), HorizontalLineView::paint(), MaskAllView::paint(), VerticalLineView::shape(), HorizontalLineView::shape(), RectangleBaseView::update_bounding_rect(), PolygonView::update_polygon(), VerticalLineView::update_view(), HorizontalLineView::update_view(), MaskAllView::update_view(), MaskContainerView::update_view(), and update_view().
|
privateinherited |
Definition at line 56 of file RectangleView.h.
Referenced by RectangleView::~RectangleView(), RectangleView::bottom(), RectangleView::left(), RectangleView::mouseMoveEvent(), RectangleView::onChangedX(), RectangleView::onChangedY(), RectangleView::onItemDestroyed(), RectangleView::parameterizedItem(), RectangleView::right(), RectangleView::top(), and RectangleView::update_position().
|
protectedinherited |
mask rectangle in scene coordinates
Definition at line 52 of file RectangleBaseView.h.
Referenced by RectangleView::onChangedX(), RectangleView::onChangedY(), paint(), EllipseView::shape(), RectangleView::shape(), and RectangleBaseView::update_bounding_rect().
|
protectedinherited |
coordinates of corner opposite to the grip corner at the moment it first clicked in scene coordinates
Definition at line 53 of file RectangleBaseView.h.
Referenced by RectangleBaseView::create_size_handle_elements(), RectangleBaseView::itemChange(), RectangleBaseView::onSizeHandleElementRequest(), and RectangleBaseView::update_bounding_rect().
|
protectedinherited |
Definition at line 56 of file RectangleBaseView.h.
Referenced by EllipseView::mouseMoveEvent(), RectangleView::mouseMoveEvent(), and RectangleBaseView::onSizeHandleElementRequest().