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 <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Gehad elrobey 2015-06-14 06:25:35 +02:00 committed by Lubomir I. Ivanov
parent 42b9d0d047
commit 60c5e3cf25
5 changed files with 12 additions and 6 deletions

View file

@ -35,7 +35,7 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f
optionsWidget = new PrintOptions(this, &printOptions);
// create a new printer object
printer = new Printer(&qprinter);
printer = new Printer(&qprinter, &printOptions);
QVBoxLayout *layout = new QVBoxLayout(this);
setLayout(layout);