Files
QT_wuhan_YT/pages/selfcheck.h
T
2026-09-10 14:10:40 +08:00

49 lines
1.1 KiB
C++

#ifndef SELFCHECKPAGE_H
#define SELFCHECKPAGE_H
#include "base.h"
#include <QVector>
class TitleBar;
class QLabel;
class QProgressBar;
class QPushButton;
class LedIndicator;
// ===================== ④ 自检界面(系统启动及自检) =====================
class SelfCheckPage : public BasePage
{
Q_OBJECT
public:
explicit SelfCheckPage(AppContext* ctx, QWidget* parent = nullptr);
void startSelfCheck();
void resetAll();
protected:
void showEvent(QShowEvent* ev) override;
private slots:
void onSelfCheckItem(int index, bool ok);
void onSelfCheckDone(bool allOk);
void onIgnoreFault();
void onJobSelect();
void onHelp();
private:
void resetItems(); // 复位 10 个自检项(指示灯置灰、结果“待检测”)
TitleBar* m_titleBar = nullptr;
QLabel* m_status = nullptr;
QVector<LedIndicator*> m_leds;
QVector<QLabel*> m_results;
QProgressBar* m_progress = nullptr;
QPushButton* m_faultQuery = nullptr;
QPushButton* m_ignore = nullptr;
QPushButton* m_job = nullptr;
bool m_autoStarted = false;
bool m_done = false;
};
#endif // SELFCHECKPAGE_H