Mon, 11 Apr 2022 20:45:22 +0200
Blocked hop table edit. Implemented add and delete hop rows. Started the ui of the water tab.
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 | 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 | 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 | 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 | 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; |
ecfcbee4a9b2
Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents:
107
diff
changeset
|
116 | double step_volume; // May not be present |
ecfcbee4a9b2
Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents:
107
diff
changeset
|
117 | double step_infuse_amount; // May not be present |
ecfcbee4a9b2
Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents:
107
diff
changeset
|
118 | double step_infuse_temp; // May not be present |
ecfcbee4a9b2
Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents:
107
diff
changeset
|
119 | double step_temp; |
ecfcbee4a9b2
Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents:
107
diff
changeset
|
120 | double step_time; |
ecfcbee4a9b2
Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents:
107
diff
changeset
|
121 | double ramp_time; |
109
1ce50e72a6b1
Completed read MySQL recipe record. Mash schedule moved to recipe QList.
Michiel Broek <mbroek@mbse.eu>
parents:
108
diff
changeset
|
122 | double end_temp; |
108
ecfcbee4a9b2
Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents:
107
diff
changeset
|
123 | double step_wg_ratio; // May not be present |
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; |
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
|
234 | int misc_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
|
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; |
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
|
237 | double preboil_sg; |
108
ecfcbee4a9b2
Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents:
107
diff
changeset
|
238 | }; |
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
|
239 | |
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
|
240 | |
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
|
241 | 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
|
242 | 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
|
243 | } |
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 | |
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 | 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
|
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 | 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
|
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 | 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
|
250 | 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
|
251 | |
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 | 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
|
253 | 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
|
254 | ~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
|
255 | |
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 | 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
|
257 | 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
|
258 | 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
|
259 | 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
|
260 | 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
|
261 | 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
|
262 | void notes_changed(); |
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
|
263 | void style_changed(); |
102
b017001850df
Almost finished calcFermentables()
Michiel Broek <mbroek@mbse.eu>
parents:
101
diff
changeset
|
264 | void colormethod_changed(); |
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
|
265 | 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
|
266 | 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
|
267 | 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
|
268 | 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
|
269 | void refreshMashs(); |
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
|
270 | void refreshAll(); |
108
ecfcbee4a9b2
Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents:
107
diff
changeset
|
271 | void ferment_amount_changed(double val); |
ecfcbee4a9b2
Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents:
107
diff
changeset
|
272 | 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
|
273 | 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
|
274 | 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
|
275 | 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
|
276 | 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
|
277 | 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
|
278 | 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
|
279 | 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
|
280 | 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
|
281 | void hop_useat_changed(int val); |
121 | 282 | void on_addFermentRow_clicked(); |
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
|
283 | void on_deleteFermentRow_clicked(); |
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
|
284 | void on_editFermentRow_clicked(); |
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
|
285 | void on_addHopRow_clicked(); |
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 on_deleteHopRow_clicked(); |
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 on_editHopRow_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
|
288 | |
102
b017001850df
Almost finished calcFermentables()
Michiel Broek <mbroek@mbse.eu>
parents:
101
diff
changeset
|
289 | void on_perc_mash_valueChanged(int value); |
b017001850df
Almost finished calcFermentables()
Michiel Broek <mbroek@mbse.eu>
parents:
101
diff
changeset
|
290 | void on_perc_sugars_valueChanged(int value); |
b017001850df
Almost finished calcFermentables()
Michiel Broek <mbroek@mbse.eu>
parents:
101
diff
changeset
|
291 | void on_perc_cara_valueChanged(int value); |
b017001850df
Almost finished calcFermentables()
Michiel Broek <mbroek@mbse.eu>
parents:
101
diff
changeset
|
292 | void on_lintner_valueChanged(int value); |
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
|
293 | void on_Flavour_valueChanged(int value); |
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
|
294 | void on_Aroma_valueChanged(int value); |
102
b017001850df
Almost finished calcFermentables()
Michiel Broek <mbroek@mbse.eu>
parents:
101
diff
changeset
|
295 | |
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
|
296 | 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
|
297 | 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
|
298 | 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
|
299 | 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
|
300 | 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
|
301 | 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
|
302 | 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
|
303 | 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
|
304 | QStringList h_useat = { tr("Mash"), tr("First wort"), tr("Boil"), tr("Aroma"), tr("Whirlpool"), tr("Dry hop") }; |
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
|
305 | 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
|
306 | 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
|
307 | 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
|
308 | 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
|
309 | 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
|
310 | 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
|
311 | 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
|
312 | 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
|
313 | 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
|
314 | bool textIsChanged = false; |
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
|
315 | bool ignoreChanges = false; |
108
ecfcbee4a9b2
Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents:
107
diff
changeset
|
316 | Recipe *recipe; |
ecfcbee4a9b2
Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents:
107
diff
changeset
|
317 | /* |
ecfcbee4a9b2
Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents:
107
diff
changeset
|
318 | * Variables for popup ingredients editing. |
ecfcbee4a9b2
Redesign the database interface for the recipe editor.
Michiel Broek <mbroek@mbse.eu>
parents:
107
diff
changeset
|
319 | */ |
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
|
320 | QComboBox *fselectEdit, *faddedEdit, *hselectEdit,*haddedEdit, *useatEdit; |
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
|
321 | QLineEdit *fnameEdit, *fsupplierEdit, *hnameEdit, *horiginEdit; |
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
|
322 | QDoubleSpinBox *famountEdit, *pctEdit, *fmaxEdit, *hamountEdit, *ibuEdit; |
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
|
323 | QSpinBox *htimeEdit; |
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
|
324 | QCheckBox *to100Edit, *finstockEdit, *hinstockEdit; |
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
|
325 | QLabel *htimeLabel; |
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
|
326 | |
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
|
327 | 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
|
328 | 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
|
329 | static bool hop_sort_test(const Hops &D1, const Hops &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
|
330 | void WindowTitle(); |
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
|
331 | void calcFermentables(); |
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
|
332 | void calcIBUs(); |
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
|
333 | }; |
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
|
334 | |
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
|
335 | #endif |