first commit
This commit is contained in:
+187
@@ -0,0 +1,187 @@
|
||||
#pragma once
|
||||
|
||||
#include <QtWidgets/QWidget>
|
||||
#include <QTimer>
|
||||
#include <QLabel>
|
||||
#include <QStackedWidget>
|
||||
// 包含UI自动生成的头文件(qmake编译时会自动生成)
|
||||
#include "ui_InkJetPrinter.h"
|
||||
#include "mainwidget.h"
|
||||
#include "testprintwidget.h"
|
||||
//#include "ercodesettings.h"
|
||||
//#include "loadfilesetting.h"
|
||||
//#include "MainInterfaceWidget.h"
|
||||
|
||||
#include "MyInputMethod.h"
|
||||
#include <QMessageBox>
|
||||
#include <QSpinBox>
|
||||
#include <QTime>
|
||||
#include <QThread>
|
||||
#include "fontsetwidget.h"
|
||||
#include "Printsetting.h"
|
||||
#include "MainInstruction.h"
|
||||
#include "SystemManage.h"
|
||||
#include "SystemSetting.h"
|
||||
#include "SystemUpdate.h"
|
||||
#include "OtherInfo.h"
|
||||
#include "scene/ScheduleShiftsEditor.h"
|
||||
#include "Serial/serial.h"
|
||||
#include "LogInfo.h"
|
||||
#include "DateVarSet.h"
|
||||
#include "CounterVarSet.h"
|
||||
|
||||
#include "QBarCode.h"
|
||||
#include "dlgQrCode.h"
|
||||
|
||||
class InkJetPrinter : public QWidget,public ParaSettingUI
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
InkJetPrinter(QWidget* parent = nullptr);
|
||||
~InkJetPrinter();
|
||||
|
||||
void delayWithEventLoop();
|
||||
|
||||
private:
|
||||
// UI对象(由.ui文件生成)
|
||||
Ui::InkJetPrinter ui;
|
||||
|
||||
QLabel* m_LabelTimer; // 保留原有变量,和ui中的控件关联
|
||||
QTimer* m_Timer;
|
||||
QTimer* timer;
|
||||
QTimer* viscosity_timer;
|
||||
QTimer* jd_timer;
|
||||
|
||||
QStackedWidget* m_StackedWidget; // 关联ui中的m_StackedWidget
|
||||
MainWidget* m_MainWidget;
|
||||
TestPrintWidget* m_TestPrintWidget;
|
||||
|
||||
QBarCode* m_BarCodeDlg = nullptr;
|
||||
dlgQrCode* m_QRCodeDlg = nullptr;
|
||||
// MainInterfaceWidget* m_MainInterfaceWidget;
|
||||
SystemManage* m_SystemManage;
|
||||
SystemUpdate* m_SystemUpdate;
|
||||
SystemSetting* m_SystemSetting;
|
||||
OtherInfo* m_OtherInfo;
|
||||
|
||||
FontSetWidget* m_FontSetWidget;
|
||||
|
||||
PrintSetting* m_PrintSetting;
|
||||
|
||||
MainInstruction* m_MainInstruction;
|
||||
|
||||
LogInfo* m_LogInfo;
|
||||
|
||||
ScheduleShiftsEditor* m_scheduleShiftsEditor = nullptr;
|
||||
|
||||
DateVarSet* m_DateVarSet;
|
||||
|
||||
CounterVarSet* m_CounterVarSet;
|
||||
|
||||
QTextEdit *m_textEdit;
|
||||
|
||||
QTextCursor cursor;
|
||||
|
||||
Serial *serialFPGA;
|
||||
Serial *serialSTM32;
|
||||
QThread* m_serialThreadFPGA;
|
||||
QThread* m_serialThreadSTM32;
|
||||
bool flagOfSerialThreadStratEn;
|
||||
|
||||
private:
|
||||
bool pushButtonStartFlag;
|
||||
void init();
|
||||
void autoControlValvePump();
|
||||
void pressureAdj();
|
||||
void autoControlHeater();
|
||||
void cycleValveRunForSelfCheck();
|
||||
void detectAndcontrolReclaimTank();
|
||||
|
||||
void checkPressureControl();
|
||||
void showMessage(QString);
|
||||
|
||||
QMessageBox *msgtest;
|
||||
|
||||
QDateTime curPowerOnDateTime;
|
||||
int timeoutDay;
|
||||
|
||||
private slots:
|
||||
void timerHandler();
|
||||
void getMainWidgetButtonClickedSlot(int index);
|
||||
void getTestPrintWidgetButtonClickedSlot(int index);
|
||||
void openDatetimeEditor(PicDateItem* item);
|
||||
// void getErCodeSettingsWidgetButtonClickedSlot(int index);
|
||||
// void getMainInterfaceWidgetButtonClickedSlot(int index);
|
||||
void viscosity_timerHandler();
|
||||
|
||||
void getFontSetWidgetButtonClickedSlot(int index);
|
||||
void getPrintSettingButtonClickedSlot(int index);
|
||||
void getMainInstructWidgetButtonClickedSlot(int index);
|
||||
void getSystemManageWidgetButtonClickSlot(int index);
|
||||
void getSystemUpdateWidgetButtonClickSlot(int index);
|
||||
void getSystemSettingWidgetButtonClickSlot(int index);
|
||||
void getOtherInfoWidgetButtonClickSlot(int index);
|
||||
void getLogInfoWidgetButtonClickSlot(int index);
|
||||
void slt_updateGeneralState(DevStatusLightType type, QString stateStr);
|
||||
void getDateSetWidgetButtonClickSlot(int index);
|
||||
void getCounterVarSetWidgetButtonClickSlot(int index);
|
||||
void slt_counterVarUpdate();
|
||||
|
||||
void showScheduleShiftsEditor(PicScheduleShiftItem* item);
|
||||
|
||||
void onScheduleShiftsEditDone();
|
||||
|
||||
//Serial
|
||||
void saveFPGAVersionNum(unsigned int);
|
||||
void saveFPGAStatus(unsigned char *data);
|
||||
void saveFPGAPhaseDetectHighTm(unsigned char *data);
|
||||
void saveFPGACalandarAndDat(unsigned char *data);
|
||||
void saveFPGACnt3CurrValue(unsigned char *data);
|
||||
void saveFPGAXXXDay(unsigned char *data);
|
||||
void stopSendFPGAData(bool);
|
||||
void closeSerialFPGA();
|
||||
|
||||
void closeSerialSTM32();
|
||||
void stopSendSTM32Data(bool);
|
||||
void saveSTM32Status(unsigned char *data);
|
||||
void saveGearPumpVal(unsigned char *data);
|
||||
void savePulseCntVal(unsigned char *data);
|
||||
void saveSTM32Version(unsigned char *data);
|
||||
void saveSTM32Time(unsigned char *data);
|
||||
void closedSerial();
|
||||
void showFPGAqueuesize(int size);
|
||||
void showSTM32queuesize(int size);
|
||||
void showqueueFPGAsize(int size);
|
||||
void restartSerialPort();
|
||||
|
||||
void disableTabClick();
|
||||
|
||||
void setShowVserionInfo(QString);
|
||||
|
||||
void OnFinished(int event);
|
||||
void jd_timerHandler();
|
||||
|
||||
void slt_editCounter(CounterViewModel vm);
|
||||
|
||||
//复制粘贴
|
||||
// void slt_copy();
|
||||
|
||||
signals:
|
||||
void maintenanceShow();
|
||||
|
||||
public slots:
|
||||
void close_jd_timer();
|
||||
void enableInkJetTabClick(bool flag);
|
||||
|
||||
void handleInitedPID();
|
||||
void resetPressureCnt();
|
||||
|
||||
int dateTimeElasped(int,QString);
|
||||
void warningHandler(int);
|
||||
void warningShow(int,int);
|
||||
|
||||
public:
|
||||
bool eventFilter(QObject *watched, QEvent *event);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user