summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/printoptions.cpp26
-rw-r--r--qt-ui/printoptions.h4
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();