| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #ifndef TLOGIN_H
- #define TLOGIN_H
- #include <QDialog>
- #include "qpushbutton.h"
- class QLineEdit;
- class QLabel;
- class QCheckBox;
- class TLogin : public QDialog
- {
- Q_OBJECT
- public:
- explicit TLogin(QWidget *parent = nullptr);
- void on_login_clicked();
- void on_offline_login_clicked(); // 添加离线登录槽函数
- void on_refresh_captcha_clicked(); // 刷新验证码
- protected:
- void mousePressEvent(QMouseEvent *event);
- void mouseMoveEvent(QMouseEvent *event);
- signals:
- void loginSuccessful();
- private:
- QPoint m_dragPosition;
- QPushButton *loginPushButton;
- QPushButton *offlineLoginButton; // 添加离线登录按钮
- QLineEdit *usernameEdit;
- QLineEdit *passwordEdit;
- QLineEdit *captchaEdit;
- QCheckBox *rememberUsernameCheckBox; // 添加记住用户名复选框
- class CaptchaLabel *captchaImage;
- QLabel *info;
-
- QString captchaId; // 存储验证码ID
-
- void getCaptcha(); // 获取验证码
- void loadSavedUsername(); // 加载保存的用户名
- };
- #endif // TLOGIN_H
|