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 | |
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>
-rw-r--r-- | qt-ui/printoptions.cpp | 26 | ||||
-rw-r--r-- | qt-ui/printoptions.h | 4 |
2 files changed, 26 insertions, 4 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); } } diff --git a/qt-ui/printoptions.h b/qt-ui/printoptions.h index 24f8e4cc8..6d7ffffee 100644 --- a/qt-ui/printoptions.h +++ b/qt-ui/printoptions.h @@ -75,8 +75,8 @@ private slots: void printInColorClicked(bool check); void printSelectedClicked(bool check); - void on_radioStatisticsPrint_clicked(bool check); - void on_radioDiveListPrint_clicked(bool check); + void on_radioStatisticsPrint_toggled(bool check); + void on_radioDiveListPrint_toggled(bool check); void on_printTemplate_currentIndexChanged(int index); void on_editButton_clicked(); void on_importButton_clicked(); |