From 60c5e3cf25e0966fa7ec5f90d5e04404e7fae81f Mon Sep 17 00:00:00 2001 From: Gehad elrobey Date: Sun, 14 Jun 2015 06:25:35 +0200 Subject: Printing: pass the print_options struct to TemplateLayout and Printer As the print_options struct is needed by both TemplateLayout and Printer class, it can be passed to their constructor. Signed-off-by: Gehad elrobey Signed-off-by: Lubomir I. Ivanov --- printer.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'printer.h') diff --git a/printer.h b/printer.h index 75c256d91..5bb6e4169 100644 --- a/printer.h +++ b/printer.h @@ -7,6 +7,7 @@ #include #include "profile/profilewidget2.h" +#include "printoptions.h" class Printer : public QObject { Q_OBJECT @@ -14,6 +15,7 @@ class Printer : public QObject { private: QPrinter *printer; QWebView *webView; + print_options *printOptions; void render(); void putProfileImage(QRect box, QRect viewPort, QPainter *painter, struct dive *dive, QPointer profile); int done; @@ -22,7 +24,7 @@ private slots: void templateProgessUpdated(int value); public: - Printer(QPrinter *printer); + Printer(QPrinter *printer, print_options *printOptions); void print(); signals: -- cgit v1.2.3-70-g09d2