BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
This is a View of ellipse mask (represented by EllipseItem) on GraphicsScene. More...
Public Member Functions | |
EllipseView () | |
virtual void | addView (IShape2DView *childView, int row=0) |
QRectF | boundingRect () const |
virtual SessionItem * | parameterizedItem () |
virtual void | setParameterizedItem (SessionItem *item) |
void | setSceneAdaptor (const ISceneAdaptor *adaptor) |
int | type () const |
Protected Slots | |
virtual void | onChangedX () |
virtual void | onChangedY () |
virtual void | onPropertyChange (const QString &propertyName) |
Protected Member Functions | |
bool | blockOnProperty () const |
void | create_size_handle_elements () |
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) |
Track if item selected/deselected and show/hide size handles. More... | |
void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) |
void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) |
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) |
double | par (const QString &property_name) const |
void | setBlockOnProperty (bool value) |
qreal | toSceneX (const QString &property_name) const |
qreal | toSceneX (qreal value) const |
qreal | toSceneY (const QString &property_name) const |
qreal | toSceneY (qreal value) const |
virtual void | update_bounding_rect () |
updates view's bounding rectangle using item properties More... | |
void | update_view () |
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 |
SessionItem * | m_item |
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 |
Returns the y-coordinate of the rectangle's bottom edge. More... | |
qreal | left () const |
returns the x-coordinate of the rectangle's left edge More... | |
QRectF | mask_rectangle () |
void | onItemPropertyChange (const QString &propertyName) |
qreal | right () const |
returns the x-coordinate of the rectangle's right edge More... | |
qreal | top () const |
Returns the y-coordinate of the rectangle's top edge. More... | |
void | update_position () |
updates position of view using item properties More... | |
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 23 of file EllipseView.h.
|
default |
|
virtualinherited |
Reimplemented in PolygonView.
Definition at line 116 of file IShape2DView.cpp.
Referenced by MaskGraphicsScene::updateViews().
|
protectedinherited |
Definition at line 127 of file IShape2DView.cpp.
References IShape2DView::m_block_on_property_change.
|
privatevirtual |
Returns the y-coordinate of the rectangle's bottom edge.
Implements RectangleBaseView.
Definition at line 153 of file EllipseView.cpp.
References EllipseItem::P_YCENTER, EllipseItem::P_YRADIUS, IShape2DView::par(), and IShape2DView::toSceneY().
|
inherited |
|
protectedinherited |
Definition at line 100 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 |
convert scene coordinates to ColorMap plot coordinates
Definition at line 106 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 111 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 95 of file RectangleBaseView.cpp.
References RectangleBaseView::bottom(), and RectangleBaseView::top().
Referenced by mask_rectangle(), RectangleView::mask_rectangle(), and mouseMoveEvent().
|
protectedinherited |
Track if item selected/deselected and show/hide size handles.
Definition at line 48 of file RectangleBaseView.cpp.
References RectangleBaseView::m_resize_handles.
|
privatevirtual |
returns the x-coordinate of the rectangle's left edge
Implements RectangleBaseView.
Definition at line 132 of file EllipseView.cpp.
References EllipseItem::P_XCENTER, EllipseItem::P_XRADIUS, IShape2DView::par(), and IShape2DView::toSceneX().
|
privatevirtual |
Implements RectangleBaseView.
Definition at line 125 of file EllipseView.cpp.
References RectangleBaseView::height(), and RectangleBaseView::width().
|
protected |
Definition at line 58 of file EllipseView.cpp.
References IShape2DView::fromSceneX(), IShape2DView::fromSceneY(), SizeHandleElement::getHandleType(), RectangleBaseView::height(), RectangleBaseView::m_activeHandleElement, IShape2DView::m_item, RectangleBaseView::m_resize_opposite_origin, EllipseItem::P_XCENTER, EllipseItem::P_XRADIUS, EllipseItem::P_YCENTER, EllipseItem::P_YRADIUS, SizeHandleElement::RESIZE, SizeHandleElement::RESIZE_HEIGHT, SizeHandleElement::RESIZE_WIDTH, SessionItem::setItemValue(), and RectangleBaseView::width().
|
protectedinherited |
Definition at line 59 of file RectangleBaseView.cpp.
References RectangleBaseView::onSizeHandleElementRequest().
|
protectedvirtualslot |
Definition at line 22 of file EllipseView.cpp.
References IShape2DView::fromSceneX(), IShape2DView::m_item, EllipseItem::P_XCENTER, IShape2DView::setBlockOnProperty(), and SessionItem::setItemValue().
Referenced by update_position().
|
protectedvirtualslot |
Definition at line 29 of file EllipseView.cpp.
References IShape2DView::fromSceneY(), IShape2DView::m_item, EllipseItem::P_YCENTER, IShape2DView::setBlockOnProperty(), and SessionItem::setItemValue().
Referenced by update_position().
|
privateinherited |
Definition at line 132 of file IShape2DView.cpp.
References IShape2DView::m_block_on_property_change, IShape2DView::onPropertyChange(), MaskItem::P_IS_VISIBLE, MaskItem::P_MASK_VALUE, and IShape2DView::parameterizedItem().
Referenced by IShape2DView::setParameterizedItem().
|
protectedvirtualslot |
Definition at line 36 of file EllipseView.cpp.
References EllipseItem::P_ANGLE, EllipseItem::P_XCENTER, EllipseItem::P_XRADIUS, EllipseItem::P_YCENTER, EllipseItem::P_YRADIUS, IShape2DView::par(), IShape2DView::toSceneX(), IShape2DView::toSceneY(), and RectangleBaseView::update_view().
|
privateslotinherited |
triggered by SizeHandleElement
Definition at line 32 of file RectangleBaseView.cpp.
References ASSERT, 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().
|
protected |
Definition at line 49 of file EllipseView.cpp.
References SessionItem::getItemValue(), MaskEditorHelper::getMaskBrush(), MaskEditorHelper::getMaskPen(), IShape2DView::m_item, RectangleBaseView::m_mask_rect, and MaskItem::P_MASK_VALUE.
|
protectedinherited |
Definition at line 81 of file IShape2DView.cpp.
References SessionItem::getItemValue(), and IShape2DView::m_item.
Referenced by bottom(), RectangleView::bottom(), left(), RectangleView::left(), onPropertyChange(), right(), RectangleView::right(), top(), RectangleView::top(), and update_position().
|
virtualinherited |
Definition at line 61 of file IShape2DView.cpp.
References IShape2DView::m_item.
Referenced by IShape2DView::onItemPropertyChange().
|
privatevirtual |
returns the x-coordinate of the rectangle's right edge
Implements RectangleBaseView.
Definition at line 139 of file EllipseView.cpp.
References EllipseItem::P_XCENTER, EllipseItem::P_XRADIUS, IShape2DView::par(), and IShape2DView::toSceneX().
|
protectedinherited |
Definition at line 122 of file IShape2DView.cpp.
References IShape2DView::m_block_on_property_change.
Referenced by onChangedX(), VerticalLineView::onChangedX(), RectangleView::onChangedX(), onChangedY(), HorizontalLineView::onChangedY(), and RectangleView::onChangedY().
|
virtualinherited |
Definition at line 41 of file IShape2DView.cpp.
References IShape2DView::m_item, SessionItem::mapper(), RealSpace::Particles::name(), IShape2DView::onItemPropertyChange(), ModelMapper::setOnItemDestroy(), ModelMapper::setOnPropertyChange(), and ModelMapper::unsubscribe().
Referenced by MaskViewFactory::createMaskView().
|
inherited |
Definition at line 66 of file IShape2DView.cpp.
References ASSERT, IShape2DView::m_adaptor, ISceneAdaptor::update_request(), and IShape2DView::update_view().
Referenced by MaskViewFactory::createMaskView().
|
privatevirtual |
Returns the y-coordinate of the rectangle's top edge.
Implements RectangleBaseView.
Definition at line 146 of file EllipseView.cpp.
References EllipseItem::P_YCENTER, EllipseItem::P_YRADIUS, IShape2DView::par(), and IShape2DView::toSceneY().
|
protectedinherited |
Definition at line 86 of file IShape2DView.cpp.
References SessionItem::getItemValue(), and IShape2DView::m_item.
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 91 of file IShape2DView.cpp.
References IShape2DView::m_adaptor, and ISceneAdaptor::toSceneX().
|
protectedinherited |
Definition at line 96 of file IShape2DView.cpp.
References SessionItem::getItemValue(), and IShape2DView::m_item.
Referenced by bottom(), RectangleView::bottom(), onPropertyChange(), HorizontalLineView::onPropertyChange(), top(), RectangleView::top(), PolygonView::update_polygon(), update_position(), RectangleView::update_position(), and HorizontalLineView::update_view().
|
protectedinherited |
Definition at line 101 of file IShape2DView.cpp.
References IShape2DView::m_adaptor, and ISceneAdaptor::toSceneY().
|
inlinevirtual |
Reimplemented from IShape2DView.
Definition at line 27 of file EllipseView.h.
References MaskEditorHelper::ELLIPSE.
|
protectedvirtualinherited |
updates view's bounding rectangle using item properties
Definition at line 74 of file RectangleBaseView.cpp.
References IShape2DView::m_bounding_rect, IShape2DView::m_item, RectangleBaseView::m_mask_rect, RectangleBaseView::m_resize_handles, and RectangleBaseView::mask_rectangle().
Referenced by RectangleBaseView::update_view().
|
privatevirtual |
updates position of view using item properties
Implements RectangleBaseView.
Definition at line 110 of file EllipseView.cpp.
References onChangedX(), onChangedY(), EllipseItem::P_ANGLE, EllipseItem::P_XCENTER, EllipseItem::P_YCENTER, IShape2DView::par(), IShape2DView::toSceneX(), and IShape2DView::toSceneY().
|
protectedvirtualinherited |
update visual appearance of view (triggered by ISceneAdaptor)
Implements IShape2DView.
Definition at line 65 of file RectangleBaseView.cpp.
References RectangleBaseView::update_bounding_rect(), and RectangleBaseView::update_position().
Referenced by RectangleView::mouseMoveEvent(), onPropertyChange(), and RectangleView::onPropertyChange().
|
protectedinherited |
returns width of the rectangle
Definition at line 90 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 66 of file IShape2DView.h.
Referenced by IShape2DView::fromSceneX(), IShape2DView::fromSceneY(), IShape2DView::setSceneAdaptor(), IShape2DView::toSceneX(), IShape2DView::toSceneY(), IntensityDataView::update_view(), VerticalLineView::update_view(), HorizontalLineView::update_view(), MaskAllView::update_view(), and MaskContainerView::update_view().
|
protectedinherited |
Definition at line 68 of file IShape2DView.h.
Referenced by IShape2DView::blockOnProperty(), IShape2DView::onItemPropertyChange(), and IShape2DView::setBlockOnProperty().
|
protectedinherited |
Definition at line 67 of file IShape2DView.h.
Referenced by IShape2DView::boundingRect(), VerticalLineView::paint(), HorizontalLineView::paint(), MaskAllView::paint(), RectangleBaseView::update_bounding_rect(), PolygonView::update_polygon(), IntensityDataView::update_view(), VerticalLineView::update_view(), HorizontalLineView::update_view(), MaskAllView::update_view(), and MaskContainerView::update_view().
|
protectedinherited |
Definition at line 65 of file IShape2DView.h.
Referenced by IShape2DView::~IShape2DView(), PolygonView::closePolygonIfNecessary(), PolygonView::isClosedPolygon(), mouseMoveEvent(), RectangleView::mouseMoveEvent(), onChangedX(), VerticalLineView::onChangedX(), RectangleView::onChangedX(), onChangedY(), HorizontalLineView::onChangedY(), RectangleView::onChangedY(), paint(), VerticalLineView::paint(), HorizontalLineView::paint(), PolygonView::paint(), RectangleView::paint(), IShape2DView::par(), IShape2DView::parameterizedItem(), IShape2DView::setParameterizedItem(), IShape2DView::toSceneX(), IShape2DView::toSceneY(), RectangleBaseView::update_bounding_rect(), PolygonView::update_polygon(), and PolygonPointView::updateParameterizedItem().
|
protectedinherited |
mask rectangle in scene coordinates
Definition at line 52 of file RectangleBaseView.h.
Referenced by RectangleView::onChangedX(), RectangleView::onChangedY(), paint(), RectangleView::paint(), RegionOfInterestView::paint(), 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().