src/PrinterDialog.h

Sun, 13 Mar 2022 22:56:22 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 13 Mar 2022 22:56:22 +0100
changeset 52
ff7b3a41c9b5
child 53
d36879f13d32
permissions
-rw-r--r--

After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.

#ifndef	_PRINTERDIALOG_H
#define	_PRINTERDIALOG_H

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


enum JobType { PR_SUPPLIES, PR_YEASTBANK };

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 title);
};

#endif

mercurial