src/EditProduct.cpp

changeset 530
a4d5daae8389
parent 529
7c9fb24bcc07
child 532
082786891630
equal deleted inserted replaced
529:7c9fb24bcc07 530:a4d5daae8389
504 ui->mw_acidvolEdit->setButtonSymbols(product->calc_acid ? QAbstractSpinBox::NoButtons : QAbstractSpinBox::UpDownArrows); 504 ui->mw_acidvolEdit->setButtonSymbols(product->calc_acid ? QAbstractSpinBox::NoButtons : QAbstractSpinBox::UpDownArrows);
505 ui->sp_phEdit->setReadOnly(! product->calc_acid); 505 ui->sp_phEdit->setReadOnly(! product->calc_acid);
506 ui->sp_phEdit->setButtonSymbols(product->calc_acid ? QAbstractSpinBox::UpDownArrows : QAbstractSpinBox::NoButtons); 506 ui->sp_phEdit->setButtonSymbols(product->calc_acid ? QAbstractSpinBox::UpDownArrows : QAbstractSpinBox::NoButtons);
507 ui->sp_acidvolEdit->setReadOnly(product->calc_acid); 507 ui->sp_acidvolEdit->setReadOnly(product->calc_acid);
508 ui->sp_acidvolEdit->setButtonSymbols(product->calc_acid ? QAbstractSpinBox::NoButtons : QAbstractSpinBox::UpDownArrows); 508 ui->sp_acidvolEdit->setButtonSymbols(product->calc_acid ? QAbstractSpinBox::NoButtons : QAbstractSpinBox::UpDownArrows);
509 ui->sp_volEdit->setValue(product->sparge_volume);
510 ui->sp_phEdit->setValue(product->sparge_ph); 509 ui->sp_phEdit->setValue(product->sparge_ph);
511 ui->sp_acidtypeEdit->setCurrentIndex(product->sparge_acid_type); 510 ui->sp_acidtypeEdit->setCurrentIndex(product->sparge_acid_type);
512 ui->sp_acidpercEdit->setValue(product->sparge_acid_perc); 511 ui->sp_acidpercEdit->setValue(product->sparge_acid_perc);
513 check_waters();
514
515 /* 512 /*
516 * At this point, see if we must upgrade the whole water part. 513 * At this point, see if we must upgrade the whole water part.
517 */ 514 */
518 // if (product->sparge_source != 2) {
519 if (product->sparge_volume != (product->brew_sparge_est + product->eq_HLT_deadspace)) { 515 if (product->sparge_volume != (product->brew_sparge_est + product->eq_HLT_deadspace)) {
520 qDebug() << "== Water settings upgrade =="; 516 qDebug() << "== Update sparge water supply from" << product->sparge_volume << "to" << (product->brew_sparge_est + product->eq_HLT_deadspace);
521 qDebug() << " sp" << product->sparge_volume << "se" << product->brew_sparge_est; 517 product->sparge_volume = product->brew_sparge_est + product->eq_HLT_deadspace;
522 qDebug() << " HLT " << product->eq_HLT_volume << " deadspace" << product->eq_HLT_deadspace; 518 is_changed();
523 qDebug() << " fixed sparge supply" << (product->brew_sparge_est + product->eq_HLT_deadspace); 519 }
524 } 520 ui->brew_spargevolShow->setValue(product->sparge_volume);
521 check_waters();
525 522
526 // Tab brewday. 523 // Tab brewday.
527 updateBrewday(); 524 updateBrewday();
528 ui->brew_mashphEdit->setValue(product->brew_mash_ph); 525 ui->brew_mashphEdit->setValue(product->brew_mash_ph);
529 ui->brew_mashphShow->setValue(product->mash_ph); 526 ui->brew_mashphShow->setValue(product->mash_ph);
697 connect(ui->mw_acidPick, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditProduct::mw_type_changed); 694 connect(ui->mw_acidPick, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditProduct::mw_type_changed);
698 connect(ui->tw_nameEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditProduct::wt_target_changed); 695 connect(ui->tw_nameEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditProduct::wt_target_changed);
699 connect(ui->w1_nameEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditProduct::w1_name_changed); 696 connect(ui->w1_nameEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditProduct::w1_name_changed);
700 connect(ui->w2_nameEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditProduct::w2_name_changed); 697 connect(ui->w2_nameEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditProduct::w2_name_changed);
701 connect(ui->w2_volEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditProduct::w2_volume_changed); 698 connect(ui->w2_volEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditProduct::w2_volume_changed);
702 connect(ui->sp_volEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditProduct::sp_volume_changed);
703 connect(ui->spargeGroup, SIGNAL(buttonClicked(int)), this, SLOT(sp_group_changed(int))); 699 connect(ui->spargeGroup, SIGNAL(buttonClicked(int)), this, SLOT(sp_group_changed(int)));
704 connect(ui->sp_acidtypeEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditProduct::sp_type_changed); 700 connect(ui->sp_acidtypeEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditProduct::sp_type_changed);
705 connect(ui->sp_phEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditProduct::sp_ph_changed); 701 connect(ui->sp_phEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditProduct::sp_ph_changed);
706 connect(ui->sp_acidvolEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditProduct::sp_acid_changed); 702 connect(ui->sp_acidvolEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditProduct::sp_acid_changed);
707 connect(ui->waterAdjust, &QPushButton::toggled, this, &EditProduct::waterAdjust_Show); 703 connect(ui->waterAdjust, &QPushButton::toggled, this, &EditProduct::waterAdjust_Show);

mercurial