qt_demoe/tool/nettool/form/frmudpserver.h

49 lines
907 B
C
Raw Normal View History

2019-09-29 05:13:01 +00:00
#ifndef FRMUDPSERVER_H
#define FRMUDPSERVER_H
#include <QWidget>
#include <QtNetwork>
namespace Ui {
class frmUdpServer;
}
class frmUdpServer : public QWidget
{
Q_OBJECT
public:
explicit frmUdpServer(QWidget *parent = 0);
~frmUdpServer();
2021-08-22 02:57:02 +00:00
protected:
bool eventFilter(QObject *watched, QEvent *event);
2019-09-29 05:13:01 +00:00
private:
Ui::frmUdpServer *ui;
2019-09-29 05:13:01 +00:00
QUdpSocket *socket;
2019-09-29 05:13:01 +00:00
QTimer *timer;
private slots:
void initForm();
void initConfig();
void saveConfig();
void initTimer();
2019-09-29 05:13:01 +00:00
void append(int type, const QString &data, bool clear = false);
private slots:
2021-08-22 02:57:02 +00:00
void error();
2019-09-29 05:13:01 +00:00
void readData();
void sendData(const QString &ip, int port, const QString &data);
private slots:
void on_btnListen_clicked();
void on_btnSave_clicked();
void on_btnClear_clicked();
void on_btnSend_clicked();
2021-08-22 02:57:02 +00:00
void on_btnRemove_clicked();
2019-09-29 05:13:01 +00:00
};
#endif // FRMUDPSERVER_H