39 lines
753 B
C++
39 lines
753 B
C++
#ifndef BOOTPASSWORDPAGE_H
|
|
#define BOOTPASSWORDPAGE_H
|
|
|
|
#include "basepage.h"
|
|
|
|
class QLineEdit;
|
|
class QLabel;
|
|
|
|
// ===================== ③ 开机密码主界面 =====================
|
|
class BootPasswordPage : public BasePage
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit BootPasswordPage(AppContext* ctx, QWidget* parent = nullptr);
|
|
|
|
void clearInput();
|
|
void focusInput();
|
|
|
|
protected:
|
|
bool eventFilter(QObject* obj, QEvent* ev) override;
|
|
|
|
private slots:
|
|
void onInputClicked();
|
|
void onConfirm();
|
|
void onCancel();
|
|
void onForget();
|
|
|
|
private:
|
|
void refreshInput();
|
|
|
|
QLineEdit* m_input = nullptr;
|
|
QLabel* m_error = nullptr;
|
|
QString m_value;
|
|
int m_wrongCount = 0;
|
|
bool m_locked = false;
|
|
};
|
|
|
|
#endif // BOOTPASSWORDPAGE_H
|