-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatawave.h
More file actions
57 lines (53 loc) · 1.46 KB
/
datawave.h
File metadata and controls
57 lines (53 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef DATAWAVE_H
#define DATAWAVE_H
#include <QWidget>
#include <Qwt/qwt_plot.h>
#include <Qwt/qwt_plot_curve.h>
#include <Qwt/qwt_plot_canvas.h>
#include <Qwt/qwt_legend.h>
#include <QPolygonF>
#include <QFont>
#include <QGridLayout>
#include <QPointer>
class DataWave : public QWidget
{
Q_OBJECT
public:
explicit DataWave(QWidget *parent = nullptr);
~DataWave();
private:
QwtPlot *plot;
QPointer<QwtPlotCanvas> canvas;
QwtPlotCurve *accelerationXCurve;
QPolygonF accelerationXPoint;
QwtPlotCurve *accelerationYCurve;
QPolygonF accelerationYPoint;
QwtPlotCurve *accelerationZCurve;
QPolygonF accelerationZPoint;
QwtPlotCurve *gyroscopeXCurve;
QPolygonF gyroscopeXPoint;
QwtPlotCurve *gyroscopeYCurve;
QPolygonF gyroscopeYPoint;
QwtPlotCurve *gyroscopeZCurve;
QPolygonF gyroscopeZPoint;
QwtPlotCurve *rollAngelCurve;
QPolygonF rollAngelPoint;
QwtPlotCurve *pitchAngelCurve;
QPolygonF pitchAngelPoint;
QwtPlotCurve *driftAngelCurve;
QPolygonF driftAngelPoint;
QwtLegend *legend;
QFont legendFont;
QGridLayout *dataWaveLayout;
int nowDisplayPoints;
int nowSocketDescriptor;//it may be deleted
int nowNodeDescriptor;
void clearCurves();
static const int maxDisplayPoints;
signals:
public slots:
void showItemChecked(const QVariant &itemInfo, bool on);
void getData(int socketDescriptor, QString data);
void nodeChanged(int newNode);
};
#endif // DATAWAVE_H