summaryrefslogtreecommitdiffstats
path: root/qt-ui/printdialog.cpp
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2015-06-11 20:13:10 +0200
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2015-06-19 21:41:57 +0300
commit17470f68220902bc4acff8aa4e8f3ffa7472be46 (patch)
treeac458af4ca4b35b94595232f1b0bb1c762ea3f85 /qt-ui/printdialog.cpp
parentcd30e11672b08a6fb882a9ff6950f4297c347b3d (diff)
downloadsubsurface-17470f68220902bc4acff8aa4e8f3ffa7472be46.tar.gz
Printing: add a "one dive per page" option
Add another printing option to the print dialog. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'qt-ui/printdialog.cpp')
-rw-r--r--qt-ui/printdialog.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/printdialog.cpp b/qt-ui/printdialog.cpp
index e7d9099da..4f8a67da1 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);
}
@@ -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)