diff options
author | Gehad elrobey <gehadelrobey@gmail.com> | 2015-06-11 20:13:10 +0200 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2015-06-19 21:41:57 +0300 |
commit | 17470f68220902bc4acff8aa4e8f3ffa7472be46 (patch) | |
tree | ac458af4ca4b35b94595232f1b0bb1c762ea3f85 /qt-ui/printoptions.cpp | |
parent | cd30e11672b08a6fb882a9ff6950f4297c347b3d (diff) | |
download | subsurface-17470f68220902bc4acff8aa4e8f3ffa7472be46.tar.gz |
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>
Diffstat (limited to 'qt-ui/printoptions.cpp')
-rw-r--r-- | qt-ui/printoptions.cpp | 22 |
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; + } +} |