customtracker.h
Go to the documentation of this file.
1 #ifndef CUSTOMTRACKER_H
2 #define CUSTOMTRACKER_H
3 
4 #include <QEvent>
5 #include <QPointF>
6 #include "qwt_plot_picker.h"
7 #include "qwt_picker_machine.h"
8 #include "qwt_plot_marker.h"
9 
10 class QwtPlotCurve;
11 
12 class CurveTracker : public QObject
13 {
14  Q_OBJECT
15 public:
16  explicit CurveTracker(QwtPlot*);
17 
18  ~CurveTracker();
19 
20  QPointF actualPosition() const;
21 
22  typedef enum
23  {
27  } Parameter;
28 
29 public slots:
30 
31  void setPosition(const QPointF& pos);
32 
33  void setParameter(Parameter par);
34 
35  void setEnabled(bool enable);
36 
37  bool isEnabled() const;
38 
39  void redraw()
40  {
42  }
43 
44 private:
45  QLineF curveLineAt(const QwtPlotCurve*, double x) const;
46 
47  QPointF transform(QPoint);
48 
49  QPoint invTransform(QPointF);
50 
52  std::vector<QwtPlotMarker*> _marker;
56  Parameter _param;
57  bool _visible;
58 };
59 
60 #endif // CUSTOMTRACKER_H
CurveTracker(QwtPlot *)
QPointF transform(QPoint)
A plot item, that represents a series of points.
Parameter _param
Definition: customtracker.h:56
A 2-D plotting widget.
Definition: qwt_plot.h:75
bool isEnabled() const
QwtPlotMarker * _line_marker
Definition: customtracker.h:53
QLineF curveLineAt(const QwtPlotCurve *, double x) const
QPoint invTransform(QPointF)
void setEnabled(bool enable)
QwtPlotMarker * _text_marker
Definition: customtracker.h:54
QPointF _prev_trackerpoint
Definition: customtracker.h:51
std::vector< QwtPlotMarker * > _marker
Definition: customtracker.h:52
QwtPlot * _plot
Definition: customtracker.h:55
std::enable_if_t< all< Args... >::value, enable_t > enable
Definition: sol.hpp:1726
QPointF actualPosition() const
void setPosition(const QPointF &pos)
void setParameter(Parameter par)
A class for drawing markers.


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:47:33