BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Helps ScientificPlot to handle mouse events. Particularly, it constructs a valid status string. Can be extended to play a role of event filter.
Definition at line 29 of file ScientificPlotEvent.h.
Public Slots | |
void | onCustomMouseMove (QMouseEvent *event) |
Constructs status string on mouse move event coming from QCustomPlot. String is emitted if mouse is in axes's viewport rectangle. Once mouse goes out of it, an empty string is emitted once again. More... | |
Signals | |
void | enteringPlot () |
void | leavingPlot () |
void | positionChanged (double x, double y) |
Public Member Functions | |
ScientificPlotEvent (ScientificPlot *scientific_plot) | |
~ScientificPlotEvent () override | |
void | setMouseTrackingEnabled (bool enable) |
Sets tracking of the mouse for parent DescriptedPlot. More... | |
Private Member Functions | |
PlotEventInfo | currentPlotDescriptor (QMouseEvent *event) const |
Constructs current position of the data. More... | |
QCustomPlot * | customPlot () |
ScientificPlot * | scientificPlot () |
const ScientificPlot * | scientificPlot () const |
Private Attributes | |
ScientificPlot * | m_plot |
PlotEventInfo | m_prevPos |
|
explicit |
Definition at line 19 of file ScientificPlotEvent.cpp.
|
overridedefault |
|
private |
Constructs current position of the data.
Definition at line 83 of file ScientificPlotEvent.cpp.
References ScientificPlot::eventInfo(), ScientificPlot::pixelToXaxisCoord(), ScientificPlot::pixelToYaxisCoord(), and scientificPlot().
Referenced by onCustomMouseMove().
|
private |
Definition at line 76 of file ScientificPlotEvent.cpp.
References ScientificPlot::customPlot(), and m_plot.
Referenced by setMouseTrackingEnabled().
|
signal |
Referenced by onCustomMouseMove(), and ProjectionsEditorCanvas::setConnected().
|
signal |
Referenced by onCustomMouseMove(), and ProjectionsEditorCanvas::setConnected().
|
slot |
Constructs status string on mouse move event coming from QCustomPlot. String is emitted if mouse is in axes's viewport rectangle. Once mouse goes out of it, an empty string is emitted once again.
Definition at line 47 of file ScientificPlotEvent.cpp.
References currentPlotDescriptor(), enteringPlot(), PlotEventInfo::inAxesRange(), leavingPlot(), m_prevPos, positionChanged(), scientificPlot(), and ScientificPlot::statusString().
Referenced by setMouseTrackingEnabled().
|
signal |
Referenced by onCustomMouseMove(), and ProjectionsEditorCanvas::setConnected().
|
private |
Definition at line 66 of file ScientificPlotEvent.cpp.
References m_plot.
Referenced by currentPlotDescriptor(), and onCustomMouseMove().
|
private |
Definition at line 71 of file ScientificPlotEvent.cpp.
References m_plot.
void ScientificPlotEvent::setMouseTrackingEnabled | ( | bool | enable | ) |
Sets tracking of the mouse for parent DescriptedPlot.
Definition at line 30 of file ScientificPlotEvent.cpp.
References customPlot(), m_plot, and onCustomMouseMove().
Referenced by ScientificPlot::setMouseTrackingEnabled().
|
private |
Definition at line 52 of file ScientificPlotEvent.h.
Referenced by customPlot(), scientificPlot(), and setMouseTrackingEnabled().
|
private |
Definition at line 53 of file ScientificPlotEvent.h.
Referenced by onCustomMouseMove().