aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/printoptions.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-19 20:33:54 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-19 20:33:54 -0700
commit56d701dfff72bb4e59f23432c5b7d9c356132412 (patch)
tree6550cb8ef679944f40fd3f93f1f0046ac11523e0 /qt-ui/printoptions.cpp
parent56b82e0ecf58dd1f2b7585425dbdebbbbe5668a4 (diff)
parentb039e1db8a4d8d745a455dd70b4434acffb5c1c4 (diff)
downloadsubsurface-56d701dfff72bb4e59f23432c5b7d9c356132412.tar.gz
Merge branch 'custom-print' of https://github.com/neolit123/subsurface
Diffstat (limited to 'qt-ui/printoptions.cpp')
-rw-r--r--qt-ui/printoptions.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/qt-ui/printoptions.cpp b/qt-ui/printoptions.cpp
index 50ca8b7c2..e2684b6ed 100644
--- a/qt-ui/printoptions.cpp
+++ b/qt-ui/printoptions.cpp
@@ -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;
+ }
+}