This repository has been archived on 2024-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
NG_2024_Stanislav_Mykhailenko/Lesson_6/Task_1/Client/client.h
Stanislav Mykhailenko 1af9c40b2a
Add Lesson 6 Task 1
2024-07-29 15:03:10 +03:00

37 lines
625 B
C++

#ifndef CLIENT_H
#define CLIENT_H
#include <QMainWindow>
#include <QFileDialog>
#include <QHostAddress>
#include <QTcpSocket>
QT_BEGIN_NAMESPACE
namespace Ui {
class Client;
}
QT_END_NAMESPACE
class Client : public QMainWindow
{
Q_OBJECT
public:
Client(QWidget *parent = nullptr);
~Client();
private slots:
void sendFile();
void connectPressed();
void connectionEstablished();
void checkSendingAllowed();
void selectFile();
private:
Ui::Client *ui;
QTcpSocket *m_socket = new QTcpSocket();
QDataStream m_block;
QFile m_file;
QString m_fileName;
};
#endif // CLIENT_H