BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Base view for all rectangular-like masks. More...
Public Member Functions | |
RectangleBaseView () | |
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 &) |
Protected Member Functions | |
bool | blockOnProperty () const |
virtual qreal | bottom () const =0 |
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... | |
virtual qreal | left () const =0 |
virtual QRectF | mask_rectangle ()=0 |
void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) |
double | par (const QString &property_name) const |
virtual qreal | right () const =0 |
void | setBlockOnProperty (bool value) |
virtual qreal | top () const =0 |
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... | |
virtual void | update_position ()=0 |
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 | |
void | onItemPropertyChange (const QString &propertyName) |
Base view for all rectangular-like masks.
Definition at line 24 of file RectangleBaseView.h.
RectangleBaseView::RectangleBaseView | ( | ) |
Definition at line 22 of file RectangleBaseView.cpp.
References create_size_handle_elements().
|
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.
|
protectedpure virtual |
Implemented in RectangleView, and EllipseView.
Referenced by height().
|
inherited |
|
protected |
Definition at line 100 of file RectangleBaseView.cpp.
References SizeHandleElement::BOTTOMLEFT, SizeHandleElement::BOTTOMMIDLE, SizeHandleElement::BOTTOMRIGHT, m_resize_handles, SizeHandleElement::MIDDLELEFT, SizeHandleElement::MIDDLERIGHT, onSizeHandleElementRequest(), SizeHandleElement::resize_request(), SizeHandleElement::TOPLEFT, SizeHandleElement::TOPMIDDLE, and SizeHandleElement::TOPRIGHT.
Referenced by 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 EllipseView::mouseMoveEvent(), RectangleView::mouseMoveEvent(), EllipseView::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 EllipseView::mouseMoveEvent(), RectangleView::mouseMoveEvent(), EllipseView::onChangedY(), HorizontalLineView::onChangedY(), RectangleView::onChangedY(), and PolygonPointView::updateParameterizedItem().
|
protected |
Definition at line 95 of file RectangleBaseView.cpp.
References bottom(), and top().
Referenced by EllipseView::mask_rectangle(), RectangleView::mask_rectangle(), and EllipseView::mouseMoveEvent().
|
protected |
Track if item selected/deselected and show/hide size handles.
Definition at line 48 of file RectangleBaseView.cpp.
References m_resize_handles.
|
protectedpure virtual |
Implemented in RectangleView, and EllipseView.
Referenced by width().
|
protectedpure virtual |
Implemented in RectangleView, and EllipseView.
Referenced by update_bounding_rect().
|
protected |
Definition at line 59 of file RectangleBaseView.cpp.
References onSizeHandleElementRequest().
|
inlineprotectedvirtualslotinherited |
|
inlineprotectedvirtualslotinherited |
|
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().
|
inlineprotectedvirtualslotinherited |
Definition at line 50 of file IShape2DView.h.
Referenced by IShape2DView::onItemPropertyChange().
|
privateslot |
triggered by SizeHandleElement
Definition at line 32 of file RectangleBaseView.cpp.
References ASSERT, SizeHandleElement::getOppositeHandleLocation(), m_activeHandleElement, m_resize_handles, and m_resize_opposite_origin.
Referenced by create_size_handle_elements(), and mouseReleaseEvent().
|
protectedinherited |
Definition at line 81 of file IShape2DView.cpp.
References SessionItem::getItemValue(), and IShape2DView::m_item.
Referenced by EllipseView::bottom(), RectangleView::bottom(), EllipseView::left(), RectangleView::left(), EllipseView::onPropertyChange(), EllipseView::right(), RectangleView::right(), EllipseView::top(), RectangleView::top(), and EllipseView::update_position().
|
virtualinherited |
Definition at line 61 of file IShape2DView.cpp.
References IShape2DView::m_item.
Referenced by IShape2DView::onItemPropertyChange().
|
protectedpure virtual |
Implemented in RectangleView, and EllipseView.
Referenced by width().
|
protectedinherited |
Definition at line 122 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().
|
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().
|
protectedpure virtual |
Implemented in RectangleView, and EllipseView.
Referenced by height().
|
protectedinherited |
Definition at line 86 of file IShape2DView.cpp.
References SessionItem::getItemValue(), and IShape2DView::m_item.
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 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 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().
|
protectedinherited |
Definition at line 101 of file IShape2DView.cpp.
References IShape2DView::m_adaptor, and ISceneAdaptor::toSceneY().
|
inlinevirtual |
Reimplemented from IShape2DView.
Reimplemented in RegionOfInterestView, and RectangleView.
Definition at line 28 of file RectangleBaseView.h.
References MaskEditorHelper::RECTANGLEBASE.
|
protectedvirtual |
updates view's bounding rectangle using item properties
Definition at line 74 of file RectangleBaseView.cpp.
References IShape2DView::m_bounding_rect, IShape2DView::m_item, m_mask_rect, m_resize_handles, and mask_rectangle().
Referenced by update_view().
|
protectedpure virtual |
Implemented in RectangleView, and EllipseView.
Referenced by update_view().
|
protectedvirtual |
update visual appearance of view (triggered by ISceneAdaptor)
Implements IShape2DView.
Definition at line 65 of file RectangleBaseView.cpp.
References update_bounding_rect(), and update_position().
Referenced by RectangleView::mouseMoveEvent(), EllipseView::onPropertyChange(), and RectangleView::onPropertyChange().
|
protected |
returns width of the rectangle
Definition at line 90 of file RectangleBaseView.cpp.
References left(), and right().
Referenced by EllipseView::mask_rectangle(), RectangleView::mask_rectangle(), and EllipseView::mouseMoveEvent().
|
protected |
Definition at line 57 of file RectangleBaseView.h.
Referenced by EllipseView::mouseMoveEvent(), RectangleView::mouseMoveEvent(), and 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(), 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(), EllipseView::mouseMoveEvent(), RectangleView::mouseMoveEvent(), EllipseView::onChangedX(), VerticalLineView::onChangedX(), RectangleView::onChangedX(), EllipseView::onChangedY(), HorizontalLineView::onChangedY(), RectangleView::onChangedY(), EllipseView::paint(), VerticalLineView::paint(), HorizontalLineView::paint(), PolygonView::paint(), RectangleView::paint(), IShape2DView::par(), IShape2DView::parameterizedItem(), IShape2DView::setParameterizedItem(), IShape2DView::toSceneX(), IShape2DView::toSceneY(), update_bounding_rect(), PolygonView::update_polygon(), and PolygonPointView::updateParameterizedItem().
|
protected |
mask rectangle in scene coordinates
Definition at line 52 of file RectangleBaseView.h.
Referenced by RectangleView::onChangedX(), RectangleView::onChangedY(), EllipseView::paint(), RectangleView::paint(), RegionOfInterestView::paint(), and update_bounding_rect().
|
protected |
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 create_size_handle_elements(), itemChange(), onSizeHandleElementRequest(), and update_bounding_rect().
|
protected |
Definition at line 56 of file RectangleBaseView.h.
Referenced by EllipseView::mouseMoveEvent(), RectangleView::mouseMoveEvent(), and onSizeHandleElementRequest().