BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Performs conversion of MaskItems coordinates between ColorMap and GraphicsScene. More...
Signals | |
void | update_request () |
Public Member Functions | |
ColorMapSceneAdaptor () | |
bool | eventFilter (QObject *object, QEvent *event) |
qreal | fromSceneX (qreal scene_x) const |
convert scene x-coordinate to native mask coordinate More... | |
qreal | fromSceneY (qreal scene_y) const |
convert scene y-coordinate to native mask coordinate More... | |
void | setColorMapPlot (ColorMap *plot) |
qreal | toSceneX (qreal mask_x) const |
convert native mask x-coordinate to scene coordinate More... | |
qreal | toSceneY (qreal mask_y) const |
convert native mask y-coordinate to scene coordinate More... | |
const QRectF & | viewportRectangle () const |
returns ColorMapPlot axes rectangle (at current zoom level) in scene coordinates More... | |
Protected Attributes | |
QRectF | m_viewport_rectangle |
Private Attributes | |
ColorMap * | m_plot |
Performs conversion of MaskItems coordinates between ColorMap and GraphicsScene.
Definition at line 23 of file ColorMapSceneAdaptor.h.
ColorMapSceneAdaptor::ColorMapSceneAdaptor | ( | ) |
Definition at line 18 of file ColorMapSceneAdaptor.cpp.
bool ColorMapSceneAdaptor::eventFilter | ( | QObject * | object, |
QEvent * | event | ||
) |
Definition at line 47 of file ColorMapSceneAdaptor.cpp.
References m_plot, ISceneAdaptor::m_viewport_rectangle, ISceneAdaptor::update_request(), and ColorMap::viewportRectangleInWidgetCoordinates().
|
virtual |
convert scene x-coordinate to native mask coordinate
Implements ISceneAdaptor.
Definition at line 30 of file ColorMapSceneAdaptor.cpp.
References m_plot, and ScientificPlot::pixelToXaxisCoord().
|
virtual |
convert scene y-coordinate to native mask coordinate
Implements ISceneAdaptor.
Definition at line 35 of file ColorMapSceneAdaptor.cpp.
References m_plot, and ScientificPlot::pixelToYaxisCoord().
void ColorMapSceneAdaptor::setColorMapPlot | ( | ColorMap * | plot | ) |
Definition at line 40 of file ColorMapSceneAdaptor.cpp.
References m_plot.
Referenced by MaskGraphicsProxy::~MaskGraphicsProxy(), and MaskGraphicsProxy::setSceneAdaptor().
|
virtual |
convert native mask x-coordinate to scene coordinate
Implements ISceneAdaptor.
Definition at line 20 of file ColorMapSceneAdaptor.cpp.
References m_plot, and ScientificPlot::xAxisCoordToPixel().
|
virtual |
convert native mask y-coordinate to scene coordinate
Implements ISceneAdaptor.
Definition at line 25 of file ColorMapSceneAdaptor.cpp.
References m_plot, and ScientificPlot::yAxisCoordToPixel().
|
signalinherited |
Referenced by eventFilter(), and IShape2DView::setSceneAdaptor().
|
virtual |
returns ColorMapPlot axes rectangle (at current zoom level) in scene coordinates
Reimplemented from ISceneAdaptor.
Definition at line 58 of file ColorMapSceneAdaptor.cpp.
References ISceneAdaptor::m_viewport_rectangle.
|
private |
Definition at line 42 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(), viewportRectangle(), and ISceneAdaptor::viewportRectangle().