-
Notifications
You must be signed in to change notification settings - Fork 2
/
mainwindow.h
88 lines (70 loc) · 1.83 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QTcpServer>
#include <QTcpSocket>
#include <QUdpSocket>
#include <QSettings>
#include "libutil/basedef.h"
#include "libcom/libcom.h"
#include "libnet/libnet.h"
#include "ui/comconfigform.h"
#include "ui/netconfigform.h"
#include "ui/setrs485.h"
#include "ui/setlogicaddr.h"
#include "ui/toolsdialog.h"
#include "ui/filessum.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = Q_NULLPTR);
~MainWindow();
public slots:
private slots:
void on_btnOpenCom_clicked();
void on_btnListenTcp_clicked();
void on_pushButton_Send_clicked();
void on_Button_ClrRcv_clicked();
void on_actionComconfig_triggered();
void on_actionNetconfig_triggered();
void on_actionSetLogicAddr_triggered();
void on_actionSetRS485Config_triggered();
void on_actionSums_triggered();
void on_actionFilesum_triggered();
void delToolDiag();
void delFileSum();
void serverNewConnect();
void newclient(clientInfo_s);
void socketReadData();
void socketDisconnected();
void comReadData(QByteArray);
void sendMsg();
void setRecvCursor();
QString byteArrayToString(QByteArray, bool);
private:
Ui::MainWindow *ui;
comConfigForm *comUi;
netConfigForm *netUi;
setLogicAddr *logicAddrUi;
setRS485 *rs485Ui;
toolsDialog* toolsDiag;
filesSum *filesumWgt;
QTcpServer* pServer;
QTcpSocket* pSocket;
QUdpSocket* m_pUdpSoket;
QString m_tcpPort;
QSettings *m_config;
netSvr *m_netSvr;
QList<clientInfo_s> m_clientList;
QList<QTcpSocket*> tcpClientList;
QTcpSocket *pCurrentClient;
comObj *m_comObj;
QThread *m_comThread;
signals:
void sendBuf(QByteArray);
};
#endif // MAINWINDOW_H