17 #include <QMouseEvent>
18 #include <qcustomplot.h>
32 throw std::runtime_error(
"MouseMoveReporter: not initialized custom plot.");
40 auto on_mouse_move = [
this](QMouseEvent* event) {
47 QObject::connect(
custom_plot, &QCustomPlot::mouseMove, on_mouse_move);
Tracks mouse moves in QCustomPlot canvas.
std::function< void(const MousePosInfo &pos_info)> callback_t
MouseMoveReporter(QCustomPlot *custom_plot, callback_t callback)
materialitems.h Collection of materials to populate MaterialModel.
bool axesRangeContains(double xpos, double ypos) const
double pixelToYaxisCoord(double pixel) const
QCustomPlot * custom_plot
MouseMoveReporter * reporter
double pixelToXaxisCoord(double pixel) const
MouseMoveReporterImpl(MouseMoveReporter *reporter, QCustomPlot *custom_plot, callback_t callback)