src/EditEquipment.h

Fri, 29 Jul 2022 13:12:26 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Fri, 29 Jul 2022 13:12:26 +0200
changeset 373
b02aca4e926c
parent 30
0fec6a1abd13
child 385
09af9f46518f
permissions
-rw-r--r--

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.

30
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 #ifndef _EDITEQUIP_H
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2 #define _EDITEQUIP_H
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 #include <QDialog>
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7 namespace Ui {
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
8 class EditEquipment;
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
9 }
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11 class EditEquipment : public QDialog
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
12 {
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
13 Q_OBJECT
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
14
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
15 signals:
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
16 void entry_changed();
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
17
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
18 public:
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
19 explicit EditEquipment(int id, QWidget *parent = 0);
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
20 ~EditEquipment();
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
22 private slots:
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
23 void on_saveButton_clicked();
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
24 void on_quitButton_clicked();
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
25 void on_deleteButton_clicked();
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
26 void is_changed();
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
27 void material_changed();
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
28
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
29 private:
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
30 Ui::EditEquipment *ui;
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
31 int recno, inuse;
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
32 bool textIsChanged = false;
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
33
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
34 void WindowTitle();
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
35 void calcBatchVolume();
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
36 };
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
37
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
38 #endif

mercurial