# HG changeset patch # User Michiel Broek # Date 1654780468 -7200 # Node ID 4f0281b7b0bb7f392af2bf5d3fe0275cb34fdd02 # Parent f56c0dff0a3dfbf354fd85420675648f74d7c4c2 Show split batch status in print product. diff -r f56c0dff0a3d -r 4f0281b7b0bb src/PrinterDialog.cpp --- a/src/PrinterDialog.cpp Thu Jun 09 11:16:00 2022 +0200 +++ b/src/PrinterDialog.cpp Thu Jun 09 15:14:28 2022 +0200 @@ -714,7 +714,12 @@ painter.drawText(170, y+4, 180, 20, Qt::AlignLeft, QString("%1 minutes.").arg(product->boil_time, 1, 'f', 0)); painter.fillRect(405, y, 330, 20, c_line1); painter.drawText(405, y+4, 150, 20, Qt::AlignLeft, tr("Batch size")); - painter.drawText(555, y+4, 180, 20, Qt::AlignLeft, QString("%1 L.").arg(product->batch_size, 1, 'f', 1)); + if (product->divide_type) { + painter.drawText(555, y+4, 180, 20, Qt::AlignLeft, QString("%1 L. of %2 L.").arg(product->batch_size, 1, 'f', 1) + .arg(product->batch_size / product->divide_factor, 1, 'f', 1)); + } else { + painter.drawText(555, y+4, 180, 20, Qt::AlignLeft, QString("%1 L.").arg(product->batch_size, 1, 'f', 1)); + } y += 20; painter.fillRect( 20, y, 330, 20, c_line1); painter.drawText( 20, y+4, 150, 20, Qt::AlignLeft, tr("Start SG")); @@ -753,6 +758,15 @@ painter.fillRect(405, y, 330, 20, c_line1); painter.drawText(405, y+4, 150, 20, Qt::AlignLeft, tr("Stage")); painter.drawText(555, y+4, 180, 20, Qt::AlignLeft, prod_stages[product->stage]); + if (product->divide_parts) { + y += 20; + painter.fillRect( 20, y, 330, 20, c_line1); + painter.drawText( 20, y+4, 150, 20, Qt::AlignLeft, tr("Split batch")); + painter.drawText(170, y+4, 180, 20, Qt::AlignLeft, prod_split[product->divide_type]); + painter.fillRect(405, y, 330, 20, c_line1); + painter.drawText(405, y+4, 150, 20, Qt::AlignLeft, tr("Batch number")); + painter.drawText(555, y+4, 180, 20, Qt::AlignLeft, QString("%1 of %2").arg(product->divide_part + 1).arg(product->divide_parts + 1)); + } y += 40; /* Fermentables */