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