50 lines
1.2 KiB
C++
50 lines
1.2 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 onSelfCheckItemBusy(int index);
|
|
void onSelfCheckItem(int index, bool ok);
|
|
void onSelfCheckDone(bool allOk);
|
|
void onIgnoreFault();
|
|
void onJobSelect();
|
|
void onHelp();
|
|
|
|
private:
|
|
void resetItems(); // 复位 14 个自检项(指示灯置灰、结果“待检测”)
|
|
|
|
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
|