修复状态机的部分异常、计数器编辑与预览更新、修复时间、轮班图元的高度多一行的问题
This commit is contained in:
@@ -8,9 +8,6 @@ CounterEditor::CounterEditor(QWidget *parent) :
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(ui->checkBoxResetCnt2CurrValue, &QCheckBox::toggled,
|
||||
this, &CounterEditor::onEditCurrValueToggled);
|
||||
|
||||
connect(ui->cbBoxCounterType, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &CounterEditor::onCounterTypeChanged);
|
||||
connect(ui->cbBoxDigitalNum, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &CounterEditor::onDigitalNumChanged);
|
||||
|
||||
@@ -20,9 +17,6 @@ CounterEditor::CounterEditor(QWidget *parent) :
|
||||
connect(ui->spinBoxCnt2StepValue, QOverload<int>::of(&QSpinBox::valueChanged), this, [this](int) {fetchCounterConfigFromView();} );
|
||||
connect(ui->spinBoxCnt2CurrValue, QOverload<int>::of(&QSpinBox::valueChanged), this, [this](int) {fetchCounterConfigFromView();} );
|
||||
|
||||
connect(ui->checkBoxResetCnt2CurrValue, &QCheckBox::clicked, this, [this](bool) {fetchCounterConfigFromView();} );
|
||||
connect(ui->eleCNT2IncEn, &QCheckBox::clicked, this, [this](bool) {fetchCounterConfigFromView();} );
|
||||
|
||||
setViewModel(m_vm);
|
||||
}
|
||||
|
||||
@@ -63,15 +57,6 @@ void CounterEditor::setViewModel(CounterEditorVM vm)
|
||||
ui->spinBoxCnt2CurrValue->setValue(cnt.currValue);
|
||||
ui->spinBoxCnt2CurrValue->blockSignals(b);
|
||||
|
||||
b = ui->checkBoxResetCnt2CurrValue->blockSignals(true);
|
||||
ui->checkBoxResetCnt2CurrValue->setChecked(cnt.editCurrValue);
|
||||
ui->checkBoxResetCnt2CurrValue->blockSignals(b);
|
||||
|
||||
b = ui->eleCNT2IncEn->blockSignals(true);
|
||||
ui->eleCNT2IncEn->setChecked(cnt.eleEyeIncEn);
|
||||
ui->eleCNT2IncEn->blockSignals(b);
|
||||
|
||||
ui->spinBoxCnt2CurrValue->setEnabled(cnt.editCurrValue);
|
||||
ui->labelCnt2CurrValue->setText(QString::number(cnt.currValue));
|
||||
|
||||
b = ui->cbBoxCounterType->blockSignals(true);
|
||||
@@ -124,8 +109,6 @@ void CounterEditor::fetchCounterConfigFromView()
|
||||
cnt.repeatValue = ui->spinBoxCnt2RepeateCnt->value();
|
||||
cnt.stepValue = ui->spinBoxCnt2StepValue->value();
|
||||
cnt.currValue = ui->spinBoxCnt2CurrValue->value();
|
||||
cnt.editCurrValue = ui->checkBoxResetCnt2CurrValue->isChecked();
|
||||
cnt.eleEyeIncEn = ui->eleCNT2IncEn->isChecked();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -134,5 +117,4 @@ void CounterEditor::fetchCounterConfigFromView()
|
||||
*/
|
||||
void CounterEditor::onEditCurrValueToggled()
|
||||
{
|
||||
ui->spinBoxCnt2CurrValue->setEnabled(ui->checkBoxResetCnt2CurrValue->isChecked());
|
||||
}
|
||||
Reference in New Issue
Block a user