src/EditRecipe.h

Fri, 22 Apr 2022 13:46:59 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Fri, 22 Apr 2022 13:46:59 +0200
changeset 152
58e4ce7dd217
parent 150
fd568cc1dd0e
child 154
1af9f7b7f317
permissions
-rw-r--r--

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.

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>
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
11 #include <QLineEdit>
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
12 #include <QDialogButtonBox>
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
13 #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
14 #include <QLabel>
108
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
15
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
16
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
17 /*
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
18 * Fermentables, Hops, Miscs, Yeasts and Mashs are stored in the
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
19 * database in json arrays. These are the QList structures.
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
20 */
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
21 struct Fermentables
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
22 {
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
23 QString f_name;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
24 QString f_origin;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
25 QString f_supplier;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
26 double f_amount;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
27 double f_cost;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
28 int f_type;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
29 double f_yield;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
30 double f_color;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
31 double f_coarse_fine_diff;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
32 double f_moisture;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
33 double f_diastatic_power;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
34 double f_protein;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
35 double f_dissolved_protein;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
36 double f_max_in_batch;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
37 int f_graintype;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
38 int f_added;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
39 bool f_recommend_mash;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
40 bool f_add_after_boil;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
41 bool f_adjust_to_total_100;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
42 double f_percentage;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
43 double f_di_ph;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
44 double f_acid_to_ph_57;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
45 };
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
46
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
47
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
48 struct Hops
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
49 {
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
50 QString h_name;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
51 QString h_origin;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
52 double h_amount;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
53 double h_cost;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
54 int h_type;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
55 int h_form;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
56 int h_useat;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
57 double h_time;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
58 double h_alpha;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
59 double h_beta;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
60 double h_hsi;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
61 double h_humulene;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
62 double h_caryophyllene;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
63 double h_cohumulone;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
64 double h_myrcene;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
65 double h_total_oil;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
66 };
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
67
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
68
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
69 struct Miscs
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
70 {
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
71 QString m_name;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
72 double m_amount;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
73 int m_type;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
74 int m_use_use;
112
9e0dfa78f349 Load miscs in QList.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
75 double m_time;
108
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
76 bool m_amount_is_weight;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
77 double m_cost;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
78 };
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
79
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
80
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
81 struct Yeasts
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
82 {
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
83 QString y_name;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
84 QString y_laboratory;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
85 QString y_product_id;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
86 double y_amount;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
87 int y_type;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
88 int y_form;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
89 double y_min_temperature;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
90 double y_max_temperature;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
91 int y_flocculation;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
92 double y_attenuation;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
93 double y_cells;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
94 double y_tolerance;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
95 double y_inventory;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
96 int y_use;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
97 bool y_sta1;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
98 bool y_bacteria;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
99 bool y_harvest_top;
111
04f5a7c5a1dc Load yeasts in QList.
Michiel Broek <mbroek@mbse.eu>
parents: 110
diff changeset
100 int y_harvest_time;
108
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
101 double y_pitch_temperature;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
102 bool y_pofpos;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
103 int y_zymocide;
111
04f5a7c5a1dc Load yeasts in QList.
Michiel Broek <mbroek@mbse.eu>
parents: 110
diff changeset
104 int y_gr_hl_lo;
108
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
105 double y_sg_lo;
111
04f5a7c5a1dc Load yeasts in QList.
Michiel Broek <mbroek@mbse.eu>
parents: 110
diff changeset
106 int y_gr_hl_hi;
108
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
107 double y_sg_hi;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
108 double y_cost;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
109 };
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
110
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
111
108
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
112 struct Mashs
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
113 {
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
114 QString step_name;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
115 int step_type;
144
c4b107bf153a First setup of the mash tab with the table.
Michiel Broek <mbroek@mbse.eu>
parents: 143
diff changeset
116 double step_volume; ///< The water volume upto this step.
c4b107bf153a First setup of the mash tab with the table.
Michiel Broek <mbroek@mbse.eu>
parents: 143
diff changeset
117 double step_infuse_amount; ///< Infuse/decoction volume this step.
c4b107bf153a First setup of the mash tab with the table.
Michiel Broek <mbroek@mbse.eu>
parents: 143
diff changeset
118 double step_infuse_temp; ///< Infuse/decoction temperature.
c4b107bf153a First setup of the mash tab with the table.
Michiel Broek <mbroek@mbse.eu>
parents: 143
diff changeset
119 double step_temp; ///< Start tmperature this step.
c4b107bf153a First setup of the mash tab with the table.
Michiel Broek <mbroek@mbse.eu>
parents: 143
diff changeset
120 double step_time; ///< Step rest time.
c4b107bf153a First setup of the mash tab with the table.
Michiel Broek <mbroek@mbse.eu>
parents: 143
diff changeset
121 double ramp_time; ///< Estimated ramp time to this step.
c4b107bf153a First setup of the mash tab with the table.
Michiel Broek <mbroek@mbse.eu>
parents: 143
diff changeset
122 double end_temp; ///< End temperature this step.
c4b107bf153a First setup of the mash tab with the table.
Michiel Broek <mbroek@mbse.eu>
parents: 143
diff changeset
123 double step_wg_ratio; ///< Current water/grain ratio.
108
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
124 };
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
125
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
126
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
127 /*
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
128 * The main recipe record stored in the database.
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
129 */
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
130 struct Recipe
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
131 {
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
132 int record;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
133 QString uuid;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
134 bool locked;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
135 QString st_name;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
136 QString st_letter;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
137 QString st_guide;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
138 QString st_category;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
139 int st_category_number;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
140 int st_type;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
141 double st_og_min;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
142 double st_og_max;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
143 double st_fg_min;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
144 double st_fg_max;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
145 double st_ibu_min;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
146 double st_ibu_max;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
147 double st_color_min;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
148 double st_color_max;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
149 double st_carb_min;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
150 double st_carb_max;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
151 double st_abv_min;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
152 double st_abv_max;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
153
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
154 QString name;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
155 QString notes;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
156 int type;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
157 double batch_size;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
158 double boil_size;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
159 double boil_time;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
160 double efficiency;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
161 double est_og;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
162 double est_fg;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
163 double est_abv;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
164 double est_color;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
165 int color_method;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
166 double est_ibu;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
167 int ibu_method;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
168 double est_carb;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
169
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
170 double sparge_temp;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
171 double sparge_ph;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
172 double sparge_volume;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
173 int sparge_source;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
174 int sparge_acid_type;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
175 double sparge_acid_perc;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
176 double sparge_acid_amount;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
177 double mash_ph;
109
1ce50e72a6b1 Completed read MySQL recipe record. Mash schedule moved to recipe QList.
Michiel Broek <mbroek@mbse.eu>
parents: 108
diff changeset
178 QString mash_name;
108
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
179 bool calc_acid;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
180
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
181 QString w1_name; ///< Water source 1
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
182 double w1_amount;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
183 double w1_calcium;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
184 double w1_sulfate;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
185 double w1_chloride;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
186 double w1_sodium;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
187 double w1_magnesium;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
188 double w1_total_alkalinity;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
189 double w1_ph;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
190 double w1_cost;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
191 QString w2_name; ///< Water source 2
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
192 double w2_amount;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
193 double w2_calcium;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
194 double w2_sulfate;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
195 double w2_chloride;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
196 double w2_sodium;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
197 double w2_magnesium;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
198 double w2_total_alkalinity;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
199 double w2_ph;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
200 double w2_cost;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
201 double wg_amount; ///< Mixed water
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
202 double wg_calcium;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
203 double wg_sulfate;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
204 double wg_chloride;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
205 double wg_sodium;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
206 double wg_magnesium;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
207 double wg_total_alkalinity;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
208 double wg_ph;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
209 double wb_calcium; ///< Treated water
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
210 double wb_sulfate;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
211 double wb_chloride;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
212 double wb_sodium;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
213 double wb_magnesium;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
214 double wb_total_alkalinity;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
215 double wb_ph;
115
9c90a00fd9dd Completed recipe save record. Recipe name and notes can be edited.
Michiel Broek <mbroek@mbse.eu>
parents: 113
diff changeset
216 int wa_acid_name;
108
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
217 double wa_acid_perc;
115
9c90a00fd9dd Completed recipe save record. Recipe name and notes can be edited.
Michiel Broek <mbroek@mbse.eu>
parents: 113
diff changeset
218 int wa_base_name;
108
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
219
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
220 QList<Fermentables> fermentables;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
221 QList<Hops> hops;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
222 QList<Miscs> miscs;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
223 QList<Yeasts> yeasts;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
224 QList<Mashs> mashs;
109
1ce50e72a6b1 Completed read MySQL recipe record. Mash schedule moved to recipe QList.
Michiel Broek <mbroek@mbse.eu>
parents: 108
diff changeset
225
1ce50e72a6b1 Completed read MySQL recipe record. Mash schedule moved to recipe QList.
Michiel Broek <mbroek@mbse.eu>
parents: 108
diff changeset
226 /*
1ce50e72a6b1 Completed read MySQL recipe record. Mash schedule moved to recipe QList.
Michiel Broek <mbroek@mbse.eu>
parents: 108
diff changeset
227 * These are not in the MySL database, but are global variables
1ce50e72a6b1 Completed read MySQL recipe record. Mash schedule moved to recipe QList.
Michiel Broek <mbroek@mbse.eu>
parents: 108
diff changeset
228 * that belong with the loaded recipe data and are present to
1ce50e72a6b1 Completed read MySQL recipe record. Mash schedule moved to recipe QList.
Michiel Broek <mbroek@mbse.eu>
parents: 108
diff changeset
229 * make things easier.
1ce50e72a6b1 Completed read MySQL recipe record. Mash schedule moved to recipe QList.
Michiel Broek <mbroek@mbse.eu>
parents: 108
diff changeset
230 */
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
231 int fermentables_row; ///< Current row, -1 is invalid.
109
1ce50e72a6b1 Completed read MySQL recipe record. Mash schedule moved to recipe QList.
Michiel Broek <mbroek@mbse.eu>
parents: 108
diff changeset
232 bool fermentables_use100; ///< Use percentages instead of amount
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
233 int hops_row;
132
9ede9c75cb54 Added miscs popup editor. No edit functions yet. Delete misc row added.
Michiel Broek <mbroek@mbse.eu>
parents: 131
diff changeset
234 int miscs_row;
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
235 int yeasts_row;
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
236 int mashs_row;
148
ba25a566b100 Added calcMash(). Display total mash time.
Michiel Broek <mbroek@mbse.eu>
parents: 147
diff changeset
237 double mashs_kg; ///< Kg fermentables in the mash.
ba25a566b100 Added calcMash(). Display total mash time.
Michiel Broek <mbroek@mbse.eu>
parents: 147
diff changeset
238 int mashs_time; ///< Total mash time.
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
239 double preboil_sg;
108
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
240 };
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
241
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
242
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
243 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
244 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
245 }
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
246
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
247 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
248 {
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
249 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
250
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
251 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
252 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
253
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
254 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
255 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
256 ~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
257
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
258 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
259 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
260 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
261 void on_deleteButton_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
262 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
263 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
264 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
265 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
266 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
267 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
268 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
269 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
270 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
271 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
272 void brew_type_changed(int 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
273 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
274 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
275 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
276 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
277 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
278 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
279 void refreshAll();
108
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
280 void ferment_amount_changed(double val);
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
281 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
282 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
283 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
284 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
285 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
286 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
287 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
288 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
289 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
290 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
291 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
292 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
293 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
294 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
295 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
296 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
297 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
298 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
299 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
300 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
301 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
302 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
303 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
304 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
305 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
306 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
307 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
308 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
309 void addYeastRow_clicked();
eea8a9e7e1f6 Upgrade yeasts fields if needed during recipe startup. Added yeast table.
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
310 void deleteYeastRow_clicked();
eea8a9e7e1f6 Upgrade yeasts fields if needed during recipe startup. Added yeast table.
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
311 void editYeastRow_clicked();
144
c4b107bf153a First setup of the mash tab with the table.
Michiel Broek <mbroek@mbse.eu>
parents: 143
diff changeset
312 void addMashRow_clicked();
c4b107bf153a First setup of the mash tab with the table.
Michiel Broek <mbroek@mbse.eu>
parents: 143
diff changeset
313 void deleteMashRow_clicked();
c4b107bf153a First setup of the mash tab with the table.
Michiel Broek <mbroek@mbse.eu>
parents: 143
diff changeset
314 void editMashRow_clicked();
c4b107bf153a First setup of the mash tab with the table.
Michiel Broek <mbroek@mbse.eu>
parents: 143
diff changeset
315 void upMashRow_clicked();
c4b107bf153a First setup of the mash tab with the table.
Michiel Broek <mbroek@mbse.eu>
parents: 143
diff changeset
316 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
317
149
d73719fa2ebb Implemented choose main and dillution waters. Implement change dillution water volume.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
318 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
319 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
320 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
321 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
322 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
323 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
324 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
325 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
326 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
327 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
328 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
329 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
330 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
331 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
332 void mw_type_changed(int val);
145
fd4f0de86fd9 Implemented most parts of the mash editor.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
333 void step_name_changed(QString val);
fd4f0de86fd9 Implemented most parts of the mash editor.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
334 void step_type_changed(int val);
fd4f0de86fd9 Implemented most parts of the mash editor.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
335 void step_temp_changed(double val);
fd4f0de86fd9 Implemented most parts of the mash editor.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
336 void end_temp_changed(double val);
fd4f0de86fd9 Implemented most parts of the mash editor.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
337 void step_time_changed(double val);
fd4f0de86fd9 Implemented most parts of the mash editor.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
338 void ramp_time_changed(double val);
fd4f0de86fd9 Implemented most parts of the mash editor.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
339 void infuse_changed(double val);
147
af1386a6ece7 Added mash table replace
Michiel Broek <mbroek@mbse.eu>
parents: 145
diff changeset
340 void mash_select_changed(int 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
341
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
342 /* 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
343 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
344 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
345 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
346 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
347 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
348 void hop_Aroma_valueChanged(int value);
102
b017001850df Almost finished calcFermentables()
Michiel Broek <mbroek@mbse.eu>
parents: 101
diff changeset
349
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
350 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
351 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
352 QStringList s_types = { tr("Lager"), tr("Ale"), tr("Mead"), tr("Wheat"), tr("Mixed"), tr("Cider") };
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
353 QStringList f_types = { tr("Grain"), tr("Sugar"), tr("Extract"), tr("Dry extract"), tr("Adjunct") };
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
354 QStringList f_graintypes = { tr("Base"), tr("Roast"), tr("Crystal"), tr("Kilned"), tr("Sour Malt"), tr("Special"), tr("No malt")};
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
355 QStringList f_added = { tr("Mash"), tr("Boil"), tr("Fermentation"), tr("Lagering"), tr("Bottle"), tr("Kegs") };
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
356 QStringList h_types = { tr("Bittering"), tr("Aroma"), tr("Both") };
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
357 QStringList h_forms = { tr("Pellet"), tr("Plug"), tr("Leaf"), tr("Leaf wet"), tr("Cryo") };
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
358 QStringList h_useat = { tr("Mash"), tr("First wort"), tr("Boil"), tr("Aroma"), tr("Whirlpool"), tr("Dry hop") };
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
359 QStringList m_types = { tr("Spice"), tr("Herb"), tr("Flavor"), tr("Fining"), tr("Water agent"), tr("Yeast nutrient"), tr("Other") };
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
360 QStringList m_uses = { tr("Starter"), tr("Mash"), tr("Boil"), tr("Primary"), tr("Secondary"), tr("Bottling") };
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
361 //QStringList y_types = { tr("Lager"), tr("Ale"), tr("Wheat"), tr("Wine"), tr("Champagne"), tr("Brett"), tr("Kveik"), tr("Hybrid") };
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
362 QStringList y_forms = { tr("Liquid"), tr("Dry"), tr("Slant"), tr("Culture"), tr("Frozen"), tr("Bottle"), tr("Dried") };
141
eea8a9e7e1f6 Upgrade yeasts fields if needed during recipe startup. Added yeast table.
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
363 QStringList y_use = { tr("Primary"), tr("Secondary"), tr("Tertiary"), tr("Bottle") };
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
364 QStringList starters = { tr("Stirred"), tr("Shaken"), tr("Simple") };
144
c4b107bf153a First setup of the mash tab with the table.
Michiel Broek <mbroek@mbse.eu>
parents: 143
diff changeset
365 QStringList step_types = { tr("Infusion"), tr("Temperature"), tr("Decoction") };
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
366 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
367 QString bar_orange = "QProgressBar::chunk {background: #EB7331;}";
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
368 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
369 QString bar_20 = "QProgressBar::chunk {background: #004D00;}";
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
370 QString bar_40 = "QProgressBar::chunk {background: #008C00;}";
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
371 QString bar_60 = "QProgressBar::chunk {background: #00BF00;}";
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
372 QString bar_80 = "QProgressBar::chunk {background: #00FF00;}";
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
373 QString bar_100 = "QProgressBar::chunk {background: #80FF80;}";
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
374 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
375 bool textIsChanged = false;
108
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
376 Recipe *recipe;
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
377 /*
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
378 * Variables for popup ingredients editing.
ecfcbee4a9b2 Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents: 107
diff changeset
379 */
143
8414844c9f8b Added all yeast edit functions and the popup editor window.
Michiel Broek <mbroek@mbse.eu>
parents: 142
diff changeset
380 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
381 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
382 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
383 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
384 QSpinBox *htimeEdit, *mtimeEdit;
143
8414844c9f8b Added all yeast edit functions and the popup editor window.
Michiel Broek <mbroek@mbse.eu>
parents: 142
diff changeset
385 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
386 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
387
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
388 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
389 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
390 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
391 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
392 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
393 void WindowTitle();
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
394 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
395 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
396 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
397 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
398 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
399 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
400 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
401 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
402 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
403 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
404 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
405 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
406 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
407 void calcWater();
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
408 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
409 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
410 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
411 void adjustYeasts(double factor);
148
ba25a566b100 Added calcMash(). Display total mash time.
Michiel Broek <mbroek@mbse.eu>
parents: 147
diff changeset
412 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
413 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
414 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
415 void adjustWaters(double factor);
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
416 };
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
417
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
418 #endif

mercurial