mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
cd30e11672
commit
17470f6822
4 changed files with 35 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue