添加 ‘编辑默认打印设置’ 前的缓存
This commit is contained in:
+21
-13
@@ -11,8 +11,6 @@ namespace Ui {
|
||||
class PrintSetting;
|
||||
}
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
/**
|
||||
* @brief 从sysPara中提取的某些用于跟随工作文件保存的打印设置
|
||||
*
|
||||
@@ -33,7 +31,7 @@ struct PrintSettingModel
|
||||
* 电眼模式:根据 eleEyeRepeatCnt 设定的重复次数,确定重复间隔,单位是时间 ms
|
||||
* 同步器模式:重复间隔,单位长度 mm
|
||||
* */
|
||||
unsigned triggerInterval = 0;
|
||||
unsigned triggerInterval = 100;
|
||||
|
||||
unsigned eleEyeRepeatCnt = 1; // 电眼触发时,打印内容的次数,也就是重复数
|
||||
|
||||
@@ -67,6 +65,16 @@ struct PrintSettingModel
|
||||
|
||||
unsigned char altMirrorType = 0; // 镜像交替模式
|
||||
|
||||
unsigned char pulseOutputEnable = 0; // 脉冲输出使能
|
||||
|
||||
unsigned int productCntPerOutputPulse = 0; // 多少个产品产生一个输出脉冲
|
||||
|
||||
unsigned short outputPulseDelayMs = 0; // 输出脉冲延时
|
||||
|
||||
unsigned short OuputPulseCol = 0; // 在第几列输出脉冲
|
||||
|
||||
unsigned short pulse_sinal_value = 0; // 脉冲信号值
|
||||
|
||||
bool leftRightInverse = false; // 信息左右颠倒
|
||||
|
||||
bool upDownInverse = false; // 信息上下颠倒
|
||||
@@ -81,9 +89,11 @@ struct PrintSettingModel
|
||||
static PrintSettingModel fromSysPara(SysPara* sysPara);
|
||||
|
||||
static QString toString(const PrintSettingModel& model);
|
||||
};
|
||||
|
||||
#pragma pack()
|
||||
static PrintSettingModel defPrintSettingModel();
|
||||
|
||||
static void setDefPrintSettingModel(const PrintSettingModel& model);
|
||||
};
|
||||
|
||||
class PrintSetting : public QWidget
|
||||
{
|
||||
@@ -96,21 +106,18 @@ public:
|
||||
QPushButton* m_closeBtn;
|
||||
QPushButton* m_checkBtn;
|
||||
|
||||
void updateSysParaToUI(); //重载
|
||||
void applyUIPara(); //重载
|
||||
void updateModelFromUI();
|
||||
void updateModelToUI();
|
||||
void bindSysPara(SysPara *sysPara);
|
||||
void updateSysStatusToUI();
|
||||
|
||||
void applyUITriggerPara();
|
||||
void GetTriggerUIPara();
|
||||
|
||||
void setTriggerUI(int triggerMode);
|
||||
|
||||
void setSynPrintMode(int mode);
|
||||
|
||||
void on_pushButtonApply_pressed();
|
||||
|
||||
void TriggerupdateSysParaToUI();
|
||||
void TriggerupdateModelToUI();
|
||||
|
||||
void setEnableEleEyeSetting(bool);
|
||||
|
||||
@@ -118,7 +125,7 @@ public:
|
||||
|
||||
void applyPrintSettingsToSysPara(bool showTip = true);
|
||||
|
||||
PrintSettingModel model();
|
||||
PrintSettingModel model() const;
|
||||
|
||||
void setModel(const PrintSettingModel& model);
|
||||
|
||||
@@ -159,8 +166,9 @@ private slots:
|
||||
|
||||
private:
|
||||
Ui::PrintSetting *ui;
|
||||
SysPara* sysPara = nullptr;
|
||||
|
||||
PrintSettingModel m_model;
|
||||
SysPara *sysPara = nullptr;
|
||||
PulseNumFix *pulseNumFix;
|
||||
|
||||
bool isPulseEenable = false;
|
||||
|
||||
Reference in New Issue
Block a user