BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Main interface class for views representing MaskItems, Projections on graphics scene.
Definition at line 27 of file IShape2DView.h.
Public Member Functions | |
virtual void | addView (IShape2DView *childView, int row=0) |
QRectF | boundingRect () const override |
virtual SessionItem * | parameterizedItem () const =0 |
void | setSceneAdaptor (const ISceneAdaptor *adaptor) |
int | type () const override |
Protected Slots | |
virtual void | onChangedX () |
virtual void | onChangedY () |
virtual void | onPropertyChange () |
virtual void | update_view ()=0 |
update visual appearance of view (triggered by ISceneAdaptor) More... | |
Protected Member Functions | |
IShape2DView (SessionItem *item) | |
bool | blockOnProperty () const |
void | disconnectFromItem (SessionItem *item) |
qreal | fromSceneX (qreal value) const |
convert scene coordinates to ColorMap plot coordinates More... | |
qreal | fromSceneY (qreal value) const |
QPainterPath | maskedShape () const |
Returns the shape with all masking already applied. More... | |
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override |
void | setBlockOnProperty (bool value) |
qreal | toSceneX (qreal value) const |
qreal | toSceneY (qreal value) const |
Protected Attributes | |
const ISceneAdaptor * | m_adaptor |
bool | m_block_on_property_change |
QRectF | m_bounding_rect |
Private Member Functions | |
virtual void | onItemDestroyed ()=0 |
void | onItemPropertyChange (const QString &propertyName) |
|
explicitprotected |
Definition at line 35 of file IShape2DView.cpp.
References SessionItem::mapper(), GUI::RealSpace::Particles::name(), onChangedX(), onChangedY(), onItemDestroyed(), onItemPropertyChange(), ModelMapper::setOnItemDestroy(), and ModelMapper::setOnPropertyChange().
|
virtual |
Reimplemented in PolygonView.
Definition at line 129 of file IShape2DView.cpp.
Referenced by MaskGraphicsScene::updateViews().
|
protected |
Definition at line 140 of file IShape2DView.cpp.
References m_block_on_property_change.
|
override |
|
protected |
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().
|
protected |
convert scene coordinates to ColorMap plot coordinates
Definition at line 119 of file IShape2DView.cpp.
References ISceneAdaptor::fromSceneX(), and m_adaptor.
Referenced by EllipseView::mouseMoveEvent(), RectangleView::mouseMoveEvent(), EllipseView::onChangedX(), VerticalLineView::onChangedX(), RectangleView::onChangedX(), and PolygonPointView::updateParameterizedItem().
|
protected |
Definition at line 124 of file IShape2DView.cpp.
References ISceneAdaptor::fromSceneY(), and m_adaptor.
Referenced by EllipseView::mouseMoveEvent(), RectangleView::mouseMoveEvent(), EllipseView::onChangedY(), HorizontalLineView::onChangedY(), RectangleView::onChangedY(), and PolygonPointView::updateParameterizedItem().
|
protected |
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 paint().
|
inlineprotectedvirtualslot |
|
inlineprotectedvirtualslot |
|
privatepure virtual |
Implemented in RectangleView, PolygonView, PolygonPointView, MaskContainerView, MaskAllView, HorizontalLineView, VerticalLineView, and EllipseView.
Referenced by IShape2DView().
|
private |
Definition at line 151 of file IShape2DView.cpp.
References MaskItem::isIsVisiblePropertyName(), MaskItem::isMaskValuePropertyName(), m_block_on_property_change, onPropertyChange(), and parameterizedItem().
Referenced by IShape2DView().
|
inlineprotectedvirtualslot |
|
overrideprotected |
Definition at line 70 of file IShape2DView.cpp.
References MaskEditorHelper::getMaskBrush(), MaskEditorHelper::getMaskPen(), maskedShape(), and parameterizedItem().
Referenced by PolygonView::paint().
|
pure virtual |
Implemented in RectangleView, PolygonView, PolygonPointView, MaskContainerView, MaskAllView, HorizontalLineView, VerticalLineView, and EllipseView.
Referenced by onItemPropertyChange(), paint(), and RectangleBaseView::update_bounding_rect().
|
protected |
Definition at line 135 of file IShape2DView.cpp.
References m_block_on_property_change.
Referenced by EllipseView::onChangedX(), VerticalLineView::onChangedX(), RectangleView::onChangedX(), EllipseView::onChangedY(), HorizontalLineView::onChangedY(), and RectangleView::onChangedY().
void IShape2DView::setSceneAdaptor | ( | const ISceneAdaptor * | adaptor | ) |
Definition at line 55 of file IShape2DView.cpp.
References m_adaptor, ISceneAdaptor::update_request(), and update_view().
Referenced by MaskViewFactory::createMaskView().
|
protected |
Definition at line 109 of file IShape2DView.cpp.
References 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().
|
protected |
Definition at line 114 of file IShape2DView.cpp.
References 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 |
|
protectedpure virtualslot |
update visual appearance of view (triggered by ISceneAdaptor)
Implemented in RectangleBaseView.
Referenced by setSceneAdaptor().
|
protected |
Definition at line 67 of file IShape2DView.h.
Referenced by RegionOfInterestView::boundingRect(), fromSceneX(), fromSceneY(), setSceneAdaptor(), toSceneX(), toSceneY(), VerticalLineView::update_view(), HorizontalLineView::update_view(), MaskAllView::update_view(), MaskContainerView::update_view(), and RegionOfInterestView::update_view().
|
protected |
Definition at line 69 of file IShape2DView.h.
Referenced by blockOnProperty(), onItemPropertyChange(), and setBlockOnProperty().
|
protected |
Definition at line 68 of file IShape2DView.h.
Referenced by 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().