src/ProdOnCode.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 231
54b5abd46958
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.

231
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 #ifndef _PRODONCODE_H
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2 #define _PRODONCODE_H
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 #include <QDialog>
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5 #include <QtWidgets/QGridLayout>
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6 #include <QtWidgets/QGroupBox>
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7 #include <QtWidgets/QHBoxLayout>
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
8 #include <QtWidgets/QHeaderView>
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
9 #include <QtWidgets/QPushButton>
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10 #include <QtWidgets/QTableWidget>
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
12 namespace Ui {
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
13 class ProdOnCode;
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
14 }
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
15
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
16 class ProdOnCode : public QDialog
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
17 {
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
18 Q_OBJECT
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
19
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
20 public:
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21 explicit ProdOnCode(QWidget *parent = nullptr);
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
22 ~ProdOnCode();
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
23
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
24 signals:
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
25 void setStatus(QString);
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
26
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
27 private slots:
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
28 void on_editButton_clicked();
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
29 void refreshTable(void);
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
30
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
31 private:
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
32 QGridLayout *gridLayout;
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
33 QTableWidget *tableOnCode;
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
34 QGroupBox *groupBox;
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
35 QHBoxLayout *horizontalLayout;
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
36 QPushButton *quitButton;
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
37 QPushButton *insertButton;
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
38
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
39 void edit(int recno);
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
40 };
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
41
54b5abd46958 Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
42 #endif

mercurial