mirror of
https://gitee.com/Zhaoxin59/my-chat_-client.git
synced 2026-02-13 16:41:48 +08:00
41 lines
850 B
C++
41 lines
850 B
C++
#pragma once
|
|
|
|
#include <QWidget>
|
|
#include <QGridLayout>
|
|
#include <QLabel>
|
|
#include <QLineEdit>
|
|
#include <QPushButton>
|
|
|
|
#include "loginwidget.h"
|
|
|
|
class PhoneLoginWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
PhoneLoginWidget(QWidget *parent);
|
|
|
|
void sendVerifyCode();
|
|
void sendVerifyCodeDone(bool ok);
|
|
|
|
void clickSubmitBtn();
|
|
void phoneLoginDone(bool ok, const QString& reason);
|
|
void phoneRegisterDone(bool ok, const QString& reason);
|
|
|
|
void countDown();
|
|
void switchMode();
|
|
|
|
private:
|
|
QLineEdit* phoneEdit;
|
|
QPushButton* sendVerifyCodeBtn;
|
|
QLineEdit* verifyCodeEdit;
|
|
QLabel* titleLabel;
|
|
QPushButton* submitBtn;
|
|
QPushButton* switchModeBtn;
|
|
|
|
bool isLoginMode = true;
|
|
QString currentPhone = ""; // 记录是使用哪个手机号发送的验证码
|
|
QTimer* timer;
|
|
int leftTime = 30;
|
|
};
|