mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 18:33:23 +00:00
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>
This commit is contained in:
parent
72b35d8e79
commit
31df69c401
2 changed files with 26 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue