summaryrefslogtreecommitdiffstats
path: root/printer.h
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2015-07-10 20:34:25 +0200
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2015-07-20 15:27:41 +0300
commit142fd950c8d69dc4d4aad4034fe65ca400d37783 (patch)
treeeeba4c4164030c04ef21f719fb6067f68fb3eac4 /printer.h
parent4e1a5d954b3cceafce3fb2e4534d7e5c9bd5c770 (diff)
downloadsubsurface-142fd950c8d69dc4d4aad4034fe65ca400d37783.tar.gz
Printing: change QPrinter to parent class QPaintDevice
Use general class QPaintDevice to be used for printing and previewing instances, printing uses a QPrinter object while previewing uses a QPixmap instance. We use static_cast to use the needed object. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'printer.h')
-rw-r--r--printer.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/printer.h b/printer.h
index 6c826aa0a..caeb14a1f 100644
--- a/printer.h
+++ b/printer.h
@@ -14,7 +14,7 @@ class Printer : public QObject {
Q_OBJECT
private:
- QPrinter *printer;
+ QPaintDevice *paintDevice;
QWebView *webView;
print_options *printOptions;
template_options *templateOptions;
@@ -28,7 +28,7 @@ private slots:
void templateProgessUpdated(int value);
public:
- Printer(QPrinter *printer, print_options *printOptions, template_options *templateOptions);
+ Printer(QPaintDevice *paintDevice, print_options *printOptions, template_options *templateOptions);
~Printer();
void print();