18 #ifndef GAZEBO_GUI_PLOT_PLOTTRACKER_HH_
19 #define GAZEBO_GUI_PLOT_PLOTTRACKER_HH_
29 class PlotTrackerPrivate;
36 #if (QWT_VERSION < ((6 << 16) | (1 << 8) | 0))
37 public:
explicit PlotTracker(QwtPlotCanvas *_canvas);
51 protected:
virtual QwtText
trackerTextF(
const QPointF &_pos)
const;
67 private: QString CurveInfoAt(
const QwtPlotCurve *_curve,
68 const QPointF &_pos)
const;
74 private: QLineF CurveLineAt(
const QwtPlotCurve *_curve,
75 const double _x)
const;
82 private:
int UpperSampleIndex(
const QwtSeriesData<QPointF> &_series,
83 const double _value)
const;
87 private: std::unique_ptr<PlotTrackerPrivate> dataPtr;
virtual void widgetMousePressEvent(QMouseEvent *_e)
Mouse press event used to determine when to show/hide hover line.
void Update()
Update the tracker text.
virtual void updateDisplay()
Overriden to update the hover line and tracker text.
Mouse hover tracking.
Definition: PlotTracker.hh:32
PlotTracker(QwtPlotCanvas *_canvas)
Constructor.
virtual QwtText trackerTextF(const QPointF &_pos) const
Overriden to provide customized hover text.
virtual void widgetMouseReleaseEvent(QMouseEvent *_e)
Mouse release event used to determine when to show/hide hover line.