# HG changeset patch # User Michiel Broek # Date 1669558461 -3600 # Node ID 9b5acb1f5776fa2f62f9a95873b51f855289f23e # Parent f12becbdd04231ac1e948d3424151b80f3f9bf25 Added show package color and ibu and take dillution in account diff -r f12becbdd042 -r 9b5acb1f5776 src/EditProductTab11.cpp --- a/src/EditProductTab11.cpp Sat Nov 26 15:41:11 2022 +0100 +++ b/src/EditProductTab11.cpp Sun Nov 27 15:14:21 2022 +0100 @@ -60,6 +60,15 @@ return; } + if (product->stage > PROD_STAGE_TERTIARY) { + ui->pack_abvLabel->setText(tr("Package ABV %:")); + ui->pack_finalabvLabel->setText(tr("Final ABV %:")); + ui->pack_finalcolorLabel->setText(tr("Final EBC:")); + ui->pack_finalibuLabel->setText(tr("Final IBU:")); + } else { + product->package_abv = product->est_abv; + } + double bvol = product->package_volume - (product->package_abv * product->package_volume) / 100.0; double balc = product->package_volume - bvol; double mvol = product->package_infuse_amount - (product->package_infuse_abv * product->package_infuse_amount) / 100.0; @@ -68,8 +77,16 @@ double tvol = bvol + mvol; product->final_abv = round(talc / (tvol + talc) * 10000.0) / 100.0; + ui->pack_abvShow->setValue(product->package_abv); ui->pack_finalabvShow->setValue(product->final_abv); + double pack_color = product->brew_fermenter_color * (product->package_volume / (product->package_volume + product->package_infuse_amount)); + double pack_ibu = product->brew_fermenter_ibu * (product->package_volume / (product->package_volume + product->package_infuse_amount)); + + ui->pack_finalcolorShow->setValue(pack_color); + ui->pack_finalcolorShow->setStyleSheet(Utils::ebc_to_style(pack_color)); + ui->pack_finalibuShow->setValue(pack_ibu); + TSec = product->secondary_temp; if (TSec < 1) TSec = product->primary_end_temp; @@ -346,14 +363,14 @@ const QSignalBlocker blocker1(ui->keg_volumeEdit); if (product->keg_amount < 0) product->keg_amount = 0; /* Failsafe - bugfix */ - if (val > product->package_volume) { - val = product->package_volume; + if (val > (product->package_volume + product->package_infuse_amount)) { + val = product->package_volume + product->package_infuse_amount; const QSignalBlocker blocker2(ui->bottle_volumeEdit); ui->bottle_volumeEdit->setValue(val); } - if ((val + product->keg_amount) > product->package_volume) { - double kegs = product->package_volume - val; + if ((val + product->keg_amount) > (product->package_volume + product->package_infuse_amount)) { + double kegs = product->package_volume + product->package_infuse_amount - val; product->keg_amount = kegs; ui->keg_volumeEdit->setValue(kegs); } @@ -454,14 +471,14 @@ const QSignalBlocker blocker1(ui->bottle_volumeEdit); if (product->bottle_amount < 0) product->bottle_amount = 0; /* Failsafe - bugfix */ - if (val > product->package_volume) { - val = product->package_volume; + if (val > (product->package_volume + product->package_infuse_amount)) { + val = product->package_volume + product->package_infuse_amount; const QSignalBlocker blocker2(ui->keg_volumeEdit); ui->keg_volumeEdit->setValue(val); } - if ((val + product->bottle_amount) > product->package_volume) { - double bottle = product->package_volume - val; + if ((val + product->bottle_amount) > (product->package_volume + product->package_infuse_amount)) { + double bottle = product->package_volume + product->package_infuse_amount - val; product->bottle_amount = bottle; ui->bottle_volumeEdit->setValue(bottle); } diff -r f12becbdd042 -r 9b5acb1f5776 translations/bmsapp_en.ts --- a/translations/bmsapp_en.ts Sat Nov 26 15:41:11 2022 +0100 +++ b/translations/bmsapp_en.ts Sun Nov 27 15:14:21 2022 +0100 @@ -2371,10 +2371,10 @@ - - - - + + + + % @@ -2426,10 +2426,10 @@ - - - - + + + + L @@ -2869,9 +2869,9 @@ - - - + + + Set or clear date @@ -2896,10 +2896,10 @@ - - - - + + + + ... @@ -2971,8 +2971,8 @@ - - + + dd-MM-yyyy @@ -3112,8 +3112,8 @@ - - + + gr @@ -3451,8 +3451,8 @@ - - + + °C @@ -3566,7 +3566,7 @@ - + Brew log chart @@ -3814,7 +3814,17 @@ - Final ABV %: + Estimated final ABV %: + + + + + Estimated final IBU: + + + + + Estimated final EBC: @@ -3850,173 +3860,173 @@ - Package ABV %: - - - - + Estimated package ABV %: + + + + Bottles - - + + Volume: - - + + Desired volume CO2: - - + + Priming sugar: - - + + Sugar amount: - - + + Priming: - - + + Water amount: - + Bottle fermentation: - - + + gr/L - + Expected pressure in bar: - + Bottles ABV %: - + Kegs - + Kegs ABV %: - + Kegs pressure in bar: - + Kegs temperature: - + Forced carbonation: - + Edit the package date. - + Show carbonation log: - + Tasting - + Taste date: - + Taste rate: - + Color: - - Transparency: - - - - - Head: - - - - - Aroma: - - - + Transparency: + + + + + Head: + + + + + Aroma: + + + + Taste: - + Aftertaste: - + Mouthfeel: - + Notes: - + Edit the tasting date. - + Export - + Print @@ -4192,6 +4202,7 @@ + Final EBC: @@ -4364,6 +4375,7 @@ + Final IBU: @@ -4844,12 +4856,22 @@ - + + Package ABV %: + + + + + Final ABV %: + + + + Confirm package - + Confirm that the beer is packaged and all data is correct diff -r f12becbdd042 -r 9b5acb1f5776 translations/bmsapp_nl.ts --- a/translations/bmsapp_nl.ts Sat Nov 26 15:41:11 2022 +0100 +++ b/translations/bmsapp_nl.ts Sun Nov 27 15:14:21 2022 +0100 @@ -2579,10 +2579,10 @@ - - - - + + + + % % @@ -2634,10 +2634,10 @@ - - - - + + + + L @@ -2966,9 +2966,9 @@ - - - + + + Set or clear date Zet of wis datum @@ -2993,10 +2993,10 @@ - - - - + + + + ... ... @@ -3068,8 +3068,8 @@ - - + + dd-MM-yyyy dd-MM-yyyy @@ -3376,8 +3376,8 @@ - - + + gr gr @@ -3579,7 +3579,7 @@ Toevoeging opmerking: - + Final ABV %: Finale ABV %: @@ -3589,30 +3589,40 @@ Toevoeging extra ABV %: - - + + Estimated final IBU: + Verwacht finale IBU: + + + + Estimated final EBC: + Verwacht finale EBC: + + + + Volume: Volume: - - + + Priming: Carbonatie: - + Bottle fermentation: Flessen hergisting: - - + + gr/L gr/L - + Kegs temperature: Fusten temperatuur: @@ -3722,8 +3732,8 @@ - - + + °C °C @@ -3814,7 +3824,7 @@ - + Brew log chart Brouw log grafiek @@ -3981,7 +3991,7 @@ Verpakken volume: - + Package ABV %: Verpakken ABV %: @@ -4191,6 +4201,11 @@ Behandeld spoelwater + + Estimated final ABV %: + Verwacht finale ABV %: + + Extra dilution or infusion added to this batch. Toegevoegde verdunning of infusie aan deze batch. @@ -4212,141 +4227,146 @@ Hier kun je de toevoeging beschrijven. - + + Estimated package ABV %: + Verwacht verpakken ABV %: + + + Bottles Flessen - - + + Desired volume CO2: Gewenst volume CO2: - - + + Priming sugar: Carbonatie suiker: - - + + Sugar amount: Suiker gewicht: - - + + Water amount: Water volume: - + Expected pressure in bar: Verwachte druk in bar: - + Bottles ABV %: Flessen ABV %: - + Kegs Fusten - + Kegs ABV %: Fusten ABV %: - + Kegs pressure in bar: Fusten druk in bar: - + Forced carbonation: Geforceerde carbonatie: - + Edit the package date. Wijzig de verpakkings datum. - + Show carbonation log: Toon carbonatie log: - + Tasting Proeven - + Taste date: Proeven datum: - + Taste rate: Beoordeling cijfer: - + Color: Kleur: - - Transparency: - Helderheid: - - - - Head: - Schuim: - - - - Aroma: - Geur: - - + Transparency: + Helderheid: + + + + Head: + Schuim: + + + + Aroma: + Geur: + + + Taste: Smaak: - + Aftertaste: Nasmaak: - + Mouthfeel: Mondgevoel: - + Notes: Opmerkingen: - + Edit the tasting date. Wijzig de datum van proeven. - + Export Exporteer - + Print Print @@ -4574,6 +4594,7 @@ + Final EBC: Finale EBC: @@ -4758,6 +4779,7 @@ + Final IBU: Finale IBU: @@ -5526,12 +5548,12 @@ Batterij volt - + Confirm package Bevestig verpakken - + Confirm that the beer is packaged and all data is correct Bevestig dat het bier verpakt is en de gegevens kloppen diff -r f12becbdd042 -r 9b5acb1f5776 ui/EditProduct.ui --- a/ui/EditProduct.ui Sat Nov 26 15:41:11 2022 +0100 +++ b/ui/EditProduct.ui Sun Nov 27 15:14:21 2022 +0100 @@ -10361,9 +10361,9 @@ - 10 - 50 - 151 + 340 + 80 + 171 20 @@ -10393,14 +10393,14 @@ - 560 - 80 - 161 - 20 - - - - Final ABV %: + 690 + 20 + 171 + 20 + + + + Estimated final ABV %: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -10409,9 +10409,9 @@ - 560 + 340 50 - 161 + 171 20 @@ -10425,9 +10425,9 @@ - 270 - 20 - 161 + 10 + 50 + 151 20 @@ -10469,8 +10469,8 @@ - 170 - 50 + 520 + 80 91 24 @@ -10500,8 +10500,8 @@ - 730 - 80 + 870 + 20 91 24 @@ -10531,7 +10531,7 @@ - 730 + 520 50 91 24 @@ -10568,8 +10568,8 @@ - 440 - 20 + 170 + 50 91 24 @@ -10606,14 +10606,14 @@ - 560 + 340 20 - 161 - 20 - - - - Package ABV %: + 171 + 20 + + + + Estimated package ABV %: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -10622,7 +10622,7 @@ - 730 + 520 20 91 24 @@ -10650,6 +10650,106 @@ 100.000000000000000 + + + + 870 + 80 + 91 + 24 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + QAbstractSpinBox::NoButtons + + + false + + + 0 + + + 0.000000000000000 + + + 400.000000000000000 + + + 1.000000000000000 + + + + + + 690 + 80 + 171 + 20 + + + + Estimated final IBU: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 690 + 50 + 171 + 20 + + + + Estimated final EBC: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 870 + 50 + 91 + 24 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + QAbstractSpinBox::NoButtons + + + false + + + 0 + + + 0.000000000000000 + + + 400.000000000000000 + + + 1.000000000000000 + +