-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsystemoption.h
More file actions
49 lines (46 loc) · 1.12 KB
/
systemoption.h
File metadata and controls
49 lines (46 loc) · 1.12 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
#ifndef SYSTEMOPTION_H
#define SYSTEMOPTION_H
#include <QWidget>
#include <QLabel>
#include <QComboBox>
#include <QLineEdit>
#include <QPushButton>
#include "tcpserver.h"
#include <QGridLayout>
#include <QTcpSocket>
class SystemOption : public QWidget
{
Q_OBJECT
public:
SystemOption(QWidget *parent = nullptr);
int getCurrentSocketDescriptor() const;
TcpServer* getServer();
~SystemOption();
private:
QLabel *comLabel;
QComboBox *comComboBox;
QLabel *baudRateLabel;
QComboBox *baudRateComboBox;
QPushButton *comButton;
QLabel *comStatusLabel;
QLabel *comStatus;
QLabel *ipLabel;
QLabel *portLabel;
QLineEdit *getIp;
QLineEdit *getPort;
QPushButton *listen;
QLabel *linkStatusLabel;
QComboBox *linkStatus;
QLabel *serverStatusLabel;
QLabel *serverStatus;
TcpServer *server;
QGridLayout *systemOptionLayout;
int port;
signals:
void currentsocketChanged(int socketDescriptor);
public slots:
void newlisten();
void comboBoxAddItem(int socketDescriptor);
void comboBoxDeleteItem(int socketDescritor);
};
#endif // SYSTEMOPTION_H