297 QString w; |
297 QString w; |
298 |
298 |
299 qDebug() << "showRecipe" << record; |
299 qDebug() << "showRecipe" << record; |
300 |
300 |
301 const QStringList c_method({"Morey", "Mosher", "Daniels", "Halberstadt", "Naudts" }); |
301 const QStringList c_method({"Morey", "Mosher", "Daniels", "Halberstadt", "Naudts" }); |
302 const QStringList i_method({"Tinseth", "Rager", "Daniels" }); |
|
303 |
302 |
304 /* |
303 /* |
305 * If no recipe is "pre" selected, return. |
304 * If no recipe is "pre" selected, return. |
306 */ |
305 */ |
307 if (record < 1) { |
306 if (record < 1) { |
328 abvEdit->setValue(query.value(6).toInt()); |
327 abvEdit->setValue(query.value(6).toInt()); |
329 colorEdit->setValue(query.value(7).toInt()); |
328 colorEdit->setValue(query.value(7).toInt()); |
330 colorEdit->setStyleSheet(Utils::ebc_to_style(query.value(7).toInt())); |
329 colorEdit->setStyleSheet(Utils::ebc_to_style(query.value(7).toInt())); |
331 colormethodEdit->setText(c_method[query.value(8).toInt()]); |
330 colormethodEdit->setText(c_method[query.value(8).toInt()]); |
332 ibuEdit->setValue(query.value(9).toInt()); |
331 ibuEdit->setValue(query.value(9).toInt()); |
333 ibumethodEdit->setText(i_method[query.value(10).toInt()]); |
332 ibumethodEdit->setText(g_ibu_method[query.value(10).toInt()]); |
334 co2Edit->setValue(query.value(11).toDouble()); |
333 co2Edit->setValue(query.value(11).toDouble()); |
335 remarksEdit->setPlainText(query.value(12).toString()); |
334 remarksEdit->setPlainText(query.value(12).toString()); |
336 recipeBox->setTitle(query.value(14).toString() + " - " + query.value(13).toString()); |
335 recipeBox->setTitle(query.value(14).toString() + " - " + query.value(13).toString()); |
337 recipeBox->setEnabled(true); |
336 recipeBox->setEnabled(true); |
338 } else { |
337 } else { |