source: flair-src/trunk/tools/FlairGCS/src/DataPlot2D.h@ 10

Last change on this file since 10 was 10, checked in by Sanahuja Guillaume, 6 years ago

lic

File size: 1.6 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 DATAPLOT2D_H_INCLUDED
6#define DATAPLOT2D_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;
17
18class DataPlot2D : public DataRemote
19{
20 Q_OBJECT
21
22 public:
23 DataPlot2D(Layout* parent,int row, int col,QString plot_name,QString x_name,QString y_name,float xmin, float xmax,float ymin, float ymax,bool enabled,int period);
24 ~DataPlot2D();
25 void addCurve(QPen pen,QString legend,QString type);
26
27 protected:
28 void mousePressEvent(QMouseEvent *event);
29
30 private:
31 QwtPlot* plot;
32 void XmlEvent(QDomElement dom);
33 void alignScales(void);
34 void plot_data(double data_x,double data_y,int index);
35 float xmin_orig,xmax_orig,ymin_orig,ymax_orig;
36
37 QList<QwtPlotCurve*> *datas;
38 QList<QString> *datas_type;
39 QList<bool> datas_first_update;
40 QList<double*> d_x;
41 QList<double*> d_y;
42 double view_size;//en s
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 void showCurve(QwtPlotItem *item, bool on);
49
50 private slots:
51 void legendChecked( const QVariant &itemInfo, bool on );
52};
53
54
55#endif // DATAPLOT2D_H_INCLUDED
Note: See TracBrowser for help on using the repository browser.