first commit
This commit is contained in:
+177
@@ -0,0 +1,177 @@
|
||||
#ifndef MainWidget_H
|
||||
#define MainWidget_H
|
||||
|
||||
#define MDTFLAG 0xff00FF10
|
||||
#define QRFLAG 0xff00FF20
|
||||
#define BARFLAG 0xff00FF30
|
||||
#define MMVAR 1
|
||||
#define MAX_ALLOW_VISICOSITY_OVERFLOW_NUM 120 //连续超那么多次,会被认为粘度故障
|
||||
|
||||
#define EXPIRY_VARI_RECONISE 0x0000FF
|
||||
#define RECICLARNUMBER 22
|
||||
|
||||
#include <QWidget>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
#include <QTextEdit>
|
||||
#include <QTime>
|
||||
#include <QMessageBox>
|
||||
#include "scene/picscene.h"
|
||||
#include "LogInfo.h"
|
||||
|
||||
// 包含UI自动生成的头文件
|
||||
#include "ui_MainWidget.h"
|
||||
|
||||
#include "ParaSettingUI.h"
|
||||
#include "fileManage/FileManageWidget.h"
|
||||
|
||||
#include "setnumdlg.h"
|
||||
|
||||
class MainWidget : public QWidget,public ParaSettingUI
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MainWidget(QWidget* parent = nullptr);
|
||||
~MainWidget();
|
||||
|
||||
void bindSysPara(SysPara *SysPara);//重载
|
||||
|
||||
void bindTxTEdit(QTextEdit* textEdit);
|
||||
void bindPicScene(PicScene* pPicScene);
|
||||
void PreviewPressed();
|
||||
void onPreviewScene();
|
||||
// 260420 hlp:场景为空时,渲染空场景并刷新界面
|
||||
void handleEmptySize();
|
||||
|
||||
QString strWarring,strTitle;
|
||||
bool m_2sFlag;
|
||||
bool printintFlag; //判断当前是否在打印
|
||||
bool startPrintingFlag;
|
||||
|
||||
bool pushButtonFlag;
|
||||
|
||||
int searchQrVar();
|
||||
int searchExpiryVar();//检索有效期变量
|
||||
void ExpiryDotUpdate(char Mode);
|
||||
|
||||
// 单独更新时间类图元 byons@2026年4月11日
|
||||
|
||||
/**
|
||||
* @brief 更新时间类图元到FPGA print 数据
|
||||
* @return true 有时间元素更新,false 无时间元素更新
|
||||
* @remark 判断返回值用于决定是否SendPrintDataToFpga
|
||||
*/
|
||||
bool dateTimeItemsDotUpdate();
|
||||
|
||||
/**
|
||||
* @brief 向FPGA print 数据缓冲区写入image
|
||||
* @return 返回总计写入的点阵数量,返回 0 没有写入任何点阵
|
||||
* @param img 要写入的image
|
||||
* @param startX 起始x坐标
|
||||
* @param startY 起始y坐标
|
||||
*/
|
||||
int imageToPrintData(QImage& img, int startX, int startY);
|
||||
|
||||
void generateCharRamData();
|
||||
void setRunStatus(QString str);
|
||||
void enableReclaimCtrlButton(bool);
|
||||
void enablePrintButton(bool);
|
||||
int getCurrPrintStatus();
|
||||
|
||||
void updateSysStatusToUI(); //重载
|
||||
|
||||
void updateTotalCnt(int en);
|
||||
int calculateMaxSpeed(int backup);
|
||||
int getMaxSpeedCalcPara();
|
||||
|
||||
QTimer *timerShowItem,*timerPowerOff;
|
||||
|
||||
void SendPrintDataToFpga(unsigned char);
|
||||
|
||||
void updatePrintDisplayLabel();
|
||||
|
||||
void RefreshStatusLight();
|
||||
bool updatePhaseIndicatorLight();
|
||||
void updateGeneralState(DevStatusLightType type, QString stateStr);
|
||||
|
||||
bool flagOfClearHighVltageWarnning;
|
||||
|
||||
AlarmStatus alarmStatus;
|
||||
|
||||
bool eventFilter(QObject *watched, QEvent *event) override;
|
||||
private:
|
||||
// UI对象
|
||||
Ui::MainWidget ui;
|
||||
// 控件成员变量(关联UI控件)
|
||||
QPushButton* m_EditBtn;
|
||||
QPushButton* m_AddBtn;
|
||||
QPushButton* m_MainBtn;
|
||||
QPushButton* m_ManageBtn;
|
||||
QPushButton* m_MsgBtn;
|
||||
QTextEdit* m_TextEdit;
|
||||
QPushButton* m_CloseBtn;
|
||||
QPushButton* m_StopBtn;
|
||||
QPushButton* m_StartBtn;
|
||||
QPushButton* m_ToolBtn;
|
||||
QPushButton* m_RightBtn;
|
||||
QPushButton* m_LeftBtn;
|
||||
PrintTextDisplay* m_PrintDisplay;
|
||||
|
||||
|
||||
bool previewFlag;
|
||||
QTextEdit* m_textEdit;
|
||||
int r_ExpiryDay;
|
||||
QTimer *airPushTimer;
|
||||
|
||||
PicScene *pPicScene;
|
||||
QGraphicsView *view;
|
||||
|
||||
FileManageWidget *m_fileManageWidget = nullptr;
|
||||
|
||||
int dlgMyWarringShowDlyCnt;
|
||||
|
||||
SetNumDlg* m_setNumDlg = nullptr;
|
||||
public slots:
|
||||
void powerOffConfirmed();
|
||||
void on_m_StartBtn_clicked();
|
||||
void on_m_StopBtn_clicked();
|
||||
void sendPowerOffCmd();
|
||||
void checkForPowerOff();
|
||||
void _on_pushButtonPowerOff_pressed(bool notice);
|
||||
|
||||
void onLabelFaultRusumePressed();
|
||||
|
||||
void UpdateUIVersion();
|
||||
private:
|
||||
void init();
|
||||
// void SendPrintDataToFpga(unsigned char);
|
||||
void reclaimTanOpen();
|
||||
|
||||
void initSheet();
|
||||
private slots:
|
||||
void airPushingProcess();
|
||||
void buttonClickedSlot();
|
||||
void ontextEdittextChanged();
|
||||
|
||||
void on_m_RightBtn_clicked();
|
||||
|
||||
void on_m_LeftBtn_clicked();
|
||||
|
||||
void on_m_ManageBtn_clicked();
|
||||
|
||||
void slt_setNum();
|
||||
|
||||
signals:
|
||||
void sendButtonClickedSignal(int index);
|
||||
void setDisableAll();
|
||||
void CloseJd();
|
||||
void showVserionInfo(QString);
|
||||
|
||||
void repeatInitedPid();
|
||||
void clearPressureFault();
|
||||
};
|
||||
|
||||
#endif // MainWidget_H
|
||||
Reference in New Issue
Block a user