src/EditEquipment.cpp

changeset 458
ac216a75ca9b
parent 423
8cb46020796a
child 462
1654ff5446c7
equal deleted inserted replaced
457:5028c1c4c526 458:ac216a75ca9b
49 ui->tun_weightEdit->setValue(query.value("tun_weight").toDouble()); 49 ui->tun_weightEdit->setValue(query.value("tun_weight").toDouble());
50 ui->tun_specific_heatEdit->setValue(query.value("tun_specific_heat").toDouble()); 50 ui->tun_specific_heatEdit->setValue(query.value("tun_specific_heat").toDouble());
51 ui->tun_materialEdit->setCurrentIndex(query.value("tun_material").toInt()); 51 ui->tun_materialEdit->setCurrentIndex(query.value("tun_material").toInt());
52 ui->tun_heightEdit->setValue(query.value("tun_height").toDouble() * 100.0); 52 ui->tun_heightEdit->setValue(query.value("tun_height").toDouble() * 100.0);
53 ui->top_up_waterEdit->setValue(query.value("top_up_water").toDouble()); 53 ui->top_up_waterEdit->setValue(query.value("top_up_water").toDouble());
54 ui->trub_lossEdit->setValue(query.value("trub_chiller_loss").toDouble()); 54 ui->trub_lossEdit->setValue(query.value("trub_loss").toDouble());
55 ui->evap_rateEdit->setValue(query.value("evap_rate").toDouble()); 55 ui->evap_rateEdit->setValue(query.value("evap_rate").toDouble());
56 ui->boil_timeEdit->setValue(query.value("boil_time").toDouble()); 56 ui->boil_timeEdit->setValue(query.value("boil_time").toDouble());
57 ui->calcboilEdit->setChecked(query.value("calc_boil_volume").toInt() ? true:false); 57 ui->calcboilEdit->setChecked(query.value("calc_boil_volume").toInt() ? true:false);
58 ui->top_up_kettleEdit->setValue(query.value("top_up_kettle").toDouble()); 58 ui->top_up_kettleEdit->setValue(query.value("top_up_kettle").toDouble());
59 ui->notesEdit->setPlainText(query.value("notes").toString()); 59 ui->notesEdit->setPlainText(query.value("notes").toString());
186 sql = "UPDATE"; 186 sql = "UPDATE";
187 } 187 }
188 sql.append(" inventory_equipments SET name=:name, boil_size=:boil_size, " 188 sql.append(" inventory_equipments SET name=:name, boil_size=:boil_size, "
189 "batch_size=:batch_size, tun_volume=:tun_volume, tun_weight=:tun_weight, " 189 "batch_size=:batch_size, tun_volume=:tun_volume, tun_weight=:tun_weight, "
190 "tun_specific_heat=:tun_specific_heat, tun_material=:tun_material, tun_height=:tun_height, " 190 "tun_specific_heat=:tun_specific_heat, tun_material=:tun_material, tun_height=:tun_height, "
191 "top_up_water=:top_up_water, trub_chiller_loss=:trub_loss, evap_rate=:evap_rate, " 191 "top_up_water=:top_up_water, trub_loss=:trub_loss, evap_rate=:evap_rate, "
192 "boil_time=:boil_time, calc_boil_volume=:calcboil, top_up_kettle=:top_up_kettle, " 192 "boil_time=:boil_time, calc_boil_volume=:calcboil, top_up_kettle=:top_up_kettle, "
193 "notes=:notes, lauter_deadspace=:lauter_deadspace, kettle_volume=:kettle_volume, " 193 "notes=:notes, lauter_deadspace=:lauter_deadspace, kettle_volume=:kettle_volume, "
194 "kettle_height=:kettle_height, mash_volume=:mash_volume, mash_max=:mash_max, " 194 "kettle_height=:kettle_height, mash_volume=:mash_volume, mash_max=:mash_max, "
195 "efficiency=:efficiency, chiller_type=:chiller_type, chiller_to79=:chiller_to79, " 195 "efficiency=:efficiency, chiller_type=:chiller_type, chiller_to79=:chiller_to79, "
196 "chiller_volume=:chiller_volume, chiller_lpm=:chiller_lpm, chiller_loss=:chiller_loss"); 196 "chiller_volume=:chiller_volume, chiller_lpm=:chiller_lpm, chiller_loss=:chiller_loss");
256 QSqlQuery query; 256 QSqlQuery query;
257 257
258 query.prepare("INSERT INTO inventory_equipments SET name=:name, boil_size=:boil_size, " 258 query.prepare("INSERT INTO inventory_equipments SET name=:name, boil_size=:boil_size, "
259 "batch_size=:batch_size, tun_volume=:tun_volume, tun_weight=:tun_weight, " 259 "batch_size=:batch_size, tun_volume=:tun_volume, tun_weight=:tun_weight, "
260 "tun_specific_heat=:tun_specific_heat, tun_material=:tun_material, tun_height=:tun_height, " 260 "tun_specific_heat=:tun_specific_heat, tun_material=:tun_material, tun_height=:tun_height, "
261 "top_up_water=:top_up_water, trub_chiller_loss=:trub_loss, evap_rate=:evap_rate, " 261 "top_up_water=:top_up_water, trub_loss=:trub_loss, evap_rate=:evap_rate, "
262 "boil_time=:boil_time, calc_boil_volume=:calcboil, top_up_kettle=:top_up_kettle, " 262 "boil_time=:boil_time, calc_boil_volume=:calcboil, top_up_kettle=:top_up_kettle, "
263 "notes=:notes, lauter_deadspace=:lauter_deadspace, kettle_volume=:kettle_volume, " 263 "notes=:notes, lauter_deadspace=:lauter_deadspace, kettle_volume=:kettle_volume, "
264 "kettle_height=:kettle_height, mash_volume=:mash_volume, mash_max=:mash_max, " 264 "kettle_height=:kettle_height, mash_volume=:mash_volume, mash_max=:mash_max, "
265 "efficiency=:efficiency, chiller_type=:chiller_type, chiller_to79=:chiller_to79, " 265 "efficiency=:efficiency, chiller_type=:chiller_type, chiller_to79=:chiller_to79, "
266 "chiller_volume=:chiller_volume, chiller_lpm=:chiller_lpm, chiller_loss=:chiller_loss, uuid=:uuid"); 266 "chiller_volume=:chiller_volume, chiller_lpm=:chiller_lpm, chiller_loss=:chiller_loss, uuid=:uuid");

mercurial