summaryrefslogtreecommitdiffstats
path: root/qt-ui/printoptions.cpp
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2014-07-24 10:56:39 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-24 11:33:28 -0700
commit21585403dba6ec47afdf81b86557285acb993b7a (patch)
treeb1de6f9e3404cf732a4fc6e06313c3ca0b47d8fc /qt-ui/printoptions.cpp
parentf29f41ae9ea8b9c6217feab2cd97b165af843c2a (diff)
downloadsubsurface-21585403dba6ec47afdf81b86557285acb993b7a.tar.gz
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>
Diffstat (limited to 'qt-ui/printoptions.cpp')
-rw-r--r--qt-ui/printoptions.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/qt-ui/printoptions.cpp b/qt-ui/printoptions.cpp
index ac5f6550c..818e89c33 100644
--- a/qt-ui/printoptions.cpp
+++ b/qt-ui/printoptions.cpp
@@ -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;