You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.3 KiB
53 lines
1.3 KiB
#ifndef DP4LOGINWIDGET_H
|
|
#define DP4LOGINWIDGET_H
|
|
|
|
#include "login_module_interface_v2.h"
|
|
|
|
#include <QWidget>
|
|
#include <QMessageBox>
|
|
|
|
namespace dss {
|
|
namespace module_v2 {
|
|
struct AuthCallbackData;
|
|
struct LoginCallBack;
|
|
struct AuthCallbackData;
|
|
}
|
|
};
|
|
|
|
class Dp4LoginWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit Dp4LoginWidget(QWidget *parent = nullptr);
|
|
~Dp4LoginWidget() override;
|
|
|
|
void updateAuthenResult(int type, int state);
|
|
void setAccountError();
|
|
void setCurrentAccount(const QString &accountName, const QString &fullname, const QString &avatar);
|
|
|
|
void reset();
|
|
|
|
signals:
|
|
void requestSendAuthen(const QString &account, const QString &token);
|
|
|
|
private:
|
|
void Logon();
|
|
void ResetPassword();
|
|
void initUi();
|
|
bool eventFilter(QObject *watchd, QEvent *event) override;
|
|
int MessageBox(const QString&,const QString&,QMessageBox::Icon=QMessageBox::NoIcon,QMessageBox::StandardButtons=QMessageBox::Ok);
|
|
private:
|
|
bool lockscr=false; // lock screen / login screen
|
|
QWidget *m_topWidget;
|
|
class QLabel *m_labelImage;
|
|
// QLabel *m_labelOtherUser;
|
|
QLabel *m_labelText;
|
|
class QVBoxLayout *m_layout;
|
|
class QComboBox *m_environment;
|
|
class QLineEdit *m_username;
|
|
class QLineEdit *m_password;
|
|
class QPushButton *m_pbForgetPassword;
|
|
};
|
|
|
|
#endif // TESTWIDGET_H
|
|
|