src/PrinterDialog.h

Mon, 09 Jan 2023 17:03:19 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Mon, 09 Jan 2023 17:03:19 +0100
changeset 452
c4c5d02131be
parent 386
2e30c9c20d22
child 459
fbb250c725bb
permissions
-rw-r--r--

Limit mash steptime to 240 minutes. Limit mash steps to 82 degrees celsius. In estimate_fg limit total mash time to 240 minutes and increased the water/grain ration from 5.5 to 6 l/kg.

#ifndef	_PRINTERDIALOG_H
#define	_PRINTERDIALOG_H

#include <QDialog>
#include <QPrinter>
#include <QPainter>


enum JobType { PR_SUPPLIES, PR_YEASTBANK, PR_RECIPE, PR_PRODUCT, PR_CHECKLIST, PR_REP_TOTAL, PR_REP_EFF, PR_REP_SVG };

namespace Ui {
class PrinterDialog;
}


class PrinterDialog : public QDialog
{
	Q_OBJECT

public:
    /**
     * @brief Construct a new Printer Dialog
     * @param parent
     */
    explicit PrinterDialog(int job, int rec, QWidget *parent = 0);

    /**
     * @brief Destroy the Printer Dialog
     */
    ~PrinterDialog();

public slots:
    void printDocument(QPrinter *printer);

private:
    int p_job;
    int p_rec;

    void printHeader(QPainter *painter);
    QString strDensity(double density);
    QString strDiff(double v1, double v2, int decimals, QString suffix);
    void checkHeader(QPainter *painter, qreal *y, QString text);
    void checkLine(QPainter *painter, qreal *y, QString text);
    void checkInput(QPainter *painter, qreal *y, QString text, QString prompt);
    bool checkSplit(QPainter *painter, qreal *y, int moment);
};

#endif

mercurial