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
|
@ -1,4 +1,5 @@
|
|||
#include "printoptions.h"
|
||||
#include <QDebug>
|
||||
|
||||
PrintOptions::PrintOptions(QWidget *parent, struct print_options *printOpt)
|
||||
{
|
||||
|
@ -26,6 +27,14 @@ void PrintOptions::setup(struct print_options *printOpt)
|
|||
ui.radioStatisticsPrint->setChecked(true);
|
||||
break;
|
||||
}
|
||||
switch (printOptions->p_template) {
|
||||
case print_options::ONE_DIVE:
|
||||
ui.printTemplate->setCurrentIndex(0);
|
||||
break;
|
||||
case print_options::TWO_DIVE:
|
||||
ui.printTemplate->setCurrentIndex(1);
|
||||
break;
|
||||
}
|
||||
|
||||
// general print option checkboxes
|
||||
if (printOptions->color_selected)
|
||||
|
@ -75,3 +84,16 @@ void PrintOptions::printSelectedClicked(bool check)
|
|||
{
|
||||
printOptions->print_selected = check;
|
||||
}
|
||||
|
||||
|
||||
void PrintOptions::on_printTemplate_currentIndexChanged(int index)
|
||||
{
|
||||
switch(index){
|
||||
case 0:
|
||||
printOptions->p_template = print_options::ONE_DIVE;
|
||||
break;
|
||||
case 1:
|
||||
printOptions->p_template = print_options::TWO_DIVE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue