# HG changeset patch # User Michiel Broek # Date 1651393891 -7200 # Node ID 545d311308446f174ce92116c60ad180889d0d5a # Parent 14a1f7bca79b90eef3fadf4b13d395583b46419e Added brewday mash results box. diff -r 14a1f7bca79b -r 545d31130844 src/EditProduct.cpp --- a/src/EditProduct.cpp Sat Apr 30 20:36:30 2022 +0200 +++ b/src/EditProduct.cpp Sun May 01 10:31:31 2022 +0200 @@ -902,6 +902,13 @@ ui->sp_acidvolEdit->setValue(product->sparge_acid_amount); // Tab brewday. + ui->brew_startEdit->setText(product->brew_date_start.toString("dd MMM yyyy hh:mm")); + ui->brew_endEdit->setText(product->brew_date_end.toString("dd MMM yyyy hh:mm")); + ui->brew_mashphEdit->setValue(product->brew_mash_ph); + ui->brew_mashphShow->setValue(product->mash_ph); + ui->brew_mashsgEdit->setValue(product->brew_mash_sg); + ui->brew_mashsgShow->setValue(0); + ui->brew_masheffShow->setValue(product->brew_mash_efficiency); // Tab fermentation. diff -r 14a1f7bca79b -r 545d31130844 src/EditProductTab3.cpp --- a/src/EditProductTab3.cpp Sat Apr 30 20:36:30 2022 +0200 +++ b/src/EditProductTab3.cpp Sun May 01 10:31:31 2022 +0200 @@ -262,6 +262,11 @@ qDebug() << " psugar" << psugar << "pcara" << pcara << "mvol" << mvol; qDebug() << " sugarsf" << sugarsf << "sugarsm" << sugarsm; + double v = s / sugardensity + mvol; + s = 1000 * s / (v * 10); //deg. Plato + product->est_mash_sg = Utils::plato_to_sg(s); + ui->brew_mashsgShow->setValue(product->est_mash_sg); + double og = Utils::estimate_sg(sugarsf + addedS, product->batch_size); qDebug() << " OG" << ui->est_ogEdit->value() << og; product->est_og = og; diff -r 14a1f7bca79b -r 545d31130844 src/global.h --- a/src/global.h Sat Apr 30 20:36:30 2022 +0200 +++ b/src/global.h Sun May 01 10:31:31 2022 +0200 @@ -530,6 +530,7 @@ int mashs_row; double mashs_kg; ///< Kg fermentables in the mash. int mashs_time; ///< Total mash time. + double est_mash_sg; double preboil_sg; }; diff -r 14a1f7bca79b -r 545d31130844 ui/EditProduct.ui --- a/ui/EditProduct.ui Sat Apr 30 20:36:30 2022 +0200 +++ b/ui/EditProduct.ui Sun May 01 10:31:31 2022 +0200 @@ -95,7 +95,7 @@ QTabWidget::Rounded - 0 + 8 Qt::ElideNone @@ -5937,6 +5937,272 @@ Brewday + + + + 0 + 10 + 131 + 20 + + + + Brewday start: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 570 + 10 + 131 + 20 + + + + Brewday end: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 140 + 10 + 141 + 23 + + + + true + + + + + + 710 + 10 + 141 + 23 + + + + true + + + + + + 290 + 10 + 28 + 22 + + + + ... + + + + :/icons/silk/clock_edit.png:/icons/silk/clock_edit.png + + + + + + 860 + 10 + 28 + 22 + + + + ... + + + + :/icons/silk/clock_edit.png:/icons/silk/clock_edit.png + + + + + + 0 + 40 + 321 + 121 + + + + Mashing + + + + + 10 + 20 + 121 + 20 + + + + Mash pH: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 140 + 20 + 81 + 24 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + 14.000000000000000 + + + 0.100000000000000 + + + + + + 230 + 20 + 71 + 24 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + QAbstractSpinBox::NoButtons + + + + + + 140 + 50 + 81 + 24 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + 3 + + + 0.001000000000000 + + + + + + 230 + 50 + 71 + 24 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + QAbstractSpinBox::NoButtons + + + 3 + + + + + + 140 + 80 + 81 + 24 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + QAbstractSpinBox::NoButtons + + + % + + + 1 + + + 200.000000000000000 + + + + + + 10 + 50 + 121 + 20 + + + + Mash SG: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 10 + 80 + 121 + 20 + + + + Efficiency: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + +