src/EditRecipeExport.cpp

changeset 445
3dbebcd56406
parent 423
8cb46020796a
child 458
ac216a75ca9b
equal deleted inserted replaced
444:4f626d0bb4d4 445:3dbebcd56406
283 p->name = recipe->name + QString(" [duplicate]"); 283 p->name = recipe->name + QString(" [duplicate]");
284 p->code = ""; 284 p->code = "";
285 p->birth = QDate::currentDate(); 285 p->birth = QDate::currentDate();
286 p->stage = p->inventory_reduced = PROD_STAGE_PLAN; 286 p->stage = p->inventory_reduced = PROD_STAGE_PLAN;
287 p->notes = recipe->notes; 287 p->notes = recipe->notes;
288 // p->log_brew = p->log_fermentation = p->log_ispindel = p->log_co2pressure = p->locked = false; 288 p->log_brew = p->log_fermentation = p->log_ispindel = p->log_co2pressure = p->locked = false;
289 289
290 p->st_name = recipe->st_name; 290 p->st_name = recipe->st_name;
291 p->st_letter = recipe->st_letter; 291 p->st_letter = recipe->st_letter;
292 p->st_guide = recipe->st_guide; 292 p->st_guide = recipe->st_guide;
293 p->st_category = recipe->st_category; 293 p->st_category = recipe->st_category;
307 p->st_abv_max = recipe->st_abv_max; 307 p->st_abv_max = recipe->st_abv_max;
308 308
309 p->eq_name = QString("Not yet set"); 309 p->eq_name = QString("Not yet set");
310 p->eq_notes = QString(""); 310 p->eq_notes = QString("");
311 p->eq_tun_specific_heat = 0.11; 311 p->eq_tun_specific_heat = 0.11;
312 // p->eq_tun_material = 0; 312 p->eq_tun_material = 0;
313 p->eq_tun_volume = p->eq_tun_height = 20; 313 p->eq_tun_volume = p->eq_tun_height = 20;
314 p->eq_tun_weight = 2; 314 p->eq_tun_weight = 2;
315 // p->eq_top_up_water = 0; 315 p->eq_top_up_water = 0;
316 p->eq_trub_chiller_loss = 0.5; 316 p->eq_trub_chiller_loss = 0.5;
317 p->eq_evap_rate = 1.8; 317 p->eq_evap_rate = 1.8;
318 // p->eq_calc_boil_volume = true; 318 p->eq_top_up_kettle = 0;
319 // p->eq_top_up_kettle = 0;
320 // p->eq_hop_utilization = 100;
321 // p->eq_lauter_volume = p->eq_lauter_height
322 p->eq_kettle_volume = p->eq_kettle_height = p->eq_mash_volume = 20; 319 p->eq_kettle_volume = p->eq_kettle_height = p->eq_mash_volume = 20;
323 p->eq_lauter_deadspace = 0.5; 320 p->eq_lauter_deadspace = 0.5;
324 p->eq_mash_max = 6; 321 p->eq_mash_max = 6;
325 p->eq_efficiency = p->efficiency = recipe->efficiency; 322 p->eq_efficiency = p->efficiency = recipe->efficiency;
326 p->eq_batch_size = p->batch_size = recipe->batch_size; 323 p->eq_batch_size = p->batch_size = recipe->batch_size;
429 p->fermentables = recipe->fermentables; 426 p->fermentables = recipe->fermentables;
430 p->hops = recipe->hops; 427 p->hops = recipe->hops;
431 p->miscs = recipe->miscs; 428 p->miscs = recipe->miscs;
432 p->yeasts = recipe->yeasts; 429 p->yeasts = recipe->yeasts;
433 p->mashs = recipe->mashs; 430 p->mashs = recipe->mashs;
431 /*
432 * Reset measurement fields.
433 */
434 for (int i = 0; i < p->mashs.size(); i++) {
435 p->mashs[i].step_ph = 0;
436 p->mashs[i].step_sg = 0;
437 }
434 438
435 if (DB_product::save(p, this)) { 439 if (DB_product::save(p, this)) {
436 QMessageBox::information(this, tr("Copy Recipe"), tr("Copy Recipe to Product ready.")); 440 QMessageBox::information(this, tr("Copy Recipe"), tr("Copy Recipe to Product ready."));
437 } else { 441 } else {
438 QMessageBox::warning(this, tr("Copy Recipe"), tr("Copy Recipe to Product error.")); 442 QMessageBox::warning(this, tr("Copy Recipe"), tr("Copy Recipe to Product error."));

mercurial