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>
This commit is contained in:
Gehad elrobey 2015-07-02 22:26:31 +02:00 committed by Lubomir I. Ivanov
parent 71561e720d
commit bc80fc8849
5 changed files with 15 additions and 6 deletions

View file

@ -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)));