diff options
author | Gehad elrobey <gehadelrobey@gmail.com> | 2015-08-12 00:57:19 +0200 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2015-08-15 15:04:34 +0300 |
commit | 31df69c401ad8995d8201242a1db1b74de19a18a (patch) | |
tree | c96851a60bb7ea9cece654bc76fa324e7161da65 /qt-ui/printoptions.cpp | |
parent | 72b35d8e79e8d404b4dc0d47d9a9af82958be718 (diff) | |
download | subsurface-31df69c401ad8995d8201242a1db1b74de19a18a.tar.gz |
Printing: disable ui elements on statistics print
Disable all the UI elements for "dive list print", disable
all the template settings as well, Template Edit button
will be enabled after statistics print supports color palettes.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Diffstat (limited to 'qt-ui/printoptions.cpp')
-rw-r--r-- | qt-ui/printoptions.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/qt-ui/printoptions.cpp b/qt-ui/printoptions.cpp index 1da95a94d..419098cf8 100644 --- a/qt-ui/printoptions.cpp +++ b/qt-ui/printoptions.cpp @@ -64,17 +64,39 @@ void PrintOptions::setup() } // print type radio buttons -void PrintOptions::on_radioDiveListPrint_clicked(bool check) +void PrintOptions::on_radioDiveListPrint_toggled(bool check) { if (check) { printOptions->type = print_options::DIVELIST; + + // print options + ui.printInColor->setEnabled(true); + ui.printSelected->setEnabled(true); + + // print template + ui.deleteButton->setEnabled(true); + ui.editButton->setEnabled(true); + ui.exportButton->setEnabled(true); + ui.importButton->setEnabled(true); + ui.printTemplate->setEnabled(true); } } -void PrintOptions::on_radioStatisticsPrint_clicked(bool check) +void PrintOptions::on_radioStatisticsPrint_toggled(bool check) { if (check) { printOptions->type = print_options::STATISTICS; + + // print options + ui.printInColor->setEnabled(false); + ui.printSelected->setEnabled(false); + + // print template + ui.deleteButton->setEnabled(false); + ui.editButton->setEnabled(false); + ui.exportButton->setEnabled(false); + ui.importButton->setEnabled(false); + ui.printTemplate->setEnabled(false); } } |