source: flair-src/trunk/tools/FlairGCS/src/UsSensorPlot.h @ 221

Last change on this file since 221 was 221, checked in by Sanahuja Guillaume, 4 years ago

add us plot

File size: 1.3 KB
Line 
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
12class Layout;
13class QwtPlot;
14class QwtPlotCurve;
15class QwtPlotItem;
16class QMouseEvent;
17class QwtPlotMarker;
18
19class UsSensorPlot : public DataRemote {
20  Q_OBJECT
21
22public:
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
27protected:
28  void mousePressEvent(QMouseEvent *event);
29
30private:
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
Note: See TracBrowser for help on using the repository browser.