-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwidget.h
More file actions
43 lines (37 loc) · 841 Bytes
/
widget.h
File metadata and controls
43 lines (37 loc) · 841 Bytes
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
#ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
#include <QRegularExpression>
#include <QRegularExpressionValidator>
#include <QIntValidator>
#include <QTcpServer>
#include <QTcpSocket>
#include <QFileDialog>
#include <QMessageBox>
#include <QThread>
QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE
class Widget : public QWidget
{
Q_OBJECT
public:
Widget(QWidget *parent = nullptr);
~Widget();
private slots:
void on_chooseFileButton_clicked();
void socketConnected();
void processSocketData();
void process2();
void disconnected();
private:
Ui::Widget *ui;
QRegularExpression *ipRegex;
bool fileSet = false;
QString fileName;
QTcpServer *server;
QTcpSocket *socket;
QTcpSocket *abstractServerSocket;
QString serverFileName;
};
#endif // WIDGET_H