aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/printdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/printdialog.cpp')
-rw-r--r--qt-ui/printdialog.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/qt-ui/printdialog.cpp b/qt-ui/printdialog.cpp
index e7d9099da..848183882 100644
--- a/qt-ui/printdialog.cpp
+++ b/qt-ui/printdialog.cpp
@@ -20,12 +20,14 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f
printOptions.print_selected = true;
printOptions.color_selected = true;
printOptions.landscape = false;
+ printOptions.p_template = print_options::ONE_DIVE;
} else {
s.beginGroup(SETTINGS_GROUP);
printOptions.type = (print_options::print_type)s.value("type").toInt();
printOptions.print_selected = s.value("print_selected").toBool();
printOptions.color_selected = s.value("color_selected").toBool();
printOptions.landscape = s.value("landscape").toBool();
+ printOptions.p_template = (print_options::print_template)s.value("template_selected").toInt();
qprinter.setOrientation((QPrinter::Orientation)printOptions.landscape);
}
@@ -33,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);
@@ -85,6 +87,7 @@ void PrintDialog::onFinished()
s.setValue("type", printOptions.type);
s.setValue("print_selected", printOptions.print_selected);
s.setValue("color_selected", printOptions.color_selected);
+ s.setValue("template_selected", printOptions.p_template);
}
void PrintDialog::previewClicked(void)