Show total mash volume.

Fri, 29 Apr 2022 23:09:51 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Fri, 29 Apr 2022 23:09:51 +0200
changeset 180
bbf0f06a5e72
parent 179
512f492358e3
child 181
14a1f7bca79b

Show total mash volume.

src/EditProductTab7.cpp file | annotate | diff | comparison | revisions
src/global.h file | annotate | diff | comparison | revisions
ui/EditProduct.ui file | annotate | diff | comparison | revisions
--- a/src/EditProductTab7.cpp	Fri Apr 29 22:49:32 2022 +0200
+++ b/src/EditProductTab7.cpp	Fri Apr 29 23:09:51 2022 +0200
@@ -238,6 +238,7 @@
 	}
     }
 
+    ui->mash_volEdit->setValue(product->mashs_kg * MaltVolume + infused);
     /* Show the calculated total mash time. */
     ui->mash_timeEdit->setText(QString("%1:%2").arg(product->mashs_time / 60).arg(product->mashs_time % 60, 2, 'f', 0, '0'));
 }
--- a/src/global.h	Fri Apr 29 22:49:32 2022 +0200
+++ b/src/global.h	Fri Apr 29 23:09:51 2022 +0200
@@ -32,7 +32,7 @@
 #define SlakingHeat		10.318	//cal/g.°C
 #define equip_tun_weight	2.0	// 2 Kg pot
 #define equip_tun_specific_heat	0.110
-
+#define MaltVolume		0.87	// l/kg 0.688 volgens internetbronnen, gemeten 0.874 l/kg, na enige tijd maischen 0,715 l/kg (A3 Otten).
 
 struct Acid
 {
--- a/ui/EditProduct.ui	Fri Apr 29 22:49:32 2022 +0200
+++ b/ui/EditProduct.ui	Fri Apr 29 23:09:51 2022 +0200
@@ -3436,9 +3436,9 @@
         <property name="geometry">
          <rect>
           <x>10</x>
-          <y>110</y>
+          <y>120</y>
           <width>1101</width>
-          <height>351</height>
+          <height>341</height>
          </rect>
         </property>
        </widget>
@@ -3446,7 +3446,7 @@
         <property name="geometry">
          <rect>
           <x>140</x>
-          <y>40</y>
+          <y>80</y>
           <width>80</width>
           <height>23</height>
          </rect>
@@ -3540,6 +3540,53 @@
          <bool>true</bool>
         </property>
        </widget>
+       <widget class="QLabel" name="mash_volLabel">
+        <property name="geometry">
+         <rect>
+          <x>0</x>
+          <y>40</y>
+          <width>131</width>
+          <height>20</height>
+         </rect>
+        </property>
+        <property name="text">
+         <string>Mash total volume:</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+       </widget>
+       <widget class="QDoubleSpinBox" name="mash_volEdit">
+        <property name="geometry">
+         <rect>
+          <x>140</x>
+          <y>40</y>
+          <width>80</width>
+          <height>24</height>
+         </rect>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+        <property name="readOnly">
+         <bool>true</bool>
+        </property>
+        <property name="buttonSymbols">
+         <enum>QAbstractSpinBox::NoButtons</enum>
+        </property>
+        <property name="accelerated">
+         <bool>false</bool>
+        </property>
+        <property name="suffix">
+         <string> L</string>
+        </property>
+        <property name="decimals">
+         <number>1</number>
+        </property>
+        <property name="maximum">
+         <double>100000.000000000000000</double>
+        </property>
+       </widget>
       </widget>
       <widget class="QWidget" name="water">
        <attribute name="icon">

mercurial