Printing: add 1 dive per page option

With this option there is an exception, which makes the notes section of
the profile table occupy half the page. This way dive plans can reasonably
be printed.

Fixes #636

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Lubomir I. Ivanov 2014-07-24 10:56:39 -07:00 committed by Dirk Hohndel
parent f29f41ae9e
commit 21585403db
6 changed files with 36 additions and 6 deletions

View file

@ -23,6 +23,9 @@ void PrintOptions::setup(struct options *printOpt)
case options::TWOPERPAGE:
ui.radioTwoDives->setChecked(true);
break;
case options::ONEPERPAGE:
ui.radioOneDive->setChecked(true);
break;
case options::TABLE:
ui.radioTablePrint->setChecked(true);
break;
@ -44,6 +47,7 @@ void PrintOptions::setup(struct options *printOpt)
connect(ui.radioSixDives, SIGNAL(clicked(bool)), this, SLOT(radioSixDivesClicked(bool)));
connect(ui.radioTwoDives, SIGNAL(clicked(bool)), this, SLOT(radioTwoDivesClicked(bool)));
connect(ui.radioOneDive, SIGNAL(clicked(bool)), this, SLOT(radioOneDiveClicked(bool)));
connect(ui.radioTablePrint, SIGNAL(clicked(bool)), this, SLOT(radioTablePrintClicked(bool)));
connect(ui.printInColor, SIGNAL(clicked(bool)), this, SLOT(printInColorClicked(bool)));
@ -65,6 +69,11 @@ void PrintOptions::radioTwoDivesClicked(bool check)
printOptions->type = options::TWOPERPAGE;
}
void PrintOptions::radioOneDiveClicked(bool check)
{
printOptions->type = options::ONEPERPAGE;
}
void PrintOptions::radioTablePrintClicked(bool check)
{
printOptions->type = options::TABLE;