V6.7.4 追加更新

This commit is contained in:
2026-07-20 09:21:44 +08:00
parent 6425b11a96
commit e90e80000f
25 changed files with 2830 additions and 2764 deletions
+31 -8
View File
@@ -8,6 +8,8 @@
#include <QDebug>
#include <QTime>
#include <QDate>
#include <QScroller>
#include <QScrollArea>
//#include "LogInfo.h"
#include "myinclude.h"
#include "QInputDialog"
@@ -69,6 +71,22 @@ void SystemSetting::init()
// 应用样式表
applyStyleSheet();
QScrollArea *scrollArea = this->findChild<QScrollArea *>("systemSettingScrollArea");
if (scrollArea) {
QWidget *viewport = scrollArea->viewport();
QScroller::grabGesture(viewport, QScroller::LeftMouseButtonGesture);
QScroller::grabGesture(viewport, QScroller::TouchGesture);
QScroller *scroller = QScroller::scroller(viewport);
QScrollerProperties properties = scroller->scrollerProperties();
// 关闭惯性:限制 flick 速度并加快减速,达到松手即停的效果
properties.setScrollMetric(QScrollerProperties::DecelerationFactor, 1.0);
properties.setScrollMetric(QScrollerProperties::MaximumVelocity, 0.0);
properties.setScrollMetric(QScrollerProperties::AcceleratingFlickMaximumTime, 0.0);
properties.setScrollMetric(QScrollerProperties::DragStartDistance, 0.002);
scroller->setScrollerProperties(properties);
}
// 连接信号槽
connect(ui->closeBtn, &QPushButton::clicked, this, &SystemSetting::buttonClickedSlot);
@@ -160,14 +178,16 @@ void SystemSetting::updateSysParaToUI(){
ui->comboBoxDiameter->setCurrentIndex(sysPara->para.diameter);
ui->comboBoxDiaphramOffset->setCurrentIndex(sysPara->para.diaphramOffset/5-1);
ui->enableReclaimAlgorithm->setChecked(sysPara->para.flagOfReclaimPumEnable);
ui->checkBoxReciclar->setChecked(sysPara->para.Reciclar);
ui->checkBoxMagnet->setChecked(sysPara->para.isCheckMagnet);
ui->checkBoxSuspendAfterPhaseFault->setChecked(sysPara->para.suspendAfterPhaseFault);
ui->checkHVFaultCloseEn->setChecked(sysPara->para.HVFaultCloseEn);
if(sysPara->para.EditMode>SCENE)
sysPara->para.EditMode=TXTFILE;
}
}
extern bool gearPumpRunNormalFlag;
void SystemSetting::applyUIPara(){
if(sysPara){
@@ -193,7 +213,13 @@ void SystemSetting::applyUIPara(){
else {
QMessageBox::critical(this,tr("错误"),tr("实际频率不能为%1").arg(freq));
}
sysPara->para.flagOfReclaimPumEnable = ui->enableReclaimAlgorithm->isChecked();
sysPara->para.Reciclar = ui->checkBoxReciclar->isChecked();
sysPara->para.isCheckMagnet = ui->checkBoxMagnet->isChecked();
sysPara->para.suspendAfterPhaseFault = ui->checkBoxSuspendAfterPhaseFault->isChecked();
sysPara->para.HVFaultCloseEn = ui->checkHVFaultCloseEn->isChecked();
sysPara->para.FanTemperature = ui->spinBoxFanTemperature->value();
sysPara->para.septalPostion = ui->spinBoxSeptalPostion->value();
quint16 diaphramOffset = 5*(ui->comboBoxDiaphramOffset->currentIndex()+1);
@@ -723,13 +749,10 @@ void SystemSetting::on_spinBoxOscillatorVoltage_valueChanged(int arg1)
{
static int vol=0; //
if(sysPara){
if(vol-1==arg1 || vol+1==arg1)
{
//qDebug()<<"OSCVOL:"<<arg1;
sysPara->devOp->setOscillatorVoltage(ui->spinBoxOscillatorVoltage->value());
}
vol = arg1;
if(arg1 >= 10)
sysPara->devOp->setOscillatorVoltage(ui->spinBoxOscillatorVoltage->value());
}
}
#include "Public.h"