BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ModelView::SceneAdapterInterface Class Referenceabstract

Interface to convert coordinates of "scene" to coordinates of "widget". More...

Inheritance diagram for ModelView::SceneAdapterInterface:
[legend]

Public Member Functions

virtual ~SceneAdapterInterface ()=default
 
virtual double fromSceneX (double) const =0
 convert scene x-coordinate to local axis coordinate More...
 
virtual double fromSceneY (double) const =0
 convert scene y-coordinate to local axis coordinate More...
 
virtual double toSceneX (double) const =0
 convert local x-coordinate to scene coordinate More...
 
virtual double toSceneY (double) const =0
 convert local y-coordinate to scene coordinate More...
 
virtual QRectF viewportRectangle () const =0
 returns viewport rectangle in scene coordinates More...
 

Detailed Description

Interface to convert coordinates of "scene" to coordinates of "widget".

Used in the context of QCustomPlot being embedded into QGraphicsScene. Converts QGraphicsScene coordinates in the coordinates of local system of QCustomPlot and vice versa.

Definition at line 28 of file sceneadapterinterface.h.

Constructor & Destructor Documentation

◆ ~SceneAdapterInterface()

virtual ModelView::SceneAdapterInterface::~SceneAdapterInterface ( )
virtualdefault

Member Function Documentation

◆ fromSceneX()

virtual double ModelView::SceneAdapterInterface::fromSceneX ( double  ) const
pure virtual

convert scene x-coordinate to local axis coordinate

Implemented in ModelView::CustomPlotSceneAdapter.

◆ fromSceneY()

virtual double ModelView::SceneAdapterInterface::fromSceneY ( double  ) const
pure virtual

convert scene y-coordinate to local axis coordinate

Implemented in ModelView::CustomPlotSceneAdapter.

◆ toSceneX()

virtual double ModelView::SceneAdapterInterface::toSceneX ( double  ) const
pure virtual

convert local x-coordinate to scene coordinate

Implemented in ModelView::CustomPlotSceneAdapter.

◆ toSceneY()

virtual double ModelView::SceneAdapterInterface::toSceneY ( double  ) const
pure virtual

convert local y-coordinate to scene coordinate

Implemented in ModelView::CustomPlotSceneAdapter.

◆ viewportRectangle()

virtual QRectF ModelView::SceneAdapterInterface::viewportRectangle ( ) const
pure virtual

returns viewport rectangle in scene coordinates

Implemented in ModelView::CustomPlotSceneAdapter.

Referenced by gui2::ElementView::stretchRectLeft(), and gui2::ElementView::stretchRectRight().


The documentation for this class was generated from the following file: