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}
|
---|
5 | #ifndef USSENSORPLOT_H_INCLUDED
|
---|
6 | #define USSENSORPLOT_H_INCLUDED
|
---|
7 |
|
---|
8 | #include "DataRemote.h"
|
---|
9 | #include <stdint.h>
|
---|
10 | #include <QPen>
|
---|
11 |
|
---|
12 | class Layout;
|
---|
13 | class QwtPlot;
|
---|
14 | class QwtPlotCurve;
|
---|
15 | class QwtPlotItem;
|
---|
16 | class QMouseEvent;
|
---|
17 | class QwtPlotMarker;
|
---|
18 |
|
---|
19 | class UsSensorPlot : public DataRemote {
|
---|
20 | Q_OBJECT
|
---|
21 |
|
---|
22 | public:
|
---|
23 | UsSensorPlot(Layout *parent, int row, int col, QString plot_name,
|
---|
24 | QString y_name, float ymin,float ymax, uint32_t nbSamples,QString datasType,bool enabled, int period);
|
---|
25 | ~UsSensorPlot();
|
---|
26 |
|
---|
27 | protected:
|
---|
28 | void mousePressEvent(QMouseEvent *event);
|
---|
29 |
|
---|
30 | private:
|
---|
31 | QwtPlot *plot;
|
---|
32 | void XmlEvent(QDomElement dom);
|
---|
33 | void alignScales(void);
|
---|
34 | float xmin_orig, xmax_orig, ymin_orig, ymax_orig;
|
---|
35 |
|
---|
36 | QwtPlotCurve *datas;
|
---|
37 | QwtPlotMarker *firstPeakStart,*firstPeakEnd,*secondPeakStart,*secondPeakEnd;
|
---|
38 | QString datasType;
|
---|
39 | bool datas_first_update;
|
---|
40 | double *dx;
|
---|
41 | double *dy;
|
---|
42 | uint32_t nbSamples;
|
---|
43 |
|
---|
44 | bool eventFilter(QObject *, QEvent *);
|
---|
45 | void setYAxisScale(float ymin, float ymax);
|
---|
46 | void setXAxisScale(float xmin, float xmax);
|
---|
47 | void BufEvent(char **buf, int *buf_size, uint16_t period, bool big_endian);
|
---|
48 | };
|
---|
49 |
|
---|
50 | #endif // USSENSORPLOT_H_INCLUDED
|
---|