新二维码/条形码编辑逻辑

This commit is contained in:
2026-05-06 10:34:48 +08:00
parent a06c926162
commit a9e99f4425
76 changed files with 12679 additions and 12744 deletions
+42 -73
View File
@@ -47,6 +47,12 @@ SystemSetting::SystemSetting(QWidget *parent) :
dialogUpateMm =new DialogAuthorization;
connect(dialogUpateMm,SIGNAL(accepted()),this,SLOT(ondialogAuthorizationAccepted()));
if (ctrl_loginfo == nullptr) {
ctrl_loginfo = LogInfoCtrl::instance();
connect(ctrl_loginfo, &LogInfoCtrl::sig_clean,
this, &SystemSetting::on_pushButtonCleanUP_pressed);
}
init();
ui->label->hide();
@@ -89,6 +95,20 @@ void SystemSetting::buttonClickedSlot()
}
}
void SystemSetting::lockUI()
{
ui->checkBtn->setEnabled(false);
ui->closeBtn->setEnabled(false);
ui->pushButtonHighVoltageData->setEnabled(false);
}
void SystemSetting::unlockUI()
{
ui->checkBtn->setEnabled(true);
ui->closeBtn->setEnabled(true);
ui->pushButtonHighVoltageData->setEnabled(true);
}
void SystemSetting::SystemupdateSysParaToUI(){
updateSysParaToUI();
@@ -237,6 +257,8 @@ void SystemSetting::updateSysStatusToUI(){
enCleanUpAppendFlag=5;
//sysPara->devOp->controlReclaimTankClose(1);
//ui->label_status->setText(tr("正在关回收槽......"));
if(ctrl_loginfo) ctrl_loginfo->emitSigCleanOver(false);
unlockUI();
}
else if(sysPara->status.currReclaimTankPos ==0 && (enCleanUpAppendFlag==5 ||enCleanUpAppendFlag==4)) //?
{
@@ -248,10 +270,6 @@ void SystemSetting::updateSysStatusToUI(){
enCleanUpAppendFlag=0;
}
}
else
{
}
}
}
@@ -294,10 +312,14 @@ void SystemSetting::on_pushButtonCleanUP_pressed()
enCleanUpAppendFlag=1;// 开始启动手动模式
sysPara->devOp->mainInkCtrl();
if (ctrl_loginfo) ctrl_loginfo->emitSigCleanOver(true);
lockUI();
timer2->start(2000); // 暂时循环一下2s
}
else if (msgBox.clickedButton() == cancleCleanButton) {
enCleanUpAppendFlag=3;
if (ctrl_loginfo) ctrl_loginfo->emitSigCleanOver(false);
unlockUI();
timerHandler2();
return ;
}
@@ -352,7 +374,6 @@ void SystemSetting::timerHandler2(){
}
else if(enCleanUpAppendFlag==3){// 清洗完成
enCleanUpAppendFlag=4;
// emit setRunStatus(tr("清洗完成"));
sysPara->devOp->controlCycleValve(false);
sysPara->devOp->controlViscosityPump(false);
sysPara->devOp->controlReclaimTankClose(1);
@@ -365,6 +386,9 @@ void SystemSetting::timerHandler2(){
}
else if(enCleanUpAppendFlag==4){
emit setRunStatus(tr("清洗完成"));
if (ctrl_loginfo) ctrl_loginfo->emitSigCleanOver(false);
unlockUI();
if(sysPara->status.currReclaimTankPos==0){
enCleanUpAppendFlag=0;
if(timer2->isActive()) timer2->stop();
@@ -697,75 +721,20 @@ void SystemSetting::on_spinBoxOscillatorVoltage_valueChanged(int arg1)
}
#include "Public.h"
void SystemSetting::on_pushButtonInterFace_pressed()
{
QString s1 = Public::ReadLanguageName();
if(s1 =="English") {
dlgLanguage.LangIndex =INPUT_METHOD_TYPE_ENGLISH;
}
else if(s1 =="Korean") {
dlgLanguage.LangIndex =INPUT_METHOD_TYPE_KOREAN;
}
else{
dlgLanguage.LangIndex =INPUT_METHOD_TYPE_CHINESE;
}
dlgLanguage.setCurrentLanguage();
dlgLanguage.show();
/*
QFile file(SYS_ROOT_DIR"UseEn");
QMessageBox::StandardButton ret;
ret = QMessageBox::information(this, tr("警告"),
tr("确定要切换显示语言吗?\r\n(重启才能生效)"),
QMessageBox::Ok | QMessageBox::Cancel);
if (ret != QMessageBox::Ok){
return;
}
QString s1 = Public::ReadLanguageName();
if(file.open(QIODevice::ReadWrite| QIODevice::Truncate)) {
QByteArray buf;
buf.clear();
if(s1 =="English") {// English--> Vietnamese
QMessageBox::information(this,tr("提示"),tr("重启后切换到越南语界面"));
buf.append("Vietnamese\r\n");
buf.append("YN_utf8.txt\r\n");
}
else if(s1 =="Vietnamese") {// Vietnamese--> Chinese
QMessageBox::information(this,tr("提示"),tr("重启后切换到中文界面"));
buf.append("Chinese\r\n");
buf.append("WINPY_utf8.txt\r\n");
}
else{// Chinese--> English
QMessageBox::information(this,tr("提示"),tr("重启后切换到英文界面"));
buf.append("English\r\n");
buf.append("WINPY_utf8.txt\r\n");
}
file.write(buf);
file.close();
setInterfaceMode();
}
*/
}
void SystemSetting::setInterfaceMode()
{
QString s1 = Public::ReadLanguageName();
if(s1 =="English") {// English--> Vietnamese
ui->pushButtonInterFace->setText( tr("Tiếng Việt(Vietnamese interface)"));
}
else if(s1 =="Vietnamese") {// Vietnamese--> Chinese
ui->pushButtonInterFace->setText( tr("Chinese interface(中文界面)"));
}
else{// Chinese--> English
ui->pushButtonInterFace->setText( tr("English interface(英文界面)"));
}
}
//void SystemSetting::setInterfaceMode()
//{
// QString s1 = Public::ReadLanguageName();
// if(s1 =="English") {// English--> Vietnamese
// ui->pushButtonInterFace->setText( tr("Tiếng Việt(Vietnamese interface)"));
// }
// else if(s1 =="Vietnamese") {// Vietnamese--> Chinese
// ui->pushButtonInterFace->setText( tr("Chinese interface(中文界面)"));
// }
// else{// Chinese--> English
// ui->pushButtonInterFace->setText( tr("English interface(英文界面)"));
// }
//}
void SystemSetting::applyStyleSheet()
{