feat:初始化wuhan_QT界面代码
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
#ifndef WASHBASEPAGE_H
|
||||
#define WASHBASEPAGE_H
|
||||
|
||||
#include "basepage.h"
|
||||
#include <QVector>
|
||||
|
||||
class TitleBar;
|
||||
class AlarmBanner;
|
||||
class DataCard;
|
||||
class LedIndicator;
|
||||
class QPushButton;
|
||||
class QVBoxLayout;
|
||||
class QTimer;
|
||||
|
||||
// ===================== 洗消页面基类(⑨手动消除 / ⑩手动消毒 共用) =====================
|
||||
// 左侧状态卡 + 中央洗消参数卡 + 右侧启动/停止与参数 + 底部指示灯条
|
||||
class WashBasePage : public BasePage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
// title:页面标题;washTitle:中央洗消卡标题
|
||||
WashBasePage(AppContext* ctx, const QString& title, const QString& washTitle,
|
||||
QWidget* parent = nullptr);
|
||||
|
||||
protected:
|
||||
// 子类向右侧参数区添加参数控件
|
||||
QVBoxLayout* paramsLayout() const { return m_paramsLayout; }
|
||||
|
||||
// 启动/停止状态变化通知
|
||||
virtual void onWashStateChanged(bool running) { Q_UNUSED(running); }
|
||||
|
||||
// 恢复出厂值(子类实现)
|
||||
virtual void resetFactory() = 0;
|
||||
|
||||
// 洗消模式标识:"clean" / "disinfect"
|
||||
virtual QString washModeTag() const = 0;
|
||||
|
||||
private slots:
|
||||
void onStart();
|
||||
void onStop();
|
||||
void onBack();
|
||||
void onFactory();
|
||||
void refresh();
|
||||
void rotateFaults();
|
||||
|
||||
private:
|
||||
void updateGating();
|
||||
|
||||
TitleBar* m_titleBar = nullptr;
|
||||
AlarmBanner* m_banner = nullptr;
|
||||
DataCard* m_chassisCard = nullptr;
|
||||
DataCard* m_armCard = nullptr;
|
||||
DataCard* m_gasCard = nullptr;
|
||||
DataCard* m_washCard = nullptr;
|
||||
QPushButton* m_start = nullptr;
|
||||
QPushButton* m_stop = nullptr;
|
||||
QPushButton* m_back = nullptr;
|
||||
QPushButton* m_factory = nullptr;
|
||||
QVBoxLayout* m_paramsLayout = nullptr;
|
||||
|
||||
// 底部指示灯
|
||||
LedIndicator* m_ledRun = nullptr;
|
||||
LedIndicator* m_ledPlunger = nullptr;
|
||||
LedIndicator* m_ledAir = nullptr;
|
||||
LedIndicator* m_ledLeaf = nullptr;
|
||||
LedIndicator* m_ledLevel = nullptr;
|
||||
LedIndicator* m_ledD1 = nullptr;
|
||||
LedIndicator* m_ledD2 = nullptr;
|
||||
LedIndicator* m_ledFault = nullptr;
|
||||
|
||||
// 中央洗消卡字段索引
|
||||
int m_fMode = -1, m_fLevelA = -1, m_fLevelFoam = -1;
|
||||
int m_fFlowA = -1, m_fFlowB = -1, m_fGasFlow = -1;
|
||||
int m_fPress = -1, m_fAirPress = -1, m_fFoam = -1;
|
||||
int m_fAirFault = -1, m_fPlungerFault = -1;
|
||||
|
||||
QTimer* m_faultTimer = nullptr;
|
||||
int m_faultIndex = 0;
|
||||
};
|
||||
|
||||
#endif // WASHBASEPAGE_H
|
||||
Reference in New Issue
Block a user