加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
dialog.h 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
Zhou YuXi 提交于 2020-11-07 19:07 . add something
#ifndef DIALOG_H
#define DIALOG_H
#include <QDialog>
#include <QDebug>
#include "mainwindow.h"
#include <QFile>
#include "mytcpclient.h"
#include <QTime>
#include <QMessageBox>
#include <QPropertyAnimation>
//#define ADD
namespace Ui {
class Dialog;
}
/**
* @brief The Dialog class
*
*/
class Dialog : public QDialog
{
Q_OBJECT
public:
explicit Dialog(QWidget *parent = nullptr);
~Dialog();
void sleep(qint32 sec);
void setIp(QString _ip);
void setPort(qint32 _port);
signals:
void newMsg(QString msg);
public slots:
void on_pushButton_clicked();
void on_pushButton_2_clicked();
#ifdef ADD
protected:
void closeEvent(QCloseEvent * e) override;
void showEvent(QShowEvent* e) override;
#endif
private:
Ui::Dialog *ui;
MainWindow* w; //main window
MyTcpClient* socket; //used to connect, send and receive
QString ip = "127.0.0.1"; //ip
qint32 port = 18080; //port
#ifdef ADD
QPropertyAnimation* animation; //implement close and open animation
#endif
};
#endif // DIALOG_H
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化