修复状态机的部分异常、计数器编辑与预览更新、修复时间、轮班图元的高度多一行的问题
This commit is contained in:
@@ -11,11 +11,6 @@ CounterVarSet::CounterVarSet(QWidget *parent) :
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->label_35->hide();
|
||||
ui->spinBoxdecimalpointnum->hide();
|
||||
ui->pushButtonVAR->hide();
|
||||
ui->checkVARLEN->hide();
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
@@ -34,16 +29,6 @@ void CounterVarSet::init()
|
||||
|
||||
void CounterVarSet::buttonClickedSlot()
|
||||
{
|
||||
// 编辑
|
||||
// if (editFlag) {
|
||||
// m_textEdit->clear();
|
||||
// on_buttonInsertVari_pressed();
|
||||
// applyUIPara();
|
||||
// emit sig_updateSelectedCounter();
|
||||
// editFlag = false;
|
||||
// return;
|
||||
// }
|
||||
|
||||
// 添加
|
||||
QPushButton* btn = qobject_cast<QPushButton*>(sender());
|
||||
if (btn == ui->checkBtn)
|
||||
@@ -61,8 +46,6 @@ CounterViewModel CounterVarSet::getCounterConfig()
|
||||
unsigned char splitMode = 0;
|
||||
getValue(&viewModel.counterType, &viewModel.digitalNum, &splitMode);
|
||||
viewModel.letterSpace = ui->letterSpaceSpinBox->value();
|
||||
viewModel.charWidth = ui->charWidthSpinBox->value();
|
||||
viewModel.enbCustomCharWidth = ui->enbCharWidthSpinBox->isChecked();
|
||||
|
||||
applyUIPara();
|
||||
|
||||
@@ -78,8 +61,6 @@ void CounterVarSet::setCounterConfig(CounterViewModel viewModel)
|
||||
ui->radioButtonVar2->setChecked(viewModel.counterType == COUNTER_TYPE_2 ? true : false);
|
||||
ui->tabWidget->setCurrentIndex(viewModel.counterType == COUNTER_TYPE_1 ? 1 : 2);
|
||||
ui->letterSpaceSpinBox->setValue(viewModel.letterSpace);
|
||||
ui->charWidthSpinBox->setValue(viewModel.charWidth);
|
||||
ui->enbCharWidthSpinBox->setChecked(viewModel.enbCustomCharWidth);
|
||||
|
||||
updateSysParaToUI();
|
||||
}
|
||||
@@ -111,17 +92,12 @@ void CounterVarSet::applyUIPara()
|
||||
m_vm.cnt1Settings.startValue = ui->spinBoxCnt1StartValue->value();
|
||||
m_vm.cnt1Settings.stepValue = ui->spinBoxCnt1StepValue->value();
|
||||
m_vm.cnt1Settings.currValue = ui->spinBoxCnt1CurrValue->value();
|
||||
m_vm.cnt1Settings.editCurrValue = ui->checkBoxResetCnt1CurrValue->isChecked();
|
||||
|
||||
m_vm.cnt2Settings.endValue = ui->spinBoxCnt2EndValue->value();
|
||||
m_vm.cnt2Settings.repeatValue = ui->spinBoxCnt2RepeateCnt->value();
|
||||
m_vm.cnt2Settings.startValue = ui->spinBoxCnt2StartValue->value();
|
||||
m_vm.cnt2Settings.stepValue = ui->spinBoxCnt2StepValue->value();
|
||||
m_vm.cnt2Settings.currValue = ui->spinBoxCnt2CurrValue->value();
|
||||
m_vm.cnt2Settings.editCurrValue = ui->checkBoxResetCnt2CurrValue->isChecked();
|
||||
|
||||
ui->checkBoxResetCnt1CurrValue->setChecked(false);
|
||||
ui->checkBoxResetCnt2CurrValue->setChecked(false);
|
||||
}
|
||||
|
||||
void CounterVarSet::updateSysParaToUI()
|
||||
@@ -137,16 +113,6 @@ void CounterVarSet::updateSysParaToUI()
|
||||
ui->spinBoxCnt2StartValue->setValue(m_vm.cnt2Settings.startValue);
|
||||
ui->spinBoxCnt2StepValue->setValue(m_vm.cnt2Settings.stepValue);
|
||||
ui->spinBoxCnt2CurrValue->setValue(m_vm.cnt2Settings.currValue);
|
||||
|
||||
// 电眼触发计数器动作 选择
|
||||
// ui->eleCNT1IncEn->setChecked( (sysPara->para.eleEyeClearCntInSynMode & 0x10)?1:0);
|
||||
// ui->radCNT1ResetEn->setChecked( (sysPara->para.eleEyeClearCntInSynMode & 0x10)?0:1);
|
||||
|
||||
// ui->eleCNT2IncEn->setChecked( (sysPara->para.eleEyeClearCntInSynMode & 0x20)?1:0);
|
||||
// ui->radCNT2ResetEn->setChecked( (sysPara->para.eleEyeClearCntInSynMode & 0x20)?0:1);
|
||||
|
||||
ui->checkBoxResetCnt1CurrValue->setChecked(false);
|
||||
ui->checkBoxResetCnt2CurrValue->setChecked(false);
|
||||
}
|
||||
|
||||
void CounterVarSet::applyStyleSheet()
|
||||
@@ -348,28 +314,4 @@ void CounterVarSet::applyStyleSheet()
|
||||
)";
|
||||
|
||||
this->setStyleSheet(styleSheet);
|
||||
}
|
||||
|
||||
void CounterVarSet::on_checkBoxResetCnt1CurrValue_released()
|
||||
{
|
||||
bool checked = ui->checkBoxResetCnt1CurrValue->isChecked();
|
||||
ui->spinBoxCnt1CurrValue->setEnabled(checked);
|
||||
}
|
||||
|
||||
void CounterVarSet::on_checkBoxResetCnt2CurrValue_released()
|
||||
{
|
||||
bool checked = ui->checkBoxResetCnt2CurrValue->isChecked();
|
||||
ui->spinBoxCnt2CurrValue->setEnabled(checked);
|
||||
}
|
||||
|
||||
void CounterVarSet::on_pushOnlyCNT1Clear_pressed()
|
||||
{
|
||||
// 转由主界面实现清零 byons@2026年4月25日
|
||||
// sysPara->devOp->clearProductCnt(1<<2); // 计数器1单独清零
|
||||
}
|
||||
|
||||
|
||||
void CounterVarSet::on_pushOnlyCNT2Clear_pressed()
|
||||
{
|
||||
// sysPara->devOp->clearProductCnt(1<<3);// 计数器2单独清零
|
||||
}
|
||||
Reference in New Issue
Block a user