319 QString w; |
319 QString w; |
320 |
320 |
321 qDebug() << "showRecipe" << record; |
321 qDebug() << "showRecipe" << record; |
322 |
322 |
323 const QStringList c_method({"Morey", "Mosher", "Daniels", "Halberstadt", "Naudts" }); |
323 const QStringList c_method({"Morey", "Mosher", "Daniels", "Halberstadt", "Naudts" }); |
324 const QStringList i_method({"Tinseth", "Rager", "Daniels" }); |
|
325 |
324 |
326 /* |
325 /* |
327 * If no recipe is "pre" selected, return. |
326 * If no recipe is "pre" selected, return. |
328 */ |
327 */ |
329 if (record < 1) { |
328 if (record < 1) { |
350 abvEdit->setValue(query.value(6).toInt()); |
349 abvEdit->setValue(query.value(6).toInt()); |
351 colorEdit->setValue(query.value(7).toInt()); |
350 colorEdit->setValue(query.value(7).toInt()); |
352 colorEdit->setStyleSheet(Utils::ebc_to_style(query.value(7).toInt())); |
351 colorEdit->setStyleSheet(Utils::ebc_to_style(query.value(7).toInt())); |
353 colormethodEdit->setText(c_method[query.value(8).toInt()]); |
352 colormethodEdit->setText(c_method[query.value(8).toInt()]); |
354 ibuEdit->setValue(query.value(9).toInt()); |
353 ibuEdit->setValue(query.value(9).toInt()); |
355 ibumethodEdit->setText(i_method[query.value(10).toInt()]); |
354 ibumethodEdit->setText(g_ibu_method[query.value(10).toInt()]); |
356 co2Edit->setValue(query.value(11).toDouble()); |
355 co2Edit->setValue(query.value(11).toDouble()); |
357 remarksEdit->setPlainText(query.value(12).toString()); |
356 remarksEdit->setPlainText(query.value(12).toString()); |
358 recipeBox->setTitle(query.value(14).toString() + " - " + query.value(13).toString()); |
357 recipeBox->setTitle(query.value(14).toString() + " - " + query.value(13).toString()); |
359 recipeBox->setEnabled(true); |
358 recipeBox->setEnabled(true); |
360 } else { |
359 } else { |