From 8abdba46d3fd83ef58e3d64a481b16cc8d86f549 Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Thu, 29 Dec 2022 16:56:56 +0100 Subject: [PATCH] Add an option to call CQ with an individual contest name. --- Configuration.cpp | 23 ++ Configuration.hpp | 4 +- Configuration.ui | 636 ++++++++++++++++++++++------------------- widgets/mainwindow.cpp | 4 + 4 files changed, 378 insertions(+), 289 deletions(-) diff --git a/Configuration.cpp b/Configuration.cpp index ab0faba32..5916c3ff9 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -581,6 +581,7 @@ private: Q_SLOT void on_cbAutoLog_clicked(bool); Q_SLOT void on_Field_Day_Exchange_textEdited (QString const&); Q_SLOT void on_RTTY_Exchange_textEdited (QString const&); + Q_SLOT void on_Contest_Name_textEdited (QString const&); // typenames used as arguments must match registered type names :( Q_SIGNAL void start_transceiver (unsigned seqeunce_number) const; @@ -676,6 +677,7 @@ private: QString my_grid_; QString FD_exchange_; QString RTTY_exchange_; + QString Contest_Name_; qint32 id_interval_; qint32 ntrials_; @@ -709,6 +711,7 @@ private: bool decode_at_52s_; bool single_decode_; bool twoPass_; + bool Individual_Contest_Name_; bool bSpecialOp_; int SelectedActivity_; bool x2ToneSpacing_; @@ -816,6 +819,7 @@ bool Configuration::enable_VHF_features () const {return m_->enable_VHF_features bool Configuration::decode_at_52s () const {return m_->decode_at_52s_;} bool Configuration::single_decode () const {return m_->single_decode_;} bool Configuration::twoPass() const {return m_->twoPass_;} +bool Configuration::Individual_Contest_Name() const {return m_->Individual_Contest_Name_;} bool Configuration::x2ToneSpacing() const {return m_->x2ToneSpacing_;} bool Configuration::x4ToneSpacing() const {return m_->x4ToneSpacing_;} bool Configuration::split_mode () const {return m_->split_mode ();} @@ -976,6 +980,11 @@ QString Configuration::RTTY_Exchange() const return m_->RTTY_exchange_; } +QString Configuration::Contest_Name() const +{ + return m_->Contest_Name_; +} + auto Configuration::special_op_id () const -> SpecialOperatingActivity { return m_->bSpecialOp_ ? static_cast (m_->SelectedActivity_) : SpecialOperatingActivity::NONE; @@ -1419,6 +1428,7 @@ void Configuration::impl::initialize_models () ui_->decode_at_52s_check_box->setChecked(decode_at_52s_); ui_->single_decode_check_box->setChecked(single_decode_); ui_->cbTwoPass->setChecked(twoPass_); + ui_->cbContestName->setChecked(Individual_Contest_Name_); ui_->gbSpecialOpActivity->setChecked(bSpecialOp_); ui_->special_op_activity_button_group->button (SelectedActivity_)->setChecked (true); ui_->cbx2ToneSpacing->setChecked(x2ToneSpacing_); @@ -1529,6 +1539,7 @@ void Configuration::impl::read_settings () my_grid_ = settings_->value ("MyGrid", QString {}).toString (); FD_exchange_ = settings_->value ("Field_Day_Exchange",QString {}).toString (); RTTY_exchange_ = settings_->value ("RTTY_Exchange",QString {}).toString (); + Contest_Name_ = settings_->value ("Contest_Name",QString {}).toString (); ui_->Field_Day_Exchange->setText(FD_exchange_); ui_->RTTY_Exchange->setText(RTTY_exchange_); if (next_font_.fromString (settings_->value ("Font", QGuiApplication::font ().toString ()).toString ()) @@ -1678,6 +1689,7 @@ void Configuration::impl::read_settings () decode_at_52s_ = settings_->value("Decode52",false).toBool (); single_decode_ = settings_->value("SingleDecode",false).toBool (); twoPass_ = settings_->value("TwoPass",true).toBool (); + Individual_Contest_Name_ = settings_->value("Individual_Contest_Name",true).toBool (); bSpecialOp_ = settings_->value("SpecialOpActivity",false).toBool (); SelectedActivity_ = settings_->value("SelectedActivity",1).toInt (); x2ToneSpacing_ = settings_->value("x2ToneSpacing",false).toBool (); @@ -1738,6 +1750,7 @@ void Configuration::impl::write_settings () settings_->setValue ("MyGrid", my_grid_); settings_->setValue ("Field_Day_Exchange", FD_exchange_); settings_->setValue ("RTTY_Exchange", RTTY_exchange_); + settings_->setValue ("Contest_Name", Contest_Name_); settings_->setValue ("Font", font_.toString ()); settings_->setValue ("DecodedTextFont", decoded_text_font_.toString ()); settings_->setValue ("IDint", id_interval_); @@ -1812,6 +1825,7 @@ void Configuration::impl::write_settings () settings_->setValue ("Decode52", decode_at_52s_); settings_->setValue ("SingleDecode", single_decode_); settings_->setValue ("TwoPass", twoPass_); + settings_->setValue ("Individual_Contest_Name", Individual_Contest_Name_); settings_->setValue ("SelectedActivity", SelectedActivity_); settings_->setValue ("SpecialOpActivity", bSpecialOp_); settings_->setValue ("x2ToneSpacing", x2ToneSpacing_); @@ -2202,6 +2216,7 @@ void Configuration::impl::accept () my_grid_ = ui_->grid_line_edit->text (); FD_exchange_= ui_->Field_Day_Exchange->text ().toUpper (); RTTY_exchange_= ui_->RTTY_Exchange->text ().toUpper (); + Contest_Name_= ui_->Contest_Name->text ().toUpper (); spot_to_psk_reporter_ = ui_->psk_reporter_check_box->isChecked (); psk_reporter_tcpip_ = ui_->psk_reporter_tcpip_check_box->isChecked (); id_interval_ = ui_->CW_id_interval_spin_box->value (); @@ -2239,6 +2254,7 @@ void Configuration::impl::accept () decode_at_52s_ = ui_->decode_at_52s_check_box->isChecked (); single_decode_ = ui_->single_decode_check_box->isChecked (); twoPass_ = ui_->cbTwoPass->isChecked (); + Individual_Contest_Name_ = ui_->cbContestName->isChecked (); bSpecialOp_ = ui_->gbSpecialOpActivity->isChecked (); SelectedActivity_ = ui_->special_op_activity_button_group->checkedId(); x2ToneSpacing_ = ui_->cbx2ToneSpacing->isChecked (); @@ -2324,6 +2340,8 @@ void Configuration::impl::accept () use_dynamic_grid_ = ui_->use_dynamic_grid->isChecked(); highlight_DXcall_ = ui_->cbHighlightDXcall->isChecked(); highlight_DXgrid_ = ui_->cbHighlightDXgrid->isChecked(); + Individual_Contest_Name_ = ui_->cbContestName->isChecked(); + write_settings (); // make visible to all } @@ -2908,6 +2926,11 @@ void Configuration::impl::on_RTTY_Exchange_textEdited (QString const& exchange) ui_->RTTY_Exchange->setText (exchange.toUpper ()); } +void Configuration::impl::on_Contest_Name_textEdited (QString const& exchange) +{ + ui_->Contest_Name->setText (exchange.toUpper ()); +} + bool Configuration::impl::have_rig () { if (!open_rig ()) diff --git a/Configuration.hpp b/Configuration.hpp index 85b887ae7..dbf6b9124 100644 --- a/Configuration.hpp +++ b/Configuration.hpp @@ -100,6 +100,7 @@ public: QString my_grid () const; QString Field_Day_Exchange() const; QString RTTY_Exchange() const; + QString Contest_Name() const; void setEU_VHF_Contest(); QFont text_font () const; QFont decoded_text_font () const; @@ -187,7 +188,8 @@ public: void setSpecial_None(); bool highlight_DXcall () const; bool highlight_DXgrid () const; - + bool Individual_Contest_Name() const; + // 0 1 2 3 4 5 6 7 8 enum class SpecialOperatingActivity {NONE, NA_VHF, EU_VHF, FIELD_DAY, RTTY, WW_DIGI, FOX, HOUND, ARRL_DIGI}; SpecialOperatingActivity special_op_id () const; diff --git a/Configuration.ui b/Configuration.ui index 9274244a8..1f91e09cd 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -2513,289 +2513,6 @@ Right click for insert and delete options. Advanced - - - - Special operating activity - - - true - - - false - - - - - - <html><head/><body><p>FT8 DXpedition mode: Fox (DXpedition) operator.</p></body></html> - - - Fox - - - Fox - - - false - - - special_op_activity_button_group - - - - - - - - 0 - 0 - - - - <html><head/><body><p>European VHF+ contests requiring a signal report, serial number, and 6-character locator.</p></body></html> - - - EU VHF Contest - - - EU VHF Contest - - - special_op_activity_button_group - - - - - - - - 0 - 0 - - - - <html><head/><body><p>North American VHF/UHF/Microwave contests and others in which a 4-character grid locator is the required exchange.</p></body></html> - - - NA VHF Contest - - - NA VHF - - - special_op_activity_button_group - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - <html><head/><body><p>FT8 DXpedition mode: Hound operator calling the DX.</p></body></html> - - - Hound - - - Hound - - - true - - - special_op_activity_button_group - - - - - - - - - <html><head/><body><p>ARRL Field Day exchange: number of transmitters, Class, and ARRL/RAC section or &quot;DX&quot;.</p></body></html> - - - A R R L Field Day - - - ARRL Field Day - - - special_op_activity_button_group - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Field Day exchange - - - FD Exch: - - - Field_Day_Exchange - - - - - - - - 70 - 0 - - - - <html><head/><body><p>ARRL Field Day exchange: number of transmitters, Class, and ARRL/RAC section or &quot;DX&quot;.</p></body></html> - - - 6A SNJ - - - Qt::AlignCenter - - - - - - - - - - - - 0 - 18 - - - - <html><head/><body><p>World-Wide Digi-mode contest</p><p><br/></p></body></html> - - - WW Digital Contest - - - WW Digi Contest - - - special_op_activity_button_group - - - - - - - - - <html><head/><body><p>FT Roundup and similar contests. Exchange is US state, Canadian province, or &quot;DX&quot;.</p></body></html> - - - R T T Y Roundup - - - FT Roundup - - - special_op_activity_button_group - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - RTTY Roundup exchange - - - FT RU Exch: - - - RTTY_Exchange - - - - - - - - 70 - 0 - - - - <html><head/><body><p>FT Roundup and similar contests. Exchange is US state, Canadian province, or &quot;DX&quot;.</p></body></html> - - - NJ - - - Qt::AlignCenter - - - - - - - - - - - <html><head/><body><p>ARRL International Digital Contest</p></body></html> - - - ARRL Digi Contest - - - special_op_activity_button_group - - - - - - @@ -3036,6 +2753,349 @@ Right click for insert and delete options. + + + + Special operating activity + + + true + + + false + + + + + + <html><head/><body><p>FT8 DXpedition mode: Hound operator calling the DX.</p></body></html> + + + Hound + + + Hound + + + true + + + special_op_activity_button_group + + + + + + + + 0 + 0 + + + + <html><head/><body><p>North American VHF/UHF/Microwave contests and others in which a 4-character grid locator is the required exchange.</p></body></html> + + + NA VHF Contest + + + NA VHF + + + special_op_activity_button_group + + + + + + + + + <html><head/><body><p>ARRL Field Day exchange: number of transmitters, Class, and ARRL/RAC section or &quot;DX&quot;.</p></body></html> + + + A R R L Field Day + + + ARRL Field Day + + + special_op_activity_button_group + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Field Day exchange + + + FD Exch: + + + Field_Day_Exchange + + + + + + + + 70 + 0 + + + + <html><head/><body><p>ARRL Field Day exchange: number of transmitters, Class, and ARRL/RAC section or &quot;DX&quot;.</p></body></html> + + + 6A SNJ + + + Qt::AlignCenter + + + + + + + + + + + <html><head/><body><p>ARRL International Digital Contest</p></body></html> + + + ARRL Digi Contest + + + special_op_activity_button_group + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 18 + + + + <html><head/><body><p>World-Wide Digi-mode contest</p><p><br/></p></body></html> + + + WW Digital Contest + + + WW Digi Contest + + + special_op_activity_button_group + + + + + + + + + <html><head/><body><p>FT Roundup and similar contests. Exchange is US state, Canadian province, or &quot;DX&quot;.</p></body></html> + + + R T T Y Roundup + + + FT Roundup + + + special_op_activity_button_group + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + RTTY Roundup exchange + + + FT RU Exch: + + + RTTY_Exchange + + + + + + + + 70 + 0 + + + + <html><head/><body><p>FT Roundup and similar contests. Exchange is US state, Canadian province, or &quot;DX&quot;.</p></body></html> + + + NJ + + + Qt::AlignCenter + + + + + + + + + + + <html><head/><body><p>FT8 DXpedition mode: Fox (DXpedition) operator.</p></body></html> + + + Fox + + + Fox + + + false + + + special_op_activity_button_group + + + + + + + + 0 + 0 + + + + <html><head/><body><p>European VHF+ contests requiring a signal report, serial number, and 6-character locator.</p></body></html> + + + EU VHF Contest + + + EU VHF Contest + + + special_op_activity_button_group + + + + + + + + + <html><head/><body><p>Call CQ with an individual contest name instead of TEST, RU, or WW. </p></body></html> + + + CQ with individual contest name + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Contest name: + + + + + + + + 70 + 16777215 + + + + PACC + + + 4 + + + 2 + + + Qt::AlignCenter + + + + + + + + + + @@ -3276,13 +3336,13 @@ Right click for insert and delete options. - - - - - + + + + + diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 7b033a3ed..d542193c1 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -5760,12 +5760,16 @@ void MainWindow::genCQMsg () ( tlist.at(1)==my_callsign or tlist.at(2)==my_callsign ) and stdCall(my_callsign)) { + if(m_config.Individual_Contest_Name()) { + m_cqStr = m_config.Contest_Name(); + } else { if(SpecOp::NA_VHF == m_specOp) m_cqStr="TEST"; if(SpecOp::EU_VHF == m_specOp) m_cqStr="TEST"; if(SpecOp::FIELD_DAY == m_specOp) m_cqStr="FD"; if(SpecOp::RTTY == m_specOp) m_cqStr="RU"; if(SpecOp::WW_DIGI == m_specOp) m_cqStr="WW"; if(SpecOp::ARRL_DIGI == m_specOp) m_cqStr="TEST"; + } if( tlist.at(1)==my_callsign ) { t="CQ " + m_cqStr + " " + tlist.at(1) + " " + tlist.at(2); } else {