src/ProfileStyles.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 79
e726db72da3c
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.

56
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 #ifndef _PROFILESTYLES_H
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2 #define _PROFILESTYLES_H
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 #include <QDialog>
76
93395c4d6c8d Profile Styles now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
5 #include <QtWidgets/QGridLayout>
93395c4d6c8d Profile Styles now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
6 #include <QtWidgets/QGroupBox>
93395c4d6c8d Profile Styles now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
7 #include <QtWidgets/QHBoxLayout>
93395c4d6c8d Profile Styles now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
8 #include <QtWidgets/QHeaderView>
93395c4d6c8d Profile Styles now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
9 #include <QtWidgets/QPushButton>
93395c4d6c8d Profile Styles now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
10 #include <QtWidgets/QTableWidget>
56
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
12 namespace Ui {
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
13 class ProfileStyles;
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
14 }
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
15
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
16 class ProfileStyles : public QDialog
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
17 {
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
18 Q_OBJECT
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
19
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
20 public:
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21 explicit ProfileStyles(QWidget *parent = nullptr);
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
22 ~ProfileStyles();
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
23
79
e726db72da3c All inventory and profiles now show the items sizes in the statusbar.
Michiel Broek <mbroek@mbse.eu>
parents: 76
diff changeset
24 signals:
e726db72da3c All inventory and profiles now show the items sizes in the statusbar.
Michiel Broek <mbroek@mbse.eu>
parents: 76
diff changeset
25 void setStatus(QString);
e726db72da3c All inventory and profiles now show the items sizes in the statusbar.
Michiel Broek <mbroek@mbse.eu>
parents: 76
diff changeset
26
56
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
27 private slots:
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
28 void on_insertButton_clicked();
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
29 void on_editButton_clicked();
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
30 void refreshTable(void);
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
31
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
32 private:
76
93395c4d6c8d Profile Styles now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
33 QGridLayout *gridLayout;
93395c4d6c8d Profile Styles now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
34 QTableWidget *tableStyles;
93395c4d6c8d Profile Styles now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
35 QGroupBox *groupBox;
93395c4d6c8d Profile Styles now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
36 QHBoxLayout *horizontalLayout;
93395c4d6c8d Profile Styles now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
37 QPushButton *quitButton;
93395c4d6c8d Profile Styles now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
38 QPushButton *insertButton;
93395c4d6c8d Profile Styles now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
39
56
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
40 void edit(int recno);
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
41 };
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
42
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
43 #endif

mercurial