331 ui->mw_phEdit->setReadOnly(! recipe->calc_acid); |
331 ui->mw_phEdit->setReadOnly(! recipe->calc_acid); |
332 ui->mw_phEdit->setButtonSymbols(recipe->calc_acid ? QAbstractSpinBox::UpDownArrows : QAbstractSpinBox::NoButtons); |
332 ui->mw_phEdit->setButtonSymbols(recipe->calc_acid ? QAbstractSpinBox::UpDownArrows : QAbstractSpinBox::NoButtons); |
333 ui->mw_acidvolEdit->setReadOnly(recipe->calc_acid); |
333 ui->mw_acidvolEdit->setReadOnly(recipe->calc_acid); |
334 ui->mw_acidvolEdit->setButtonSymbols(recipe->calc_acid ? QAbstractSpinBox::NoButtons : QAbstractSpinBox::UpDownArrows); |
334 ui->mw_acidvolEdit->setButtonSymbols(recipe->calc_acid ? QAbstractSpinBox::NoButtons : QAbstractSpinBox::UpDownArrows); |
335 |
335 |
|
336 ui->sp_phEdit->setReadOnly(! recipe->calc_acid); |
|
337 ui->sp_phEdit->setButtonSymbols(recipe->calc_acid ? QAbstractSpinBox::UpDownArrows : QAbstractSpinBox::NoButtons); |
|
338 ui->sp_acidvolEdit->setReadOnly(recipe->calc_acid); |
|
339 ui->sp_acidvolEdit->setButtonSymbols(recipe->calc_acid ? QAbstractSpinBox::NoButtons : QAbstractSpinBox::UpDownArrows); |
336 ui->sp_volEdit->setValue(recipe->sparge_volume); |
340 ui->sp_volEdit->setValue(recipe->sparge_volume); |
337 ui->sp_tempEdit->setValue(recipe->sparge_temp); |
|
338 ui->sp_phEdit->setValue(recipe->sparge_ph); |
341 ui->sp_phEdit->setValue(recipe->sparge_ph); |
339 ui->sp_sourceEdit->setCurrentIndex(recipe->sparge_source); |
|
340 ui->sp_acidtypeEdit->setCurrentIndex(recipe->sparge_acid_type); |
342 ui->sp_acidtypeEdit->setCurrentIndex(recipe->sparge_acid_type); |
341 ui->sp_acidpercEdit->setValue(recipe->sparge_acid_perc); |
343 ui->sp_acidpercEdit->setValue(recipe->sparge_acid_perc); |
342 ui->sp_acidvolEdit->setValue(recipe->sparge_acid_amount); |
344 ui->sp_acidvolEdit->setValue(recipe->sparge_acid_amount); |
343 |
345 |
344 // All signals from tab "Generic" |
346 // All signals from tab "Generic" |
390 connect(ui->bs_mgso4Edit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::wb_mgso4_changed); |
392 connect(ui->bs_mgso4Edit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::wb_mgso4_changed); |
391 connect(ui->bs_naclEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::wb_nacl_changed); |
393 connect(ui->bs_naclEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::wb_nacl_changed); |
392 connect(ui->bs_mgcl2Edit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::wb_mgcl2_changed); |
394 connect(ui->bs_mgcl2Edit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::wb_mgcl2_changed); |
393 connect(ui->bs_nahco3Edit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::wb_nahco3_changed); |
395 connect(ui->bs_nahco3Edit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::wb_nahco3_changed); |
394 connect(ui->bs_caco3Edit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::wb_caco3_changed); |
396 connect(ui->bs_caco3Edit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::wb_caco3_changed); |
|
397 connect(ui->ss_cacl2Edit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::sp_cacl2_changed); |
|
398 connect(ui->ss_caso4Edit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::sp_caso4_changed); |
|
399 connect(ui->ss_mgso4Edit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::sp_mgso4_changed); |
|
400 connect(ui->ss_naclEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::sp_nacl_changed); |
|
401 connect(ui->ss_mgcl2Edit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::sp_mgcl2_changed); |
395 connect(ui->mw_autoEdit, &QCheckBox::stateChanged, this, &EditRecipe::mw_calc_acid_clicked); |
402 connect(ui->mw_autoEdit, &QCheckBox::stateChanged, this, &EditRecipe::mw_calc_acid_clicked); |
396 connect(ui->mw_phEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::mw_ph_changed); |
403 connect(ui->mw_phEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::mw_ph_changed); |
397 connect(ui->mw_acidvolEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::mw_acid_changed); |
404 connect(ui->mw_acidvolEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::mw_acid_changed); |
398 connect(ui->mw_acidPick, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::mw_type_changed); |
405 connect(ui->mw_acidPick, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::mw_type_changed); |
399 connect(ui->wt_sourceEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::wt_target_changed); |
406 connect(ui->wt_sourceEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::wt_target_changed); |
400 connect(ui->w1_nameEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::w1_name_changed); |
407 connect(ui->w1_nameEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::w1_name_changed); |
401 connect(ui->w2_nameEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::w2_name_changed); |
408 connect(ui->w2_nameEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::w2_name_changed); |
402 connect(ui->w2_volEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::w2_volume_changed); |
409 connect(ui->w2_volEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::w2_volume_changed); |
403 connect(ui->sp_sourceEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::sp_source_changed); |
410 connect(ui->spargeGroup, SIGNAL(buttonClicked(int)), this, SLOT(sp_group_changed(int))); |
404 connect(ui->sp_acidtypeEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::sp_type_changed); |
411 connect(ui->sp_acidtypeEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::sp_type_changed); |
405 connect(ui->sp_phEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::sp_ph_changed); |
412 connect(ui->sp_phEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::sp_ph_changed); |
406 |
413 connect(ui->sp_acidvolEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::sp_acid_changed); |
407 setLocked(recipe->locked); |
414 setLocked(recipe->locked); |
408 |
415 |
409 ui->saveButton->setEnabled(false); |
416 ui->saveButton->setEnabled(false); |
410 ui->deleteButton->setEnabled((id >= 0 && ! recipe->locked) ? true:false); |
417 ui->deleteButton->setEnabled((id >= 0 && ! recipe->locked) ? true:false); |
411 |
418 |