#ifndef PRINTPREVIEWFORM_H
#define PRINTPREVIEWFORM_H

#include <QWidget>
#include <QPrinter>
#include <QPrintPreviewDialog>

namespace Ui {
    class PrintPreviewForm;
}

class PrintPreviewForm : public QWidget {
    Q_OBJECT

public:
    explicit PrintPreviewForm(QWidget *parent = nullptr);
    ~PrintPreviewForm();

    void setPixmap(const QPixmap &);

    QPrintPreviewDialog *_customPrintPreviewDialog;
private slots:
    void slotPaintRequested(QPrinter *printer);
private:
    Ui::PrintPreviewForm *ui;
    QPrinter             *_printer;
    QPixmap               _pixmap;
    QPainter              *_painter;
};

#endif    // PRINTPREVIEWFORM_H
