src/EditRecipe.h

Fri, 03 Jun 2022 16:32:18 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Fri, 03 Jun 2022 16:32:18 +0200
changeset 253
d130385c1b0d
parent 230
b68c0c61d261
child 257
cfba041bdaee
permissions
-rw-r--r--

Copy recipe to duplicated recipe added. Copy recipe to product added. Added popup with export choices.

92
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 #ifndef _EDITRECIPE_H
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2 #define _EDITRECIPE_H
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 #include <QDialog>
101
1d14d3bf2465 Added change beerstyle, the fermentables table, and first part of calcFermentables to the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 92
diff changeset
5 #include <QStringList>
1d14d3bf2465 Added change beerstyle, the fermentables table, and first part of calcFermentables to the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 92
diff changeset
6 #include <QJsonDocument>
108
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
7 #include <QJsonObject>
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
8 #include <QDoubleSpinBox>
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
9 #include <QCheckBox>
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
10 #include <QComboBox>
253
d130385c1b0d Copy recipe to duplicated recipe added. Copy recipe to product added. Added popup with export choices.
Michiel Broek <mbroek@mbse.eu>
parents: 230
diff changeset
11 #include <QRadioButton>
108
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
12 #include <QLineEdit>
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
13 #include <QDialogButtonBox>
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
14 #include <QList>
126
3c013ef88a00 Added hop rows sorting. Added hop amount edit, hop time changed, hop select changed, hop instock change and hop use at changed. Added generic on hop editrow editor.
Michiel Broek <mbroek@mbse.eu>
parents: 125
diff changeset
15 #include <QLabel>
108
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
16
158
24bc2de721d9 Activated print recipe button. The recipe record structure is now global. Added global product record structure.
Michiel Broek <mbroek@mbse.eu>
parents: 157
diff changeset
17 #include "global.h"
105
e79079bf013d Hide not visible fermentables data inside the fermentablesTable so that all data stays together. Format the fermentables json data again after changes. Add confirmation message to delete a fermentable row. Added buttons for a fermentables row editor.
Michiel Broek <mbroek@mbse.eu>
parents: 103
diff changeset
18
92
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
19 namespace Ui {
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
20 class EditRecipe;
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21 }
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
22
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
23 class EditRecipe : public QDialog
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
24 {
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
25 Q_OBJECT
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
26
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
27 signals:
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
28 void entry_changed();
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
29
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
30 public:
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
31 explicit EditRecipe(int id, QWidget *parent = 0);
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
32 ~EditRecipe();
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
33
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
34 private slots:
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
35 void on_saveButton_clicked();
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
36 void on_quitButton_clicked();
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
37 void on_deleteButton_clicked();
157
771b0b00092a Added beerxml export
Michiel Broek <mbroek@mbse.eu>
parents: 154
diff changeset
38 void on_exportButton_clicked();
771b0b00092a Added beerxml export
Michiel Broek <mbroek@mbse.eu>
parents: 154
diff changeset
39 void on_printButton_clicked();
92
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
40 void is_changed();
115
9c90a00fd9dd Completed recipe save record. Recipe name and notes can be edited.
Michiel Broek <mbroek@mbse.eu>
parents: 113
diff changeset
41 void name_changed(QString);
9c90a00fd9dd Completed recipe save record. Recipe name and notes can be edited.
Michiel Broek <mbroek@mbse.eu>
parents: 113
diff changeset
42 void notes_changed();
150
fd568cc1dd0e Implemented the last widgets on the first tab and added the needed functions for them such as scaling the recipe. This is the last part of the recipe editor, now ready for testing.
Michiel Broek <mbroek@mbse.eu>
parents: 149
diff changeset
43 void style_changed(int val);
fd568cc1dd0e Implemented the last widgets on the first tab and added the needed functions for them such as scaling the recipe. This is the last part of the recipe editor, now ready for testing.
Michiel Broek <mbroek@mbse.eu>
parents: 149
diff changeset
44 void colormethod_changed(int val);
fd568cc1dd0e Implemented the last widgets on the first tab and added the needed functions for them such as scaling the recipe. This is the last part of the recipe editor, now ready for testing.
Michiel Broek <mbroek@mbse.eu>
parents: 149
diff changeset
45 void ibumethod_changed(int val);
fd568cc1dd0e Implemented the last widgets on the first tab and added the needed functions for them such as scaling the recipe. This is the last part of the recipe editor, now ready for testing.
Michiel Broek <mbroek@mbse.eu>
parents: 149
diff changeset
46 void est_og_changed(double val);
fd568cc1dd0e Implemented the last widgets on the first tab and added the needed functions for them such as scaling the recipe. This is the last part of the recipe editor, now ready for testing.
Michiel Broek <mbroek@mbse.eu>
parents: 149
diff changeset
47 void efficiency_changed(double val);
fd568cc1dd0e Implemented the last widgets on the first tab and added the needed functions for them such as scaling the recipe. This is the last part of the recipe editor, now ready for testing.
Michiel Broek <mbroek@mbse.eu>
parents: 149
diff changeset
48 void boil_time_changed(int val);
fd568cc1dd0e Implemented the last widgets on the first tab and added the needed functions for them such as scaling the recipe. This is the last part of the recipe editor, now ready for testing.
Michiel Broek <mbroek@mbse.eu>
parents: 149
diff changeset
49 void batch_size_changed(double val);
fd568cc1dd0e Implemented the last widgets on the first tab and added the needed functions for them such as scaling the recipe. This is the last part of the recipe editor, now ready for testing.
Michiel Broek <mbroek@mbse.eu>
parents: 149
diff changeset
50 void brew_type_changed(int val);
171
6cd2d808d863 Implemented recipe lock setting.
Michiel Broek <mbroek@mbse.eu>
parents: 163
diff changeset
51 void locked_changed(bool val);
101
1d14d3bf2465 Added change beerstyle, the fermentables table, and first part of calcFermentables to the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 92
diff changeset
52 void refreshFermentables();
1d14d3bf2465 Added change beerstyle, the fermentables table, and first part of calcFermentables to the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 92
diff changeset
53 void refreshHops();
1d14d3bf2465 Added change beerstyle, the fermentables table, and first part of calcFermentables to the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 92
diff changeset
54 void refreshMiscs();
1d14d3bf2465 Added change beerstyle, the fermentables table, and first part of calcFermentables to the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 92
diff changeset
55 void refreshYeasts();
1d14d3bf2465 Added change beerstyle, the fermentables table, and first part of calcFermentables to the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 92
diff changeset
56 void refreshMashs();
131
0115b97e8c39 Added global variables, C++ lovers will hate that. Added global acid data. Fixed several load and save errors in the json arrays in the recipe record. Added first part of the miscs table. The first part of the water tab has values.
Michiel Broek <mbroek@mbse.eu>
parents: 126
diff changeset
57 void refreshWaters();
101
1d14d3bf2465 Added change beerstyle, the fermentables table, and first part of calcFermentables to the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 92
diff changeset
58 void refreshAll();
108
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
59 void ferment_amount_changed(double val);
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
60 void ferment_pct_changed(double val);
118
c57771e40ca8 Fixed loading mash_name. Save calculated est_ values in the Recipe struct. Fixed missing recipe values save to MySQL. Added slots for ferment_select_changed, ferment_instock_changed. Layout changes in fermentables popup editor. Implemented fermentable abort and rollback.
Michiel Broek <mbroek@mbse.eu>
parents: 117
diff changeset
61 void ferment_to100_changed(bool val);
c57771e40ca8 Fixed loading mash_name. Save calculated est_ values in the Recipe struct. Fixed missing recipe values save to MySQL. Added slots for ferment_select_changed, ferment_instock_changed. Layout changes in fermentables popup editor. Implemented fermentable abort and rollback.
Michiel Broek <mbroek@mbse.eu>
parents: 117
diff changeset
62 void ferment_select_changed(int val);
c57771e40ca8 Fixed loading mash_name. Save calculated est_ values in the Recipe struct. Fixed missing recipe values save to MySQL. Added slots for ferment_select_changed, ferment_instock_changed. Layout changes in fermentables popup editor. Implemented fermentable abort and rollback.
Michiel Broek <mbroek@mbse.eu>
parents: 117
diff changeset
63 void ferment_instock_changed(bool val);
c57771e40ca8 Fixed loading mash_name. Save calculated est_ values in the Recipe struct. Fixed missing recipe values save to MySQL. Added slots for ferment_select_changed, ferment_instock_changed. Layout changes in fermentables popup editor. Implemented fermentable abort and rollback.
Michiel Broek <mbroek@mbse.eu>
parents: 117
diff changeset
64 void ferment_added_changed(int val);
126
3c013ef88a00 Added hop rows sorting. Added hop amount edit, hop time changed, hop select changed, hop instock change and hop use at changed. Added generic on hop editrow editor.
Michiel Broek <mbroek@mbse.eu>
parents: 125
diff changeset
65 void hop_amount_changed(double val);
3c013ef88a00 Added hop rows sorting. Added hop amount edit, hop time changed, hop select changed, hop instock change and hop use at changed. Added generic on hop editrow editor.
Michiel Broek <mbroek@mbse.eu>
parents: 125
diff changeset
66 void hop_time_changed(int val);
3c013ef88a00 Added hop rows sorting. Added hop amount edit, hop time changed, hop select changed, hop instock change and hop use at changed. Added generic on hop editrow editor.
Michiel Broek <mbroek@mbse.eu>
parents: 125
diff changeset
67 void hop_select_changed(int val);
3c013ef88a00 Added hop rows sorting. Added hop amount edit, hop time changed, hop select changed, hop instock change and hop use at changed. Added generic on hop editrow editor.
Michiel Broek <mbroek@mbse.eu>
parents: 125
diff changeset
68 void hop_instock_changed(bool val);
3c013ef88a00 Added hop rows sorting. Added hop amount edit, hop time changed, hop select changed, hop instock change and hop use at changed. Added generic on hop editrow editor.
Michiel Broek <mbroek@mbse.eu>
parents: 125
diff changeset
69 void hop_useat_changed(int val);
132
9ede9c75cb54 Added miscs popup editor. No edit functions yet. Delete misc row added.
Michiel Broek <mbroek@mbse.eu>
parents: 131
diff changeset
70 void misc_amount_changed(double val);
9ede9c75cb54 Added miscs popup editor. No edit functions yet. Delete misc row added.
Michiel Broek <mbroek@mbse.eu>
parents: 131
diff changeset
71 void misc_time_changed(int val);
9ede9c75cb54 Added miscs popup editor. No edit functions yet. Delete misc row added.
Michiel Broek <mbroek@mbse.eu>
parents: 131
diff changeset
72 void misc_select_changed(int val);
9ede9c75cb54 Added miscs popup editor. No edit functions yet. Delete misc row added.
Michiel Broek <mbroek@mbse.eu>
parents: 131
diff changeset
73 void misc_instock_changed(bool val);
9ede9c75cb54 Added miscs popup editor. No edit functions yet. Delete misc row added.
Michiel Broek <mbroek@mbse.eu>
parents: 131
diff changeset
74 void misc_useat_changed(int val);
143
8414844c9f8b Added all yeast edit functions and the popup editor window.
Michiel Broek <mbroek@mbse.eu>
parents: 142
diff changeset
75 void yeast_amount_changed(double val);
8414844c9f8b Added all yeast edit functions and the popup editor window.
Michiel Broek <mbroek@mbse.eu>
parents: 142
diff changeset
76 void yeast_select_changed(int val);
8414844c9f8b Added all yeast edit functions and the popup editor window.
Michiel Broek <mbroek@mbse.eu>
parents: 142
diff changeset
77 void yeast_instock_changed(bool val);
8414844c9f8b Added all yeast edit functions and the popup editor window.
Michiel Broek <mbroek@mbse.eu>
parents: 142
diff changeset
78 void yeast_useat_changed(int val);
139
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
79 void addFermentRow_clicked();
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
80 void deleteFermentRow_clicked();
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
81 void editFermentRow_clicked();
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
82 void addHopRow_clicked();
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
83 void deleteHopRow_clicked();
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
84 void editHopRow_clicked();
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
85 void addMiscRow_clicked();
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
86 void deleteMiscRow_clicked();
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
87 void editMiscRow_clicked();
141
eea8a9e7e1f6 Upgrade yeasts fields if needed during recipe startup. Added yeast table.
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
88 void addYeastRow_clicked();
eea8a9e7e1f6 Upgrade yeasts fields if needed during recipe startup. Added yeast table.
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
89 void deleteYeastRow_clicked();
eea8a9e7e1f6 Upgrade yeasts fields if needed during recipe startup. Added yeast table.
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
90 void editYeastRow_clicked();
144
c4b107bf153a First setup of the mash tab with the table.
Michiel Broek <mbroek@mbse.eu>
parents: 143
diff changeset
91 void addMashRow_clicked();
c4b107bf153a First setup of the mash tab with the table.
Michiel Broek <mbroek@mbse.eu>
parents: 143
diff changeset
92 void deleteMashRow_clicked();
c4b107bf153a First setup of the mash tab with the table.
Michiel Broek <mbroek@mbse.eu>
parents: 143
diff changeset
93 void editMashRow_clicked();
c4b107bf153a First setup of the mash tab with the table.
Michiel Broek <mbroek@mbse.eu>
parents: 143
diff changeset
94 void upMashRow_clicked();
c4b107bf153a First setup of the mash tab with the table.
Michiel Broek <mbroek@mbse.eu>
parents: 143
diff changeset
95 void downMashRow_clicked();
92
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
96
149
d73719fa2ebb Implemented choose main and dillution waters. Implement change dillution water volume.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
97 void w1_name_changed(int val);
d73719fa2ebb Implemented choose main and dillution waters. Implement change dillution water volume.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
98 void w2_name_changed(int val);
139
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
99 void w2_volume_changed(double val);
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
100 void wb_cacl2_changed(double val);
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
101 void wb_caso4_changed(double val);
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
102 void wb_mgso4_changed(double val);
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
103 void wb_nacl_changed(double val);
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
104 void wb_mgcl2_changed(double val);
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
105 void wb_nahco3_changed(double val);
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
106 void wb_caco3_changed(double val);
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
107 void mw_calc_acid_clicked();
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
108 void wt_target_changed(int val);
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
109 void mw_ph_changed(double val);
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
110 void mw_acid_changed(double val);
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
111 void mw_type_changed(int val);
162
19156b8b339f Added calcSparge.
Michiel Broek <mbroek@mbse.eu>
parents: 158
diff changeset
112 void sp_source_changed(int val);
19156b8b339f Added calcSparge.
Michiel Broek <mbroek@mbse.eu>
parents: 158
diff changeset
113 void sp_type_changed(int val);
19156b8b339f Added calcSparge.
Michiel Broek <mbroek@mbse.eu>
parents: 158
diff changeset
114 void sp_ph_changed(double val);
145
fd4f0de86fd9 Implemented most parts of the mash editor.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
115 void step_name_changed(QString val);
fd4f0de86fd9 Implemented most parts of the mash editor.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
116 void step_type_changed(int val);
fd4f0de86fd9 Implemented most parts of the mash editor.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
117 void step_temp_changed(double val);
fd4f0de86fd9 Implemented most parts of the mash editor.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
118 void end_temp_changed(double val);
fd4f0de86fd9 Implemented most parts of the mash editor.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
119 void step_time_changed(double val);
fd4f0de86fd9 Implemented most parts of the mash editor.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
120 void ramp_time_changed(double val);
fd4f0de86fd9 Implemented most parts of the mash editor.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
121 void infuse_changed(double val);
147
af1386a6ece7 Added mash table replace
Michiel Broek <mbroek@mbse.eu>
parents: 145
diff changeset
122 void mash_select_changed(int val);
163
6cccd340ea8c Version 0.1.3. Mash name can be edited manual. Added a remark about EBC calculations. Updated dustch translation. Still items in recipe tables are not shown translated, another qt mistery. Extended some number input ranges for large batches.
Michiel Broek <mbroek@mbse.eu>
parents: 162
diff changeset
123 void mash_name_changed(QString);
133
08635b028dcf Load waters during recipe startup. Started calcWater() function. Load profile_setup record global. The print function uses the globals now too instead of loading from the database.
Michiel Broek <mbroek@mbse.eu>
parents: 132
diff changeset
124
136
17030224d919 Remove some water search debug messages. Added signals and slots for mash water pH and volume changes. Added manual pH adjust.
Michiel Broek <mbroek@mbse.eu>
parents: 135
diff changeset
125 /* Modified progress bars */
139
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
126 void ferment_perc_mash_valueChanged(int value);
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
127 void ferment_perc_sugars_valueChanged(int value);
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
128 void ferment_perc_cara_valueChanged(int value);
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
129 void ferment_lintner_valueChanged(int value);
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
130 void hop_Flavour_valueChanged(int value);
f947c6988e91 Fixed complains about missing signals. Added add misc row, misc amount changed, misc time changed, misc select changed and misc instock changed. Silence false changed trigger.
Michiel Broek <mbroek@mbse.eu>
parents: 138
diff changeset
131 void hop_Aroma_valueChanged(int value);
102
b017001850df Almost finished calcFermentables()
Michiel Broek <mbroek@mbse.eu>
parents: 101
diff changeset
132
92
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
133 private:
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
134 Ui::EditRecipe *ui;
101
1d14d3bf2465 Added change beerstyle, the fermentables table, and first part of calcFermentables to the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 92
diff changeset
135 QString bar_red = "QProgressBar::chunk {background: #FF0000;}";
1d14d3bf2465 Added change beerstyle, the fermentables table, and first part of calcFermentables to the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 92
diff changeset
136 QString bar_green = "QProgressBar::chunk {background: #008C00;}";
125
2e79e0975e58 Start hops table display. The calculated preboil_sg value is stored global in memory. Added calculations for IBU, hop flavour and aroma.
Michiel Broek <mbroek@mbse.eu>
parents: 123
diff changeset
137 QString bar_20 = "QProgressBar::chunk {background: #004D00;}";
117
84eda8ff3b60 The editrow variable replace by recipe->fermentables_current. The fermentable amount editor ignores fermentables added during bottling or kegging for percentage calculation. Added the fermentable percentage editor.
Michiel Broek <mbroek@mbse.eu>
parents: 116
diff changeset
138 int recno;
92
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
139 bool textIsChanged = false;
108
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
140 /*
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
141 * Variables for popup ingredients editing.
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
142 */
143
8414844c9f8b Added all yeast edit functions and the popup editor window.
Michiel Broek <mbroek@mbse.eu>
parents: 142
diff changeset
143 QComboBox *fselectEdit, *faddedEdit, *hselectEdit,*haddedEdit, *useatEdit, *mselectEdit, *yselectEdit;
145
fd4f0de86fd9 Implemented most parts of the mash editor.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
144 QLineEdit *fnameEdit, *fsupplierEdit, *hnameEdit, *horiginEdit, *mnameEdit, *ynameEdit, *ylaboratoryEdit, *yproduct_idEdit, *stepnameEdit;
143
8414844c9f8b Added all yeast edit functions and the popup editor window.
Michiel Broek <mbroek@mbse.eu>
parents: 142
diff changeset
145 QDoubleSpinBox *famountEdit, *pctEdit, *fmaxEdit, *hamountEdit, *ibuEdit, *mamountEdit, *yamountEdit;
145
fd4f0de86fd9 Implemented most parts of the mash editor.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
146 QDoubleSpinBox *steptempEdit, *endtempEdit, *steptimeEdit, *ramptimeEdit, *stepivolEdit, *stepitmpEdit;
132
9ede9c75cb54 Added miscs popup editor. No edit functions yet. Delete misc row added.
Michiel Broek <mbroek@mbse.eu>
parents: 131
diff changeset
147 QSpinBox *htimeEdit, *mtimeEdit;
143
8414844c9f8b Added all yeast edit functions and the popup editor window.
Michiel Broek <mbroek@mbse.eu>
parents: 142
diff changeset
148 QCheckBox *to100Edit, *finstockEdit, *hinstockEdit, *minstockEdit, *yinstockEdit;
152
58e4ce7dd217 Fixed vanishing mash profiles from some recipes. All ingnoreChanges flags removed and replaced by blocking signals. Update prompts and yeast amounts depending on the yeast form. Save water profile names fixed.
Michiel Broek <mbroek@mbse.eu>
parents: 150
diff changeset
149 QLabel *htimeLabel, *mtimeLabel, *mamountLabel, *yamountLabel, *ivolLabel, *itmpLabel;
92
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
150
123
41563800aa92 Show adjust_to100 in a function. Show percentages in fermentables table only before bottling or keggng. Implemented change add moment for fermentables.
Michiel Broek <mbroek@mbse.eu>
parents: 121
diff changeset
151 void to100Fermentables(int row);
110
224be4d9f8eb Fermentables are loaded in the main recipe record in a QList. The refresh table function does the sorting, on added moment (mash first), amount and finally color of the malt. Removed the old hidden table columns. Do all manipulation on the recipe record with QList arrays. The ferment_amount_changed() slot is complete. The whole recipe editor is going in the right direction.
Michiel Broek <mbroek@mbse.eu>
parents: 109
diff changeset
152 static bool ferment_sort_test(const Fermentables &D1, const Fermentables &D2);
125
2e79e0975e58 Start hops table display. The calculated preboil_sg value is stored global in memory. Added calculations for IBU, hop flavour and aroma.
Michiel Broek <mbroek@mbse.eu>
parents: 123
diff changeset
153 static bool hop_sort_test(const Hops &D1, const Hops &D2);
131
0115b97e8c39 Added global variables, C++ lovers will hate that. Added global acid data. Fixed several load and save errors in the json arrays in the recipe record. Added first part of the miscs table. The first part of the water tab has values.
Michiel Broek <mbroek@mbse.eu>
parents: 126
diff changeset
154 static bool misc_sort_test(const Miscs &D1, const Miscs &D2);
141
eea8a9e7e1f6 Upgrade yeasts fields if needed during recipe startup. Added yeast table.
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
155 static bool yeast_sort_test(const Yeasts &D1, const Yeasts &D2);
92
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
156 void WindowTitle();
171
6cd2d808d863 Implemented recipe lock setting.
Michiel Broek <mbroek@mbse.eu>
parents: 163
diff changeset
157 void setLocked(bool val);
136
17030224d919 Remove some water search debug messages. Added signals and slots for mash water pH and volume changes. Added manual pH adjust.
Michiel Broek <mbroek@mbse.eu>
parents: 135
diff changeset
158 void brewing_salt_sub(QString salt, double val);
133
08635b028dcf Load waters during recipe startup. Started calcWater() function. Load profile_setup record global. The print function uses the globals now too instead of loading from the database.
Michiel Broek <mbroek@mbse.eu>
parents: 132
diff changeset
159 void set_brewing_salt(QString salt, double val);
101
1d14d3bf2465 Added change beerstyle, the fermentables table, and first part of calcFermentables to the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 92
diff changeset
160 void calcFermentables();
150
fd568cc1dd0e Implemented the last widgets on the first tab and added the needed functions for them such as scaling the recipe. This is the last part of the recipe editor, now ready for testing.
Michiel Broek <mbroek@mbse.eu>
parents: 149
diff changeset
161 void calcFermentablesFromOG(double og);
125
2e79e0975e58 Start hops table display. The calculated preboil_sg value is stored global in memory. Added calculations for IBU, hop flavour and aroma.
Michiel Broek <mbroek@mbse.eu>
parents: 123
diff changeset
162 void calcIBUs();
150
fd568cc1dd0e Implemented the last widgets on the first tab and added the needed functions for them such as scaling the recipe. This is the last part of the recipe editor, now ready for testing.
Michiel Broek <mbroek@mbse.eu>
parents: 149
diff changeset
163 void adjustHops(double factor);
fd568cc1dd0e Implemented the last widgets on the first tab and added the needed functions for them such as scaling the recipe. This is the last part of the recipe editor, now ready for testing.
Michiel Broek <mbroek@mbse.eu>
parents: 149
diff changeset
164 void adjustMiscs(double factor);
135
e68b27ad8a40 Added dutch translations to the internal acids array. Added slot for calc_acid checkbox. Added more water calculations. The miscs amount fields now have two decimal digits. Show treated waters and good/bad indicators.
Michiel Broek <mbroek@mbse.eu>
parents: 134
diff changeset
165 double ZAlkalinity(double pHZ);
e68b27ad8a40 Added dutch translations to the internal acids array. Added slot for calc_acid checkbox. Added more water calculations. The miscs amount fields now have two decimal digits. Show treated waters and good/bad indicators.
Michiel Broek <mbroek@mbse.eu>
parents: 134
diff changeset
166 double ZRA(double pHZ);
e68b27ad8a40 Added dutch translations to the internal acids array. Added slot for calc_acid checkbox. Added more water calculations. The miscs amount fields now have two decimal digits. Show treated waters and good/bad indicators.
Michiel Broek <mbroek@mbse.eu>
parents: 134
diff changeset
167 double BufferCapacity(Fermentables F);
e68b27ad8a40 Added dutch translations to the internal acids array. Added slot for calc_acid checkbox. Added more water calculations. The miscs amount fields now have two decimal digits. Show treated waters and good/bad indicators.
Michiel Broek <mbroek@mbse.eu>
parents: 134
diff changeset
168 double AcidRequired(double ZpH, Fermentables F);
e68b27ad8a40 Added dutch translations to the internal acids array. Added slot for calc_acid checkbox. Added more water calculations. The miscs amount fields now have two decimal digits. Show treated waters and good/bad indicators.
Michiel Broek <mbroek@mbse.eu>
parents: 134
diff changeset
169 double ProtonDeficit(double pHZ);
e68b27ad8a40 Added dutch translations to the internal acids array. Added slot for calc_acid checkbox. Added more water calculations. The miscs amount fields now have two decimal digits. Show treated waters and good/bad indicators.
Michiel Broek <mbroek@mbse.eu>
parents: 134
diff changeset
170 double MashpH();
133
08635b028dcf Load waters during recipe startup. Started calcWater() function. Load profile_setup record global. The print function uses the globals now too instead of loading from the database.
Michiel Broek <mbroek@mbse.eu>
parents: 132
diff changeset
171 void calcWater();
162
19156b8b339f Added calcSparge.
Michiel Broek <mbroek@mbse.eu>
parents: 158
diff changeset
172 void calcSparge();
137
ffe8b2e9517b Added indicators for BUGU and SO4:Cl ratio. Force rounded values for changing brewing salts.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
173 double GetBUGU();
ffe8b2e9517b Added indicators for BUGU and SO4:Cl ratio. Force rounded values for changing brewing salts.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
174 double GetOptSO4Clratio();
142
1caa15a0eefc Added calcYeast(). Added show svg from calcFermentables() on the yeast tab. Fixed wrong data displayed in the yeast table. Show estimated needed dry yeast or starters.
Michiel Broek <mbroek@mbse.eu>
parents: 141
diff changeset
175 void calcYeast();
150
fd568cc1dd0e Implemented the last widgets on the first tab and added the needed functions for them such as scaling the recipe. This is the last part of the recipe editor, now ready for testing.
Michiel Broek <mbroek@mbse.eu>
parents: 149
diff changeset
176 void adjustYeasts(double factor);
148
ba25a566b100 Added calcMash(). Display total mash time.
Michiel Broek <mbroek@mbse.eu>
parents: 147
diff changeset
177 double infusionVol(double step_infused, double step_mashkg, double infuse_temp, double step_temp, double last_temp);
ba25a566b100 Added calcMash(). Display total mash time.
Michiel Broek <mbroek@mbse.eu>
parents: 147
diff changeset
178 double decoctionVol(double step_volume, double step_temp, double prev_temp);
ba25a566b100 Added calcMash(). Display total mash time.
Michiel Broek <mbroek@mbse.eu>
parents: 147
diff changeset
179 void calcMash();
150
fd568cc1dd0e Implemented the last widgets on the first tab and added the needed functions for them such as scaling the recipe. This is the last part of the recipe editor, now ready for testing.
Michiel Broek <mbroek@mbse.eu>
parents: 149
diff changeset
180 void adjustWaters(double factor);
253
d130385c1b0d Copy recipe to duplicated recipe added. Copy recipe to product added. Added popup with export choices.
Michiel Broek <mbroek@mbse.eu>
parents: 230
diff changeset
181 void exportBeerXML();
d130385c1b0d Copy recipe to duplicated recipe added. Copy recipe to product added. Added popup with export choices.
Michiel Broek <mbroek@mbse.eu>
parents: 230
diff changeset
182 void copyRecipe();
d130385c1b0d Copy recipe to duplicated recipe added. Copy recipe to product added. Added popup with export choices.
Michiel Broek <mbroek@mbse.eu>
parents: 230
diff changeset
183 void copyProduct();
d130385c1b0d Copy recipe to duplicated recipe added. Copy recipe to product added. Added popup with export choices.
Michiel Broek <mbroek@mbse.eu>
parents: 230
diff changeset
184 void toforumRecipe();
92
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
185 };
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
186
fb0bb9a2a7e1 Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
187 #endif

mercurial