Fri, 29 Jul 2022 13:12:26 +0200
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
48
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | #ifndef _EDITPROFILEWATER_H |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2 | #define _EDITPROFILEWATER_H |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3 | |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4 | #include <QDialog> |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5 | |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
6 | |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
7 | namespace Ui { |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
8 | class EditProfileWater; |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
9 | } |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
10 | |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
11 | class EditProfileWater : public QDialog |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
12 | { |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
13 | Q_OBJECT |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
14 | |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
15 | signals: |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
16 | void entry_changed(); |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
17 | |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
18 | public: |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
19 | explicit EditProfileWater(int id, QWidget *parent = 0); |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
20 | ~EditProfileWater(); |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
21 | |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
22 | private slots: |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
23 | void on_saveButton_clicked(); |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
24 | void on_quitButton_clicked(); |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
25 | void on_deleteButton_clicked(); |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
26 | void is_changed(); |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
27 | void water_changed(); |
353
324a7268796b
Updated watersources editors to include water hardness and residual alkalinity. Layout changes. Only total_alkalinity edit, bicarbonate is now only calculated.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
28 | void calcium_changed(double val); |
324a7268796b
Updated watersources editors to include water hardness and residual alkalinity. Layout changes. Only total_alkalinity edit, bicarbonate is now only calculated.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
29 | void total_alkalinity_changed(double val); |
324a7268796b
Updated watersources editors to include water hardness and residual alkalinity. Layout changes. Only total_alkalinity edit, bicarbonate is now only calculated.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
30 | void sulfate_changed(double val); |
324a7268796b
Updated watersources editors to include water hardness and residual alkalinity. Layout changes. Only total_alkalinity edit, bicarbonate is now only calculated.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
31 | void chloride_changed(double val); |
324a7268796b
Updated watersources editors to include water hardness and residual alkalinity. Layout changes. Only total_alkalinity edit, bicarbonate is now only calculated.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
32 | void sodium_changed(double val); |
324a7268796b
Updated watersources editors to include water hardness and residual alkalinity. Layout changes. Only total_alkalinity edit, bicarbonate is now only calculated.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
33 | void magnesium_changed(double val); |
324a7268796b
Updated watersources editors to include water hardness and residual alkalinity. Layout changes. Only total_alkalinity edit, bicarbonate is now only calculated.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
34 | void ph_changed(double val); |
48
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
35 | |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
36 | private: |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
37 | Ui::EditProfileWater *ui; |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
38 | int recno; |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
39 | bool textIsChanged = false; |
353
324a7268796b
Updated watersources editors to include water hardness and residual alkalinity. Layout changes. Only total_alkalinity edit, bicarbonate is now only calculated.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
40 | double calcium, bicarbonate, sulfate, chloride, sodium, magnesium, ph, total_alkalinity; |
48
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
41 | |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
42 | void WindowTitle(); |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
43 | void WaterSet(); |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
44 | }; |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
45 | |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
46 | #endif |