From 31df69c401ad8995d8201242a1db1b74de19a18a Mon Sep 17 00:00:00 2001 From: Gehad elrobey Date: Wed, 12 Aug 2015 00:57:19 +0200 Subject: 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 Signed-off-by: Gehad elrobey --- qt-ui/printoptions.cpp | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'qt-ui/printoptions.cpp') 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); } } -- cgit v1.2.3-70-g09d2