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

Last change on this file since 60 was 15, checked in by Bayard Gildas, 9 years ago

sources reformatted with flair-format-dir script

File size: 1.4 KB
RevLine 
[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 DATAPLOT2D_H_INCLUDED
6#define DATAPLOT2D_H_INCLUDED
[9]7
8#include "DataRemote.h"
9#include <stdint.h>
[15]10#include <QPen>
[9]11
12class Layout;
13class QwtPlot;
14class QwtPlotCurve;
15class QwtPlotItem;
16class QMouseEvent;
17
[15]18class DataPlot2D : public DataRemote {
19 Q_OBJECT
[9]20
[15]21public:
22 DataPlot2D(Layout *parent, int row, int col, QString plot_name,
23 QString x_name, QString y_name, float xmin, float xmax, float ymin,
24 float ymax, bool enabled, int period);
25 ~DataPlot2D();
26 void addCurve(QPen pen, QString legend, QString type);
[9]27
[15]28protected:
29 void mousePressEvent(QMouseEvent *event);
30
31private:
32 QwtPlot *plot;
33 void XmlEvent(QDomElement dom);
34 void alignScales(void);
35 void plot_data(double data_x, double data_y, int index);
36 float xmin_orig, xmax_orig, ymin_orig, ymax_orig;
37
38 QList<QwtPlotCurve *> *datas;
39 QList<QString> *datas_type;
40 QList<bool> datas_first_update;
41 QList<double *> d_x;
42 QList<double *> d_y;
43 double view_size; // en s
44
45 bool eventFilter(QObject *, QEvent *);
46 void setYAxisScale(float ymin, float ymax);
47 void setXAxisScale(float xmin, float xmax);
48 void BufEvent(char **buf, int *buf_size, uint16_t period, bool big_endian);
49 void showCurve(QwtPlotItem *item, bool on);
50
51private slots:
52 void legendChecked(const QVariant &itemInfo, bool on);
53};
54
55#endif // DATAPLOT2D_H_INCLUDED
Note: See TracBrowser for help on using the repository browser.