2018-06-01 09:36:01 +00:00
|
|
|
#ifndef QLOGINWIDGET_H
|
|
|
|
#define QLOGINWIDGET_H
|
|
|
|
|
|
|
|
#include <string>
|
2018-06-02 09:47:28 +00:00
|
|
|
#include <QtWidgets/QtWidgets>
|
2018-06-01 09:36:01 +00:00
|
|
|
#include "ui_QLoginWidget.h"
|
2018-06-15 07:32:41 +00:00
|
|
|
|
2018-06-01 09:36:01 +00:00
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
class QLoginWidget : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
QLoginWidget(QWidget *parent = 0);
|
|
|
|
~QLoginWidget();
|
|
|
|
|
2018-06-15 07:32:41 +00:00
|
|
|
bool isLogin() const { return doesLoginSuccess; }
|
2018-06-01 09:36:01 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void init();
|
|
|
|
void initWidget();
|
|
|
|
void initSignal();
|
|
|
|
|
|
|
|
protected Q_SLOTS:
|
2018-06-15 07:32:41 +00:00
|
|
|
void onLogin();
|
|
|
|
void onCancel();
|
2018-06-01 09:36:01 +00:00
|
|
|
|
2018-06-15 07:32:41 +00:00
|
|
|
void onQueryUserInfo();
|
2018-06-01 09:36:01 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::QLoginWidget ui;
|
|
|
|
QTextCodec * pCodecLocal;
|
|
|
|
QTextCodec * pCodecUTF8;
|
|
|
|
|
|
|
|
private:
|
2018-06-15 07:32:41 +00:00
|
|
|
string userCode;
|
|
|
|
string userName;
|
|
|
|
string userPassword;
|
2018-06-01 09:36:01 +00:00
|
|
|
|
2018-06-15 07:32:41 +00:00
|
|
|
bool doesLoginSuccess;
|
2018-06-01 09:36:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // QLOGINWIDGET_H
|