BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
This is a View of ellipse mask (represented by EllipseItem) on GraphicsScene. Given view follows standard QGraphicsScene notations: (x,y) is top left corner.
Definition at line 25 of file EllipseView.h.
Public Member Functions | |
EllipseView (EllipseItem *item) | |
~EllipseView () override | |
virtual void | addView (IShape2DView *childView, int row=0) |
QRectF | boundingRect () const override |
SessionItem * | parameterizedItem () const override |
void | setSceneAdaptor (const ISceneAdaptor *adaptor) |
int | type () const override |
Protected Slots | |
void | onChangedX () override |
void | onChangedY () override |
void | onPropertyChange () override |
Protected Member Functions | |
bool | blockOnProperty () const |
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... | |
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 |
void | setBlockOnProperty (bool value) |
QPainterPath | shape () const override |
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_view () override |
update visual appearance of view (triggered by ISceneAdaptor) 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 | |
qreal | bottom () const override |
Returns the y-coordinate of the rectangle's bottom edge. More... | |
qreal | left () const override |
Returns the x-coordinate of the rectangle's left edge. More... | |
QRectF | mask_rectangle () override |
void | onItemDestroyed () override |
void | onItemPropertyChange (const QString &propertyName) |
qreal | right () const override |
Returns the x-coordinate of the rectangle's right edge. More... | |
qreal | top () const override |
Returns the y-coordinate of the rectangle's top edge. More... | |
void | update_position () override |
updates position of view using item properties More... | |
Private Attributes | |
EllipseItem * | m_item |
|
explicit |
Definition at line 20 of file EllipseView.cpp.
|
override |
Definition at line 26 of file EllipseView.cpp.
References IShape2DView::disconnectFromItem(), and m_item.
|
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.
|
overrideprivatevirtual |
Returns the y-coordinate of the rectangle's bottom edge.
Implements RectangleBaseView.
Definition at line 153 of file EllipseView.cpp.
References m_item, IShape2DView::toSceneY(), EllipseItem::yCenter(), and EllipseItem::yRadius().
|
overrideinherited |
|
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(), 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 mouseMoveEvent(), RectangleView::mouseMoveEvent(), 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 mouseMoveEvent(), RectangleView::mouseMoveEvent(), 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 mask_rectangle(), RectangleView::mask_rectangle(), and 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.
|
overrideprivatevirtual |
Returns the x-coordinate of the rectangle's left edge.
Implements RectangleBaseView.
Definition at line 132 of file EllipseView.cpp.
References m_item, IShape2DView::toSceneX(), EllipseItem::xCenter(), and EllipseItem::xRadius().
|
overrideprivatevirtual |
Implements RectangleBaseView.
Definition at line 125 of file EllipseView.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().
|
overrideprotected |
Definition at line 53 of file EllipseView.cpp.
References IShape2DView::fromSceneX(), IShape2DView::fromSceneY(), SizeHandleElement::getHandleType(), RectangleBaseView::height(), RectangleBaseView::m_activeHandleElement, m_item, RectangleBaseView::m_resize_opposite_origin, SizeHandleElement::RESIZE, SizeHandleElement::RESIZE_HEIGHT, SizeHandleElement::RESIZE_WIDTH, EllipseItem::setXCenter(), EllipseItem::setXRadius(), EllipseItem::setYCenter(), EllipseItem::setYRadius(), and RectangleBaseView::width().
|
overrideprotectedinherited |
Definition at line 61 of file RectangleBaseView.cpp.
References RectangleBaseView::onSizeHandleElementRequest().
|
overrideprotectedslot |
Definition at line 31 of file EllipseView.cpp.
References IShape2DView::fromSceneX(), m_item, IShape2DView::setBlockOnProperty(), and EllipseItem::setXCenter().
Referenced by update_position().
|
overrideprotectedslot |
Definition at line 38 of file EllipseView.cpp.
References IShape2DView::fromSceneY(), m_item, IShape2DView::setBlockOnProperty(), and EllipseItem::setYCenter().
Referenced by update_position().
|
overrideprivatevirtual |
|
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().
|
overrideprotectedslot |
Definition at line 45 of file EllipseView.cpp.
References EllipseItem::angle(), m_item, IShape2DView::toSceneX(), IShape2DView::toSceneY(), RectangleBaseView::update_view(), EllipseItem::xCenter(), and EllipseItem::yCenter().
|
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().
|
overrideprotectedinherited |
Definition at line 70 of file IShape2DView.cpp.
References MaskEditorHelper::getMaskBrush(), MaskEditorHelper::getMaskPen(), IShape2DView::maskedShape(), and IShape2DView::parameterizedItem().
Referenced by PolygonView::paint().
|
overridevirtual |
|
overrideprivatevirtual |
Returns the x-coordinate of the rectangle's right edge.
Implements RectangleBaseView.
Definition at line 139 of file EllipseView.cpp.
References m_item, IShape2DView::toSceneX(), EllipseItem::xCenter(), and EllipseItem::xRadius().
|
protectedinherited |
Definition at line 135 of file IShape2DView.cpp.
References IShape2DView::m_block_on_property_change.
Referenced by onChangedX(), VerticalLineView::onChangedX(), RectangleView::onChangedX(), 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().
|
overrideprotected |
Definition at line 96 of file EllipseView.cpp.
References RectangleBaseView::m_mask_rect.
|
overrideprivatevirtual |
Returns the y-coordinate of the rectangle's top edge.
Implements RectangleBaseView.
Definition at line 146 of file EllipseView.cpp.
References m_item, IShape2DView::toSceneY(), EllipseItem::yCenter(), and EllipseItem::yRadius().
|
protectedinherited |
Definition at line 109 of file IShape2DView.cpp.
References IShape2DView::m_adaptor, and ISceneAdaptor::toSceneX().
Referenced by left(), RectangleView::left(), onPropertyChange(), VerticalLineView::onPropertyChange(), right(), RectangleView::right(), PolygonView::update_polygon(), 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 bottom(), RectangleView::bottom(), onPropertyChange(), HorizontalLineView::onPropertyChange(), top(), RectangleView::top(), PolygonView::update_polygon(), update_position(), RectangleView::update_position(), and HorizontalLineView::update_view().
|
inlineoverride |
|
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().
|
overrideprivatevirtual |
updates position of view using item properties
Implements RectangleBaseView.
Definition at line 110 of file EllipseView.cpp.
References EllipseItem::angle(), m_item, onChangedX(), onChangedY(), IShape2DView::toSceneX(), IShape2DView::toSceneY(), EllipseItem::xCenter(), and EllipseItem::yCenter().
|
overrideprotectedvirtualinherited |
update visual appearance of view (triggered by ISceneAdaptor)
Implements IShape2DView.
Definition at line 67 of file RectangleBaseView.cpp.
References RectangleBaseView::update_bounding_rect(), and RectangleBaseView::update_position().
Referenced by RectangleView::mouseMoveEvent(), onPropertyChange(), RectangleView::onPropertyChange(), and RegionOfInterestView::update_view().
|
protectedinherited |
Returns width of the rectangle.
Definition at line 93 of file RectangleBaseView.cpp.
References RectangleBaseView::left(), and RectangleBaseView::right().
Referenced by mask_rectangle(), RectangleView::mask_rectangle(), and mouseMoveEvent().
|
protectedinherited |
Definition at line 57 of file RectangleBaseView.h.
Referenced by mouseMoveEvent(), RectangleView::mouseMoveEvent(), and RectangleBaseView::onSizeHandleElementRequest().
|
protectedinherited |
Definition at line 67 of file IShape2DView.h.
Referenced by RegionOfInterestView::boundingRect(), IShape2DView::fromSceneX(), IShape2DView::fromSceneY(), IShape2DView::setSceneAdaptor(), IShape2DView::toSceneX(), IShape2DView::toSceneY(), VerticalLineView::update_view(), HorizontalLineView::update_view(), MaskAllView::update_view(), MaskContainerView::update_view(), and RegionOfInterestView::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 RegionOfInterestView::update_view().
|
private |
Definition at line 55 of file EllipseView.h.
Referenced by ~EllipseView(), bottom(), left(), mouseMoveEvent(), onChangedX(), onChangedY(), onItemDestroyed(), onPropertyChange(), parameterizedItem(), right(), top(), and update_position().
|
protectedinherited |
mask rectangle in scene coordinates
Definition at line 52 of file RectangleBaseView.h.
Referenced by RectangleView::onChangedX(), RectangleView::onChangedY(), RegionOfInterestView::paint(), 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 mouseMoveEvent(), RectangleView::mouseMoveEvent(), and RectangleBaseView::onSizeHandleElementRequest().