1533 |
1533 |
1534 double factor = 1.0 / product->divide_factor; |
1534 double factor = 1.0 / product->divide_factor; |
1535 double mashwater = 0; |
1535 double mashwater = 0; |
1536 int numsalts = 0; |
1536 int numsalts = 0; |
1537 |
1537 |
1538 qInfo() << "Print checklist" << product->record; |
1538 qInfo() << "Print checklist" << product->record << "factor" << factor << product->divide_factor; |
1539 printHeader(&painter); |
1539 printHeader(&painter); |
1540 y = 120; |
1540 y = 120; |
1541 |
1541 |
1542 /* First item, a yeast starter if needed, days before brewday. */ |
1542 /* First item, a yeast starter if needed, days before brewday. */ |
1543 if (product->starter_enable && product->prop_volume[0]) { |
1543 if (product->starter_enable && product->prop_volume[0]) { |
1909 .arg(product->fermentables.at(i).f_name)); |
1909 .arg(product->fermentables.at(i).f_name)); |
1910 } |
1910 } |
1911 for (int i = 0; i < product->miscs.size(); i++) { |
1911 for (int i = 0; i < product->miscs.size(); i++) { |
1912 if (product->miscs.at(i).m_use_use == MISC_USES_PRIMARY) { |
1912 if (product->miscs.at(i).m_use_use == MISC_USES_PRIMARY) { |
1913 QString unit = (product->miscs.at(i).m_amount_is_weight) ? "gr":"ml"; |
1913 QString unit = (product->miscs.at(i).m_amount_is_weight) ? "gr":"ml"; |
1914 checkLine(&painter, &y, QString(tr("Add %1 %2 `%3` on day 3 or 4")).arg(product->miscs.at(i).m_amount * factor, 1, 'f', 3) |
1914 checkLine(&painter, &y, QString(tr("Add %1 %2 `%3` on day 3 or 4")).arg(product->miscs.at(i).m_amount * 1000 * factor, 1, 'f', 3) |
1915 .arg(unit).arg(product->miscs.at(i).m_name)); |
1915 .arg(unit).arg(product->miscs.at(i).m_name)); |
1916 } |
1916 } |
1917 } |
1917 } |
1918 } |
1918 } |
1919 if (checkSplit(&painter, &y, 4)) |
1919 if (checkSplit(&painter, &y, 4)) |
2010 } |
2010 } |
2011 } |
2011 } |
2012 for (int i = 0; i < product->miscs.size(); i++) { |
2012 for (int i = 0; i < product->miscs.size(); i++) { |
2013 if (product->miscs.at(i).m_use_use == MISC_USES_SECONDARY) { |
2013 if (product->miscs.at(i).m_use_use == MISC_USES_SECONDARY) { |
2014 QString unit = (product->miscs.at(i).m_amount_is_weight) ? "gr":"ml"; |
2014 QString unit = (product->miscs.at(i).m_amount_is_weight) ? "gr":"ml"; |
2015 checkLine(&painter, &y, QString(tr("Add %1 %2 `%3` for %4 days")).arg(product->miscs.at(i).m_amount * factor, 1, 'f', 3) |
2015 checkLine(&painter, &y, QString(tr("Add %1 %2 `%3` for %4 days")).arg(product->miscs.at(i).m_amount * 1000.0 * factor, 1, 'f', 2) |
2016 .arg(unit).arg(product->miscs.at(i).m_name).arg(product->miscs.at(i).m_time / 1440)); |
2016 .arg(unit).arg(product->miscs.at(i).m_name).arg(product->miscs.at(i).m_time / 1440)); |
2017 } |
2017 } |
2018 } |
2018 } |
2019 } |
2019 } |
2020 if (checkSplit(&painter, &y, 6)) |
2020 if (checkSplit(&painter, &y, 6)) |
2067 } |
2067 } |
2068 } |
2068 } |
2069 for (int i = 0; i < product->miscs.size(); i++) { |
2069 for (int i = 0; i < product->miscs.size(); i++) { |
2070 if (product->miscs.at(i).m_use_use == MISC_USES_BOTTLING) { |
2070 if (product->miscs.at(i).m_use_use == MISC_USES_BOTTLING) { |
2071 QString unit = (product->miscs.at(i).m_amount_is_weight) ? "gr":"ml"; |
2071 QString unit = (product->miscs.at(i).m_amount_is_weight) ? "gr":"ml"; |
2072 checkLine(&painter, &y, QString(tr("Add %1 %2 `%3` during bottling")).arg(product->miscs.at(i).m_amount * factor, 1, 'f', 3) |
2072 checkLine(&painter, &y, QString(tr("Add %1 %2 `%3` during bottling")).arg(product->miscs.at(i).m_amount * 1000 * factor, 1, 'f', 2) |
2073 .arg(unit).arg(product->miscs.at(i).m_name)); |
2073 .arg(unit).arg(product->miscs.at(i).m_name)); |
2074 } |
2074 } |
2075 } |
2075 } |
2076 } |
2076 } |
2077 } |
2077 } |