15 #ifndef BORNAGAIN_GUI_VIEW_PLOTUTIL_SCIENTIFICPLOT_H
16 #define BORNAGAIN_GUI_VIEW_PLOTUTIL_SCIENTIFICPLOT_H
Contains parameters of mouse position in 1D or 2D plot.
Helps ScientificPlot to handle mouse events. Particularly, it constructs a valid status string....
Common interface for plot-descriptor interaction.
ScientificPlotEvent * plotEvent()
PLOT_TYPE plotType() const
Returns the type of current plot.
ScientificPlot(QWidget *parent, PLOT_TYPE plot_type)
virtual PlotEventInfo eventInfo(double xpos, double ypos) const =0
Returns plot descriptor corresponding to given axes coordinates.
bool axesRangeContains(double xpos, double ypos) const
Returns true if axes rectangle contains given in axes coordinates.
void statusString(const QString &text)
virtual QCustomPlot * customPlot()=0
double yAxisCoordToPixel(double axis_coordinate) const
~ScientificPlot() override
double pixelToYaxisCoord(double pixel) const
virtual const QCustomPlot * customPlot() const =0
ScientificPlotEvent * m_event
double pixelToXaxisCoord(double pixel) const
transform widget coordinates to axes coordinates
void setMouseTrackingEnabled(bool enable)
Tracks move events (used when showing profile histograms and printing status string)
double xAxisCoordToPixel(double axis_coordinate) const
transform axes coordinates to CustomPlot widget coordinates