219 QList<Fermentables> fermentables; |
219 QList<Fermentables> fermentables; |
220 QList<Hops> hops; |
220 QList<Hops> hops; |
221 QList<Miscs> miscs; |
221 QList<Miscs> miscs; |
222 QList<Yeasts> yeasts; |
222 QList<Yeasts> yeasts; |
223 QList<Mashs> mashs; |
223 QList<Mashs> mashs; |
|
224 |
|
225 /* |
|
226 * These are not in the MySL database, but are global variables |
|
227 * that belong with the loaded recipe data and are present to |
|
228 * make things easier. |
|
229 */ |
|
230 int fermentables_records; ///< Total records |
|
231 int fermentables_current; ///< Current record, -1 is invalid. |
|
232 bool fermentables_use100; ///< Use percentages instead of amount |
|
233 int hops_records; |
|
234 int hops_current; |
|
235 int misc_records; |
|
236 int misc_current; |
|
237 int yeasts_records; |
|
238 int yeasts_current; |
|
239 int mashs_records; |
|
240 int mashs_current; |
224 }; |
241 }; |
225 |
242 |
226 |
243 |
227 namespace Ui { |
244 namespace Ui { |
228 class EditRecipe; |
245 class EditRecipe; |
278 bool use_to100 = false; |
295 bool use_to100 = false; |
279 Recipe *recipe; |
296 Recipe *recipe; |
280 /* |
297 /* |
281 * Variables for popup ingredients editing. |
298 * Variables for popup ingredients editing. |
282 */ |
299 */ |
283 QJsonDocument fermentables, hops, miscs, yeasts, mashs; |
300 QJsonDocument fermentables, hops, miscs, yeasts; |
284 QJsonObject work, backup; |
301 QJsonObject work, backup; |
285 QComboBox *selectEdit, *addedEdit; |
302 QComboBox *selectEdit, *addedEdit; |
286 QLineEdit *nameEdit, *supplierEdit; |
303 QLineEdit *nameEdit, *supplierEdit; |
287 QDoubleSpinBox *amountEdit, *pctEdit, *maxEdit; |
304 QDoubleSpinBox *amountEdit, *pctEdit, *maxEdit; |
288 QCheckBox *to100Edit, *instockEdit; |
305 QCheckBox *to100Edit, *instockEdit; |