BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Performs conversion of MaskItems coordinates between ColorMap and GraphicsScene.
Definition at line 24 of file ColorMapSceneAdaptor.h.
Signals | |
void | update_request () |
Public Member Functions | |
ColorMapSceneAdaptor () | |
bool | eventFilter (QObject *object, QEvent *event) override |
qreal | fromSceneX (qreal scene_x) const override |
convert scene x-coordinate to native mask coordinate More... | |
qreal | fromSceneY (qreal scene_y) const override |
convert scene y-coordinate to native mask coordinate More... | |
void | setColorMapPlot (ColorMap *plot) |
qreal | toSceneX (qreal mask_x) const override |
convert native mask x-coordinate to scene coordinate More... | |
qreal | toSceneY (qreal mask_y) const override |
convert native mask y-coordinate to scene coordinate More... | |
const QRectF & | viewportRectangle () const override |
Returns ColorMapPlot axes rectangle (at current zoom level) in scene coordinates. More... | |
Protected Attributes | |
QRectF | m_viewport_rectangle |
Private Attributes | |
ColorMap * | m_plot |
ColorMapSceneAdaptor::ColorMapSceneAdaptor | ( | ) |
Definition at line 18 of file ColorMapSceneAdaptor.cpp.
|
override |
Definition at line 50 of file ColorMapSceneAdaptor.cpp.
References m_plot, ISceneAdaptor::m_viewport_rectangle, ISceneAdaptor::update_request(), and ColorMap::viewportRectangleInWidgetCoordinates().
|
overridevirtual |
convert scene x-coordinate to native mask coordinate
Implements ISceneAdaptor.
Definition at line 33 of file ColorMapSceneAdaptor.cpp.
References m_plot, and ScientificPlot::pixelToXaxisCoord().
|
overridevirtual |
convert scene y-coordinate to native mask coordinate
Implements ISceneAdaptor.
Definition at line 38 of file ColorMapSceneAdaptor.cpp.
References m_plot, and ScientificPlot::pixelToYaxisCoord().
void ColorMapSceneAdaptor::setColorMapPlot | ( | ColorMap * | plot | ) |
Definition at line 43 of file ColorMapSceneAdaptor.cpp.
References m_plot.
Referenced by MaskGraphicsProxy::~MaskGraphicsProxy(), and MaskGraphicsProxy::setSceneAdaptor().
|
overridevirtual |
convert native mask x-coordinate to scene coordinate
Implements ISceneAdaptor.
Definition at line 23 of file ColorMapSceneAdaptor.cpp.
References m_plot, and ScientificPlot::xAxisCoordToPixel().
|
overridevirtual |
convert native mask y-coordinate to scene coordinate
Implements ISceneAdaptor.
Definition at line 28 of file ColorMapSceneAdaptor.cpp.
References m_plot, and ScientificPlot::yAxisCoordToPixel().
|
signalinherited |
Referenced by eventFilter(), and IShape2DView::setSceneAdaptor().
|
overridevirtual |
Returns ColorMapPlot axes rectangle (at current zoom level) in scene coordinates.
Reimplemented from ISceneAdaptor.
Definition at line 61 of file ColorMapSceneAdaptor.cpp.
References ISceneAdaptor::m_viewport_rectangle.
|
private |
Definition at line 43 of file ColorMapSceneAdaptor.h.
Referenced by eventFilter(), fromSceneX(), fromSceneY(), setColorMapPlot(), toSceneX(), and toSceneY().
|
protectedinherited |
Definition at line 45 of file ISceneAdaptor.h.
Referenced by eventFilter(), ISceneAdaptor::viewportRectangle(), and viewportRectangle().