[10] | 1 | // %flair:license{
|
---|
[15] | 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[10] | 4 | // %flair:license}
|
---|
[15] | 5 | #ifndef RANGEFINDERPLOT_H_INCLUDED
|
---|
| 6 | #define RANGEFINDERPLOT_H_INCLUDED
|
---|
[9] | 7 |
|
---|
| 8 | #include "DataRemote.h"
|
---|
[15] | 9 | #include <stdint.h>
|
---|
| 10 |
|
---|
[9] | 11 | class QwtPlotShapeItem;
|
---|
| 12 | class Layout;
|
---|
| 13 | class QwtPlot;
|
---|
| 14 | class QMouseEvent;
|
---|
| 15 |
|
---|
[15] | 16 | class RangeFinderPlot : public DataRemote {
|
---|
| 17 | Q_OBJECT
|
---|
| 18 |
|
---|
| 19 | public:
|
---|
| 20 | RangeFinderPlot(Layout *parent, int row, int col, QString name,
|
---|
| 21 | QString x_name, QString y_name, float xmin, float xmax,
|
---|
| 22 | float ymin, float ymax, float start_angle, float end_angle,
|
---|
| 23 | uint32_t nb_samples, QString data_type, bool invert_axis,
|
---|
[437] | 24 | bool enabled, uint16_t period);
|
---|
[15] | 25 | ~RangeFinderPlot();
|
---|
| 26 |
|
---|
| 27 | protected:
|
---|
| 28 | void mousePressEvent(QMouseEvent *event);
|
---|
| 29 |
|
---|
| 30 | private:
|
---|
| 31 | void setYAxisScale(float ymin, float ymax);
|
---|
| 32 | void setXAxisScale(float xmin, float xmax);
|
---|
| 33 | void addTriangle(float angle_min, float angle_max);
|
---|
| 34 | void SetTriangle(uint32_t id, float length);
|
---|
| 35 | QwtPlot *plot;
|
---|
[269] | 36 | void XmlEvent(QDomElement *dom);
|
---|
[15] | 37 | void alignScales(void);
|
---|
| 38 | float xmin_orig, xmax_orig, ymin_orig, ymax_orig;
|
---|
| 39 | float start_angle, end_angle;
|
---|
| 40 | uint32_t nb_samples;
|
---|
| 41 | QString data_type;
|
---|
| 42 | QList<QwtPlotShapeItem *> triangles;
|
---|
| 43 | bool invert_axis;
|
---|
| 44 |
|
---|
| 45 | bool eventFilter(QObject *, QEvent *);
|
---|
[444] | 46 | void BufEvent(char **buf, int *buf_size, uint16_t period,uint16_t nb_buffering,bool big_endian);
|
---|
[15] | 47 | };
|
---|
| 48 |
|
---|
| 49 | #endif // RANGEFINDERPLOT_H_INCLUDED
|
---|