2017-04-27 20:26:05 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2013-07-09 15:37:53 +03:00
|
|
|
#ifndef PRINTDIALOG_H
|
|
|
|
#define PRINTDIALOG_H
|
|
|
|
|
2015-07-01 17:08:35 +02:00
|
|
|
#ifndef NO_PRINTING
|
2013-07-09 15:37:53 +03:00
|
|
|
#include <QDialog>
|
2013-07-10 15:34:57 +03:00
|
|
|
#include <QPrinter>
|
2015-05-30 13:27:14 +02:00
|
|
|
#include "printoptions.h"
|
2015-05-30 15:20:01 +02:00
|
|
|
#include "printer.h"
|
2015-06-29 03:16:19 +02:00
|
|
|
#include "templateedit.h"
|
2013-12-04 15:44:31 +02:00
|
|
|
|
2013-12-04 15:51:01 +02:00
|
|
|
class QProgressBar;
|
2013-12-04 15:44:31 +02:00
|
|
|
class PrintOptions;
|
|
|
|
class PrintLayout;
|
2013-07-09 15:37:53 +03:00
|
|
|
|
|
|
|
// should be based on a custom QPrintDialog class
|
|
|
|
class PrintDialog : public QDialog {
|
2014-02-27 20:09:57 -08:00
|
|
|
Q_OBJECT
|
2013-07-09 15:37:53 +03:00
|
|
|
|
|
|
|
public:
|
2020-10-25 14:27:39 -07:00
|
|
|
explicit PrintDialog(QWidget *parent = 0);
|
2018-07-31 07:41:19 +02:00
|
|
|
~PrintDialog();
|
2013-07-09 15:37:53 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
PrintOptions *optionsWidget;
|
2013-12-04 15:51:01 +02:00
|
|
|
QProgressBar *progressBar;
|
2015-05-30 15:20:01 +02:00
|
|
|
Printer *printer;
|
2016-01-07 19:33:58 -02:00
|
|
|
QPrinter *qprinter;
|
2014-11-14 00:57:42 +02:00
|
|
|
struct print_options printOptions;
|
2015-06-29 03:16:19 +02:00
|
|
|
struct template_options templateOptions;
|
2013-07-09 15:37:53 +03:00
|
|
|
|
2014-02-27 20:09:57 -08:00
|
|
|
private
|
|
|
|
slots:
|
2014-11-14 00:57:42 +02:00
|
|
|
void onFinished();
|
2013-12-04 13:51:34 +02:00
|
|
|
void previewClicked();
|
2019-09-06 23:17:49 +02:00
|
|
|
void exportHtmlClicked();
|
2013-07-09 15:37:53 +03:00
|
|
|
void printClicked();
|
2013-07-10 19:27:10 +03:00
|
|
|
void onPaintRequested(QPrinter *);
|
2016-01-07 19:33:58 -02:00
|
|
|
void createPrinterObj();
|
2013-07-09 15:37:53 +03:00
|
|
|
};
|
2015-06-04 10:18:37 -07:00
|
|
|
#endif
|
2014-02-11 19:14:46 +01:00
|
|
|
#endif // PRINTDIALOG_H
|