-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmainwindow.h
58 lines (47 loc) · 1.11 KB
/
mainwindow.h
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
58
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QMovie>
#include <QString>
#include <QThread>
#include <QChart>
#include <QChartView>
#include <QtCharts/QValueAxis>//用于显示坐标系
#include <QtCharts/QSplineSeries>
#include <QDateTime>
QT_CHARTS_USE_NAMESPACE
#include "tcpnetclient.h"
#include "timethread.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
void initLoadingWindow();
void systemInit();
public slots:
//检测链接状态
void connectSuccess();
//获取网络数据
void getNetData(BaseData data);
//更新图表
void updateChartView();
private:
Ui::MainWindow *ui;
TcpNetClient *tcp;//tcp连接
double depth;//水深
double headingAngle;//艏向角
int compassDegrees;//指南针度数
//图表基本信息
QChart *chart;
QChartView *ChartView;
QValueAxis *axisX;
QValueAxis *axisY;
QSplineSeries *series;
int x_index;
};
#endif // MAINWINDOW_H