qt_demoe/nettool/form/frmtcpclient.h

47 lines
825 B
C
Raw Normal View History

2019-09-29 05:13:01 +00:00
#ifndef FRMTCPCLIENT_H
#define FRMTCPCLIENT_H
#include <QWidget>
#include <QtNetwork>
namespace Ui {
class frmTcpClient;
}
class frmTcpClient : public QWidget
{
Q_OBJECT
public:
explicit frmTcpClient(QWidget *parent = 0);
~frmTcpClient();
private:
Ui::frmTcpClient *ui;
bool isOk;
QTcpSocket *socket;
2019-09-29 05:13:01 +00:00
QTimer *timer;
private slots:
void initForm();
void initConfig();
void saveConfig();
2019-12-05 08:01:43 +00:00
void changeTimer();
2019-09-29 05:13:01 +00:00
void append(int type, const QString &data, bool clear = false);
private slots:
2019-09-29 05:13:01 +00:00
void connected();
void disconnected();
void readData();
void sendData(const QString &data);
private slots:
void on_btnConnect_clicked();
void on_btnSave_clicked();
void on_btnClear_clicked();
void on_btnSend_clicked();
};
#endif // FRMTCPCLIENT_H