#ifndef DIALOG_LOG_REG
#define DIALOG_LOG_REG
#include
#include
#include "ui_log_reg.h"
class Log_reg : public QDialog, public Ui_log_reg
{
Q_OBJECT
public:
Log_reg(QTcpSocket *mtcpSocket, QWidget *parent = 0);
private slots:
void log_Deal(); //deal with login button;
void reg_Deal(); //deal with regist button;
void quit_Deal(); //deal with the quit button;
void recvMsg(); //deal with recieve msg from net;
void error();
private:
QTcpSocket *tcpSocket;
QString msgBuffer;
int state; //record the state if login or regist;
int log_time; //record the fault login times ,quit if > 3;
public:
int success; //reject if login success or in other reason;
};
#endif
/******************************************************************
* Filename : log_reg.cpp
****************************************************************** */