summaryrefslogtreecommitdiffstats
path: root/printer.cpp
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2015-07-02 22:26:31 +0200
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2015-07-05 21:00:40 +0300
commitbc80fc8849a01ac156c5e54ba8ef3fe04e1aaee3 (patch)
treed235d43cf54d5c30653147f2d1d9baec55bacf27 /printer.cpp
parent71561e720dbfd85b3cb724dd1eb509b0d230d5db (diff)
downloadsubsurface-bc80fc8849a01ac156c5e54ba8ef3fe04e1aaee3.tar.gz
Printing: pass the template_options struct to TemplateLayout
The template_options struct needs to be passed to TemplateLayout constructor. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'printer.cpp')
-rw-r--r--printer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/printer.cpp b/printer.cpp
index 5c93d2fed..83cc42d18 100644
--- a/printer.cpp
+++ b/printer.cpp
@@ -6,10 +6,11 @@
#include <QWebElementCollection>
#include <QWebElement>
-Printer::Printer(QPrinter *printer, print_options *printOptions)
+Printer::Printer(QPrinter *printer, print_options *printOptions, template_options *templateOptions)
{
this->printer = printer;
this->printOptions = printOptions;
+ this->templateOptions = templateOptions;
dpi = 0;
done = 0;
}
@@ -116,7 +117,7 @@ void Printer::templateProgessUpdated(int value)
void Printer::print()
{
- TemplateLayout t(printOptions);
+ TemplateLayout t(printOptions, templateOptions);
webView = new QWebView();
connect(&t, SIGNAL(progressUpdated(int)), this, SLOT(templateProgessUpdated(int)));