From ae640ed40c74157165fd3b38bda857d653020530 Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Sun, 19 May 2019 10:51:05 -0400 Subject: [PATCH] Added a configuration checkbox for holding PTT --- Configuration.cpp | 6 ++ Configuration.hpp | 1 + Configuration.ui | 260 ++++++++++++++++++++++++++-------------------- 3 files changed, 153 insertions(+), 114 deletions(-) diff --git a/Configuration.cpp b/Configuration.cpp index 76eb627..27a7aee 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -648,6 +648,7 @@ private: bool ppfx_; bool clear_callsign_; bool miles_; + bool hold_ptt_; bool avoid_allcall_; bool spellcheck_; bool quick_call_; @@ -789,6 +790,7 @@ bool Configuration::DXCC () const {return m_->DXCC_;} bool Configuration::ppfx() const {return m_->ppfx_;} bool Configuration::clear_callsign () const {return m_->clear_callsign_;} bool Configuration::miles () const {return m_->miles_;} +bool Configuration::hold_ptt() const {return m_->hold_ptt_;} bool Configuration::avoid_allcall () const {return m_->avoid_allcall_;} bool Configuration::set_avoid_allcall(bool avoid) { if(m_->avoid_allcall_ != avoid){ @@ -1431,6 +1433,7 @@ void Configuration::impl::initialize_models () ui_->prompt_to_log_check_box->setChecked (prompt_to_log_); ui_->clear_callsign_check_box->setChecked (clear_callsign_); ui_->miles_check_box->setChecked (miles_); + ui_->hold_ptt_check_box->setChecked(hold_ptt_); ui_->avoid_allcall_checkbox->setChecked(avoid_allcall_); ui_->spellcheck_check_box->setChecked(spellcheck_); ui_->quick_call_check_box->setChecked (quick_call_); @@ -1748,6 +1751,7 @@ void Configuration::impl::read_settings () ppfx_ = settings_->value ("PrincipalPrefix", false).toBool (); clear_callsign_ = settings_->value ("ClearCallGrid", false).toBool (); miles_ = settings_->value ("Miles", false).toBool (); + hold_ptt_ = settings_->value ("HoldPTT", false).toBool(); avoid_allcall_ = settings_->value ("AvoidAllcall", false).toBool (); spellcheck_ = settings_->value ("Spellcheck", true).toBool(); quick_call_ = settings_->value ("QuickCall", false).toBool (); @@ -1890,6 +1894,7 @@ void Configuration::impl::write_settings () settings_->setValue ("PrincipalPrefix", ppfx_); settings_->setValue ("ClearCallGrid", clear_callsign_); settings_->setValue ("Miles", miles_); + settings_->setValue ("HoldPTT", hold_ptt_); settings_->setValue ("AvoidAllcall", avoid_allcall_); settings_->setValue ("Spellcheck", spellcheck_); settings_->setValue ("QuickCall", quick_call_); @@ -2422,6 +2427,7 @@ void Configuration::impl::accept () prompt_to_log_ = ui_->prompt_to_log_check_box->isChecked (); clear_callsign_ = ui_->clear_callsign_check_box->isChecked (); miles_ = ui_->miles_check_box->isChecked (); + hold_ptt_ = ui_->hold_ptt_check_box->isChecked(); avoid_allcall_ = ui_->avoid_allcall_checkbox->isChecked(); spellcheck_ = ui_->spellcheck_check_box->isChecked(); quick_call_ = ui_->quick_call_check_box->isChecked (); diff --git a/Configuration.hpp b/Configuration.hpp index 4174aee..5b4ba8d 100644 --- a/Configuration.hpp +++ b/Configuration.hpp @@ -139,6 +139,7 @@ public: bool ppfx() const; bool clear_callsign () const; bool miles () const; + bool hold_ptt() const; bool avoid_allcall () const; bool set_avoid_allcall (bool avoid); bool spellcheck() const; diff --git a/Configuration.ui b/Configuration.ui index 38a1f78..8fdc697 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -23,7 +23,7 @@ Select tab to change configuration parameters. - 0 + 1 @@ -277,8 +277,8 @@ 0 - -297 - 724 + 0 + 615 750 @@ -922,10 +922,68 @@ text message. + + + + + + <html><head/><body><p>Attempt to connect to the radio with these settings.</p><p>The button will turn green if the connection is successful or red if there is a problem.</p></body></html> + + + Test CAT + + + + + + + Qt::Horizontal + + + QSizePolicy::Preferred + + + + 40 + 20 + + + + + + + + Attempt to activate the transmitter. +Click again to deactivate. Normally no power should be +output since there is no audio being generated at this time. +Check that any Tx indication on your radio and/or your +radio interface behave as expected. + + + QPushButton:checked { + background-color: red; + border-style : outset; + border-width: 1px; + border-radius: 5px; + border-color: black; + min-width: 5em; + padding: 3px; +} + + + Test PTT + + + true + + + + + - 0 + 1 @@ -951,7 +1009,7 @@ text message. 0 0 - 718 + 264 435 @@ -1371,9 +1429,9 @@ a few, particularly some Kenwood rigs, require it). 0 - 0 - 237 - 467 + -102 + 718 + 496 @@ -1642,53 +1700,87 @@ this setting allows you to select which audio input will be used - + Advanced - - - + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Tx delay: + + + sbTxDelay + + + + + + + Minimum delay between assertion of PTT and start of Tx audio. + + + s + + + 1 + + + 0.000000000000000 + + + 0.500000000000000 + + + 0.100000000000000 + + + + + + + PTT command: + + + + + + + + + + + - Tx delay: - - - sbTxDelay + Hold PTT between frames while there are more to be transmitted - - - - Minimum delay between assertion of PTT and start of Tx audio. - - - s - - - 1 - - - 0.000000000000000 - - - 0.500000000000000 - - - 0.100000000000000 - - - - - - - PTT command: - - - - - - @@ -1713,64 +1805,6 @@ this setting allows you to select which audio input will be used - - - - - - <html><head/><body><p>Attempt to connect to the radio with these settings.</p><p>The button will turn green if the connection is successful or red if there is a problem.</p></body></html> - - - Test CAT - - - - - - - Qt::Horizontal - - - QSizePolicy::Preferred - - - - 40 - 20 - - - - - - - - Attempt to activate the transmitter. -Click again to deactivate. Normally no power should be -output since there is no audio being generated at this time. -Check that any Tx indication on your radio and/or your -radio interface behave as expected. - - - QPushButton:checked { - background-color: red; - border-style : outset; - border-width: 1px; - border-radius: 5px; - border-color: black; - min-width: 5em; - padding: 3px; -} - - - Test PTT - - - true - - - - - @@ -4077,8 +4111,6 @@ soundcard changes split_emulate_radio_button split_rig_radio_button split_none_radio_button - sbTxDelay - ptt_command_line_edit test_CAT_push_button test_PTT_push_button scrollArea_5 @@ -4221,12 +4253,12 @@ soundcard changes - - - - - - + + + + + +