FaceAccess/Linguist/setupUi/SetupUi.h
2024-07-11 11:27:12 +08:00

110 lines
2.3 KiB
C++

#ifndef SETUPUI_H
#define SETUPUI_H
#include "UiTools.h"
#include <QStack>
#include <QRadioButton>
#include "settingUiFastCfg.h"
class SetupUiProtoDoc : public MyWidgetWithMainStyleColor
{
Q_OBJECT
public:
explicit SetupUiProtoDoc(QWidget *parent = nullptr);
};
class SetupUiPrivacyDoc : public MyWidgetWithMainStyleColor
{
Q_OBJECT
public:
explicit SetupUiPrivacyDoc(QWidget *parent = nullptr);
};
class SetupUiStart : public MyWidgetWithMainStyleColor
{
Q_OBJECT
public:
explicit SetupUiStart(QWidget *parent = nullptr);
signals:
void signalJumpPage(int pageIndex);
public slots:
void slotRadioButtonPressed();
void slotBtnClicked();
private:
QPushButton* m_btnProtocol;
QPushButton* m_btnPrivacy;
QRadioButton* m_rbAgree;
QPushButton* m_btnStart;
};
class SetupUiConfig : public MyWidgetWithMainStyleColor
{
Q_OBJECT
public:
static const int JUMP_BTN_FONT_SIZE[UiConfig::SUPPORT_SCREEN_SIZE_QUANTITY];
explicit SetupUiConfig(QWidget *parent = nullptr);
signals:
void signalSetupDone();
void signalJumpPage(int pageIndex);
public slots:
void slotBtnClicked();
private:
QPushButton* m_btnQrcode;
QPushButton* m_btnManual;
QPushButton* m_btnSkip;
};
class SetupUiTop : public MyWidgetWithMainStyleColor
{
Q_OBJECT
public:
explicit SetupUiTop(QWidget *parent = nullptr);
void hideBackBtn(bool hide);
signals:
void signalReturnBtnClicked();
public slots:
private:
QPushButton* m_btnBack;
};
class SetupUi : public WidgetWithBackstageInterface
{
Q_OBJECT
public:
explicit SetupUi(QWidget *parent = nullptr);
void setBackstageUiinterface(BackstageInterfaceForUi* interface);
signals:
void signalSetupDone();
public slots:
void slotBtnClicked();
void slotSetupDone();
void slotJumpPage(int pageIndex);
private:
SetupUiTop* m_topbar;
QStackedWidget* m_stackPages;
QStack<int> m_pagePath;
SetupUiStart* m_pageStart;
SetupUiProtoDoc* m_pageProt;
SetupUiPrivacyDoc* m_pagePriv;
SetupUiConfig* m_pageConfig;
SettingUiQrcode* m_pageQrcode;
settingUiFastCfgWireNet* m_pageManualNet;
settingUiFastCfgPark* m_pageManualPark;
};
#endif // SETUPUI_H