328 QString w; |
328 QString w; |
329 |
329 |
330 qDebug() << "showRecipe" << record; |
330 qDebug() << "showRecipe" << record; |
331 |
331 |
332 const QStringList c_method({"Morey", "Mosher", "Daniels", "Halberstadt", "Naudts" }); |
332 const QStringList c_method({"Morey", "Mosher", "Daniels", "Halberstadt", "Naudts" }); |
333 const QStringList i_method({"Tinseth", "Rager", "Daniels" }); |
|
334 |
333 |
335 /* |
334 /* |
336 * If no recipe is "pre" selected, return. |
335 * If no recipe is "pre" selected, return. |
337 */ |
336 */ |
338 if (record < 1) { |
337 if (record < 1) { |
359 abvEdit->setValue(query.value(6).toInt()); |
358 abvEdit->setValue(query.value(6).toInt()); |
360 colorEdit->setValue(query.value(7).toInt()); |
359 colorEdit->setValue(query.value(7).toInt()); |
361 colorEdit->setStyleSheet(Utils::ebc_to_style(query.value(7).toInt())); |
360 colorEdit->setStyleSheet(Utils::ebc_to_style(query.value(7).toInt())); |
362 colormethodEdit->setText(c_method[query.value(8).toInt()]); |
361 colormethodEdit->setText(c_method[query.value(8).toInt()]); |
363 ibuEdit->setValue(query.value(9).toInt()); |
362 ibuEdit->setValue(query.value(9).toInt()); |
364 ibumethodEdit->setText(i_method[query.value(10).toInt()]); |
363 ibumethodEdit->setText(g_ibu_method[query.value(10).toInt()]); |
365 co2Edit->setValue(query.value(11).toDouble()); |
364 co2Edit->setValue(query.value(11).toDouble()); |
366 remarksEdit->setPlainText(query.value(12).toString()); |
365 remarksEdit->setPlainText(query.value(12).toString()); |
367 recipeBox->setTitle(query.value(13).toString()); |
366 recipeBox->setTitle(query.value(13).toString()); |
368 recipeBox->setEnabled(true); |
367 recipeBox->setEnabled(true); |
369 } else { |
368 } else { |