[10] | 1 | // %flair:license{
|
---|
| 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
| 4 | // %flair:license}
|
---|
[9] | 5 | #ifndef RANGEFINDERPLOT_H_INCLUDED
|
---|
| 6 | #define RANGEFINDERPLOT_H_INCLUDED
|
---|
| 7 |
|
---|
| 8 | #include "DataRemote.h"
|
---|
| 9 | #include <stdint.h>
|
---|
| 10 |
|
---|
| 11 | class QwtPlotShapeItem;
|
---|
| 12 | class Layout;
|
---|
| 13 | class QwtPlot;
|
---|
| 14 | class QMouseEvent;
|
---|
| 15 |
|
---|
| 16 | class RangeFinderPlot : public DataRemote
|
---|
| 17 | {
|
---|
| 18 | Q_OBJECT
|
---|
| 19 |
|
---|
| 20 | public:
|
---|
| 21 | RangeFinderPlot(Layout* parent,int row, int col,QString name,QString x_name,QString y_name,
|
---|
| 22 | float xmin, float xmax,float ymin, float ymax,
|
---|
| 23 | float start_angle,float end_angle,uint32_t nb_samples,QString data_type,
|
---|
| 24 | bool invert_axis,bool enabled,int period);
|
---|
| 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;
|
---|
| 36 | void XmlEvent(QDomElement dom);
|
---|
| 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 *);
|
---|
| 46 | void BufEvent(char** buf,int *buf_size,uint16_t period,bool big_endian);
|
---|
| 47 | };
|
---|
| 48 |
|
---|
| 49 |
|
---|
| 50 | #endif // RANGEFINDERPLOT_H_INCLUDED
|
---|