From b991bdfd139f47c8cc927c8e21321f583409c303 Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Sat, 25 May 2024 10:21:16 +0200 Subject: [PATCH] Disable SuperFox key control elements unless applicable. --- Configuration.cpp | 74 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/Configuration.cpp b/Configuration.cpp index 8f7ccbbb5..a188e3539 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -584,9 +584,20 @@ private: Q_SLOT void on_LotW_CSV_fetch_push_button_clicked (bool); Q_SLOT void on_hamlib_download_button_clicked (bool); Q_SLOT void on_revert_update_button_clicked (bool); + Q_SLOT void on_rbFox_clicked (bool); + Q_SLOT void on_rbHound_clicked (bool); + Q_SLOT void on_rbNA_VHF_Contest_clicked (bool); + Q_SLOT void on_rbEU_VHF_Contest_clicked (bool); + Q_SLOT void on_rbWW_DIGI_clicked (bool); + Q_SLOT void on_rbQ65pileup_clicked (bool); + Q_SLOT void on_rbField_Day_clicked (bool); + Q_SLOT void on_rbRTTY_Roundup_clicked (bool); + Q_SLOT void on_rbARRL_Digi_clicked (bool); + Q_SLOT void on_cbSuperFox_clicked (bool); void error_during_hamlib_download (QString const& reason); void after_hamlib_downloaded(); void display_file_information(); + void check_visibility(); Q_SLOT void on_cbx2ToneSpacing_clicked(bool); Q_SLOT void on_cbx4ToneSpacing_clicked(bool); @@ -1568,6 +1579,8 @@ void Configuration::impl::initialize_models () ui_->cbHighlightDXcall->setChecked(highlight_DXcall_); ui_->cbHighlightDXgrid->setChecked(highlight_DXgrid_); + check_visibility (); + set_rig_invariants (); } @@ -3136,6 +3149,67 @@ void Configuration::impl::on_cbx4ToneSpacing_clicked(bool b) if(b) ui_->cbx2ToneSpacing->setChecked(false); } +void Configuration::impl::on_rbFox_clicked (bool) +{ + check_visibility (); +} + +void Configuration::impl::on_rbHound_clicked (bool) +{ + check_visibility (); +} + +void Configuration::impl::on_rbNA_VHF_Contest_clicked (bool) +{ + check_visibility (); +} + +void Configuration::impl::on_rbEU_VHF_Contest_clicked (bool) +{ + check_visibility (); +} + +void Configuration::impl::on_rbWW_DIGI_clicked (bool) +{ + check_visibility (); +} + +void Configuration::impl::on_rbQ65pileup_clicked (bool) +{ + check_visibility (); +} + +void Configuration::impl::on_rbField_Day_clicked (bool) +{ + check_visibility (); +} + +void Configuration::impl::on_rbRTTY_Roundup_clicked (bool) +{ + check_visibility (); +} + +void Configuration::impl::on_rbARRL_Digi_clicked (bool) +{ + check_visibility (); +} + +void Configuration::impl::on_cbSuperFox_clicked (bool) +{ + check_visibility (); +} + +void Configuration::impl::check_visibility () +{ + if (ui_->rbFox->isChecked() and ui_->cbSuperFox->isChecked()) { + ui_->sfkey_label->setEnabled (true); + ui_->FoxKey->setEnabled (true); + } else { + ui_->sfkey_label->setEnabled (false); + ui_->FoxKey->setEnabled (false); + } +} + void Configuration::impl::on_Field_Day_Exchange_textEdited (QString const& exchange) { auto text = exchange.simplified ().toUpper ();