Ad an option to Hide OTP messages, and switch bg color of the Hound label to green when verified is received.

This commit is contained in:
Uwe Risse 2024-09-09 12:29:13 +02:00
parent a52559758a
commit 827e8e37b5
5 changed files with 436 additions and 354 deletions

View File

@ -598,6 +598,7 @@ private:
Q_SLOT void on_cbSuperFox_clicked (bool);
Q_SLOT void on_cbContestName_clicked (bool);
Q_SLOT void on_cbOTP_clicked (bool);
Q_SLOT void on_cbHideOTP_clicked (bool);
void error_during_hamlib_download (QString const& reason);
void after_hamlib_downloaded();
@ -716,6 +717,7 @@ private:
QString OTPUrl_;
QString OTPSeed_;
bool OTPEnabled_;
bool HideOTP_;
qint32 OTPinterval_;
qint32 id_interval_;
@ -1134,6 +1136,11 @@ bool Configuration::OTPEnabled() const
return m_->OTPSeed_.size() == 16 && m_->OTPEnabled_;
}
bool Configuration::HideOTP () const
{
return m_->HideOTP_;
}
namespace
{
#if defined (Q_OS_MAC)
@ -1671,15 +1678,18 @@ void Configuration::impl::read_settings ()
ui_->Contest_Name->setText(Contest_Name_);
hamlib_backed_up_ = settings_->value ("HamlibBackedUp",QString {}).toString ();
OTPinterval_ = settings_->value ("OTPinterval", 3).toUInt ();
OTPinterval_ = settings_->value ("OTPinterval", 1).toUInt ();
OTPUrl_ = settings_->value ("OTPUrl", FoxVerifier::default_url()).toString ();
OTPSeed_ = settings_->value ("OTPSeed", QString {}).toString ();
OTPEnabled_ = settings_->value ("OTPEnabled", false).toBool ();
HideOTP_ = settings_->value ("HideOTP", true).toBool ();
ui_->sbOTPinterval->setValue(OTPinterval_);
ui_->OTPUrl->setText(OTPUrl_);
ui_->OTPSeed->setText(OTPSeed_);
ui_->cbOTP->setChecked(OTPEnabled_);
ui_->cbHideOTP->setChecked(HideOTP_);
if (next_font_.fromString (settings_->value ("Font", QGuiApplication::font ().toString ()).toString ())
&& next_font_ != font_)
@ -2011,6 +2021,7 @@ void Configuration::impl::write_settings ()
settings_->setValue ("OTPUrl", OTPUrl_);
settings_->setValue ("OTPSeed", OTPSeed_);
settings_->setValue ("OTPEnabled", OTPEnabled_);
settings_->setValue ("HideOTP", HideOTP_);
settings_->sync ();
}
@ -2432,6 +2443,7 @@ void Configuration::impl::accept ()
OTPSeed_=ui_->OTPSeed->text();
OTPUrl_=ui_->OTPUrl->text();
OTPEnabled_=ui_->cbOTP->isChecked();
HideOTP_=ui_->cbHideOTP->isChecked();
auto new_server = ui_->udp_server_line_edit->text ().trimmed ();
auto new_interfaces = get_selected_network_interfaces (ui_->udp_interfaces_combo_box);
@ -3286,6 +3298,11 @@ void Configuration::impl::on_cbOTP_clicked(bool)
check_visibility();
}
void Configuration::impl::on_cbHideOTP_clicked(bool)
{
check_visibility();
}
void Configuration::impl::check_visibility ()
{
if (ui_->rbFox->isChecked() and ui_->cbSuperFox->isChecked() and ui_->gbSpecialOpActivity->isChecked()) {
@ -3319,8 +3336,11 @@ void Configuration::impl::check_visibility ()
}
if ((ui_->rbFox->isChecked() or ui_->rbHound->isChecked()) and ui_->gbSpecialOpActivity->isChecked()) {
ui_->cbSuperFox->setEnabled (true);
ui_->cbOTP->setEnabled (true);
} else {
ui_->cbSuperFox->setEnabled (false);
ui_->cbOTP->setEnabled (false);
ui_->cbHideOTP->setEnabled(false);
}
if (!ui_->rbFox->isChecked() and !ui_->rbHound->isChecked() and !ui_->rbQ65pileup->isChecked()
and ui_->gbSpecialOpActivity->isChecked()) {
@ -3328,37 +3348,34 @@ void Configuration::impl::check_visibility ()
} else {
ui_->cbContestName->setEnabled (false);
}
if (!ui_->cbOTP->isChecked() or !ui_->gbSpecialOpActivity->isChecked())
{
if (!ui_->cbOTP->isChecked() or !ui_->gbSpecialOpActivity->isChecked()) {
ui_->OTPSeed->setEnabled(false);
ui_->OTPUrl->setEnabled(false);
ui_->sbOTPinterval->setEnabled(false);
ui_->lblOTPSeed->setEnabled(false);
ui_->lblOTPUrl->setEnabled(false);
ui_->lblOTPEvery->setEnabled(false);
} else
{
if (ui_->rbHound->isChecked())
{
ui_->cbHideOTP->setEnabled(false);
} else {
if (ui_->rbHound->isChecked()) {
if (ui_->OTPUrl->text().isEmpty())
{
ui_->OTPUrl->setText(FoxVerifier::default_url());
}
ui_->OTPUrl->setEnabled(true);
ui_->lblOTPUrl->setEnabled(true);
} else
{
ui_->cbHideOTP->setEnabled(true);
} else {
ui_->OTPUrl->setEnabled(false);
ui_->lblOTPUrl->setEnabled(false);
}
if (ui_->rbFox->isChecked())
{
if (ui_->rbFox->isChecked()) {
ui_->sbOTPinterval->setEnabled(true);
ui_->OTPSeed->setEnabled(true);
ui_->lblOTPSeed->setEnabled(true);
ui_->lblOTPEvery->setEnabled(true);
} else
{
ui_->cbHideOTP->setEnabled(false);
} else {
ui_->OTPSeed->setEnabled(false);
ui_->lblOTPSeed->setEnabled(false);
ui_->lblOTPEvery->setEnabled(false);

View File

@ -198,6 +198,7 @@ public:
QString OTPSeed() const;
QString OTPUrl() const;
bool OTPEnabled() const;
bool HideOTP() const;
unsigned int OTPinterval() const;
// 0 1 2 3 4 5 6 7 8 9
enum class SpecialOperatingActivity {NONE, NA_VHF, EU_VHF, FIELD_DAY, RTTY, WW_DIGI, FOX, HOUND, ARRL_DIGI, Q65_PILEUP};

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>764</width>
<height>720</height>
<width>750</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
@ -2907,8 +2907,210 @@ Right click for insert and delete options.</string>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_15" columnstretch="1,0,0,0,0,0,0">
<item row="2" column="6">
<layout class="QGridLayout" name="gridLayout_15" columnstretch="1,1,0,2">
<item row="3" column="3">
<layout class="QHBoxLayout" name="horizontalLayout_18" stretch="2,1,1">
<item>
<widget class="QRadioButton" name="rbRTTY_Roundup">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;FT Roundup and similar contests. Exchange is US state, Canadian province, or &amp;quot;DX&amp;quot;.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="accessibleName">
<string>R T T Y Roundup</string>
</property>
<property name="text">
<string>FT Roundup</string>
</property>
<attribute name="buttonGroup">
<string notr="true">special_op_activity_button_group</string>
</attribute>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_10">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QFormLayout" name="formLayout_17">
<item row="0" column="0">
<widget class="QLabel" name="labRTTY">
<property name="accessibleName">
<string>RTTY Roundup exchange</string>
</property>
<property name="text">
<string>FT RU Exch:</string>
</property>
<property name="buddy">
<cstring>RTTY_Exchange</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="RTTY_Exchange">
<property name="minimumSize">
<size>
<width>70</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;FT Roundup and similar contests. Exchange is US state, Canadian province, or &amp;quot;DX&amp;quot;.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>NJ</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="0" column="1">
<widget class="QRadioButton" name="rbHound">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;FT8 DXpedition mode: Hound operator calling the DX.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="accessibleName">
<string>Hound</string>
</property>
<property name="text">
<string>Hound</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">special_op_activity_button_group</string>
</attribute>
</widget>
</item>
<item row="4" column="3">
<widget class="QRadioButton" name="rbARRL_Digi">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;ARRL International Digital Contest&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>ARRL Digi Contest</string>
</property>
<attribute name="buttonGroup">
<string notr="true">special_op_activity_button_group</string>
</attribute>
</widget>
</item>
<item row="4" column="0">
<widget class="QRadioButton" name="rbWW_DIGI">
<property name="minimumSize">
<size>
<width>0</width>
<height>18</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;World-Wide Digi-mode contest&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="accessibleName">
<string>WW Digital Contest</string>
</property>
<property name="text">
<string>WW Digi Contest</string>
</property>
<attribute name="buttonGroup">
<string notr="true">special_op_activity_button_group</string>
</attribute>
</widget>
</item>
<item row="5" column="3">
<layout class="QHBoxLayout" name="horizontalLayout_24">
<item>
<widget class="QCheckBox" name="cbContestName">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Call CQ with an individual contest name instead of TEST, RU, or WW. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>CQ with individual contest name</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_12">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_25">
<item>
<widget class="QLabel" name="labCN">
<property name="text">
<string>Contest name:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="Contest_Name">
<property name="maximumSize">
<size>
<width>70</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="maxLength">
<number>4</number>
</property>
<property name="cursorPosition">
<number>0</number>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="5" column="0">
<widget class="QRadioButton" name="rbQ65pileup">
<property name="minimumSize">
<size>
<width>0</width>
<height>18</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Exchange 4-character locator instead of signal report. Provides q3-level sensitivities for the DX operator. Especially useful for 6m EME DXpeditions.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Q65 Pileup</string>
</property>
<attribute name="buttonGroup">
<string notr="true">special_op_activity_button_group</string>
</attribute>
</widget>
</item>
<item row="2" column="3">
<layout class="QHBoxLayout" name="horizontalLayout_17" stretch="2,1,1">
<item>
<widget class="QRadioButton" name="rbField_Day">
@ -2977,149 +3179,6 @@ Right click for insert and delete options.</string>
</item>
</layout>
</item>
<item row="1" column="2">
<widget class="QLineEdit" name="OTPUrl">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;URL used to verify OTP codes.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="whatsThis">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="cbOTP">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Click to enable OTP method of Fox verification. Requires internet.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>OTP</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QRadioButton" name="rbFox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;FT8 DXpedition mode: Fox (DXpedition) operator.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="accessibleName">
<string>Fox</string>
</property>
<property name="text">
<string>Fox</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">special_op_activity_button_group</string>
</attribute>
</widget>
</item>
<item row="1" column="5" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_26">
<item>
<widget class="QLabel" name="lblOTPEvery">
<property name="text">
<string>OTP every</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="sbOTPinterval">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;How many cycles between sends of the OTP.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>20</number>
</property>
<property name="value">
<number>3</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblOTPSeed">
<property name="text">
<string>OTP Key</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="OTPSeed">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Fox's key to generate OTP Codes.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="whatsThis">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="0">
<widget class="QRadioButton" name="rbQ65pileup">
<property name="minimumSize">
<size>
<width>0</width>
<height>18</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Exchange 4-character locator instead of signal report. Provides q3-level sensitivities for the DX operator. Especially useful for 6m EME DXpeditions.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Q65 Pileup</string>
</property>
<attribute name="buttonGroup">
<string notr="true">special_op_activity_button_group</string>
</attribute>
</widget>
</item>
<item row="0" column="4">
<spacer name="horizontalSpacer_11">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="0">
<widget class="QRadioButton" name="rbWW_DIGI">
<property name="minimumSize">
<size>
<width>0</width>
<height>18</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;World-Wide Digi-mode contest&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="accessibleName">
<string>WW Digital Contest</string>
</property>
<property name="text">
<string>WW Digi Contest</string>
</property>
<attribute name="buttonGroup">
<string notr="true">special_op_activity_button_group</string>
</attribute>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="rbNA_VHF_Contest">
<property name="sizePolicy">
@ -3142,128 +3201,7 @@ Right click for insert and delete options.</string>
</attribute>
</widget>
</item>
<item row="5" column="6">
<layout class="QHBoxLayout" name="horizontalLayout_24">
<item>
<widget class="QCheckBox" name="cbContestName">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Call CQ with an individual contest name instead of TEST, RU, or WW. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>CQ with individual contest name</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_12">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_25">
<item>
<widget class="QLabel" name="labCN">
<property name="text">
<string>Contest name:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="Contest_Name">
<property name="maximumSize">
<size>
<width>70</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="maxLength">
<number>4</number>
</property>
<property name="cursorPosition">
<number>0</number>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QRadioButton" name="rbEU_VHF_Contest">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;European VHF+ contests requiring a signal report, serial number, and 6-character locator.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="accessibleName">
<string>EU VHF Contest</string>
</property>
<property name="text">
<string>EU VHF Contest</string>
</property>
<attribute name="buttonGroup">
<string notr="true">special_op_activity_button_group</string>
</attribute>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="lblOTPUrl">
<property name="text">
<string>OTP URL</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QRadioButton" name="rbHound">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;FT8 DXpedition mode: Hound operator calling the DX.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="accessibleName">
<string>Hound</string>
</property>
<property name="text">
<string>Hound</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">special_op_activity_button_group</string>
</attribute>
</widget>
</item>
<item row="4" column="6">
<widget class="QRadioButton" name="rbARRL_Digi">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;ARRL International Digital Contest&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>ARRL Digi Contest</string>
</property>
<attribute name="buttonGroup">
<string notr="true">special_op_activity_button_group</string>
</attribute>
</widget>
</item>
<item row="0" column="6">
<item row="0" column="3">
<layout class="QHBoxLayout" name="horizontalLayout_27" stretch="0,1,0,1">
<item>
<widget class="QCheckBox" name="cbSuperFox">
@ -3305,7 +3243,7 @@ Right click for insert and delete options.</string>
</property>
<property name="minimumSize">
<size>
<width>160</width>
<width>70</width>
<height>0</height>
</size>
</property>
@ -3319,81 +3257,187 @@ Right click for insert and delete options.</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;SuperFox operator must enter a valid key to enable transmission.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="maxLength">
<number>20</number>
<number>9</number>
</property>
<property name="alignment">
<set>Qt::AlignLeading</set>
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="6">
<layout class="QHBoxLayout" name="horizontalLayout_18" stretch="2,1,1">
<item row="0" column="2">
<spacer name="horizontalSpacer_11">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="0">
<widget class="QRadioButton" name="rbEU_VHF_Contest">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;European VHF+ contests requiring a signal report, serial number, and 6-character locator.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="accessibleName">
<string>EU VHF Contest</string>
</property>
<property name="text">
<string>EU VHF Contest</string>
</property>
<attribute name="buttonGroup">
<string notr="true">special_op_activity_button_group</string>
</attribute>
</widget>
</item>
<item row="0" column="0">
<widget class="QRadioButton" name="rbFox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;FT8 DXpedition mode: Fox (DXpedition) operator.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="accessibleName">
<string>Fox</string>
</property>
<property name="text">
<string>Fox</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">special_op_activity_button_group</string>
</attribute>
</widget>
</item>
<item row="1" column="0" colspan="4">
<layout class="QHBoxLayout" name="OTP_Layout" stretch="0,0,0,1,0,0,0,0,0,0,0,1">
<item>
<widget class="QRadioButton" name="rbRTTY_Roundup">
<widget class="QCheckBox" name="cbOTP">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;FT Roundup and similar contests. Exchange is US state, Canadian province, or &amp;quot;DX&amp;quot;.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="accessibleName">
<string>R T T Y Roundup</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Click to enable OTP method of Fox verification. Requires internet.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>FT Roundup</string>
<string>OTP</string>
</property>
<attribute name="buttonGroup">
<string notr="true">special_op_activity_button_group</string>
</attribute>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_10">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<spacer name="horizontalSpacer_11">
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QFormLayout" name="formLayout_17">
<item row="0" column="0">
<widget class="QLabel" name="labRTTY">
<property name="accessibleName">
<string>RTTY Roundup exchange</string>
</property>
<property name="text">
<string>FT RU Exch:</string>
</property>
<property name="buddy">
<cstring>RTTY_Exchange</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="RTTY_Exchange">
<property name="minimumSize">
<size>
<width>70</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;FT Roundup and similar contests. Exchange is US state, Canadian province, or &amp;quot;DX&amp;quot;.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>NJ</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
<widget class="QLabel" name="lblOTPUrl">
<property name="text">
<string>OTP URL</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="OTPUrl">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;URL used to verify OTP codes.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_15">
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="lblOTPEvery">
<property name="text">
<string>Interval</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="sbOTPinterval">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Interval at which the OTP messages are sent. Select 1 to sign every message.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="maximum">
<number>20</number>
</property>
<property name="value">
<number>1</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_17">
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="cbHideOTP">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Hide OTP messages in the Band Activity window.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Hide OTP messages</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_18">
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="lblOTPSeed">
<property name="text">
<string>OTP Key: </string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="OTPSeed">
<property name="minimumSize">
<size>
<width>70</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Fox's key to generate OTP Codes.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
</layout>
</item>
@ -3635,13 +3679,13 @@ Right click for insert and delete options.</string>
</connection>
</connections>
<buttongroups>
<buttongroup name="CAT_data_bits_button_group"/>
<buttongroup name="CAT_handshake_button_group"/>
<buttongroup name="split_mode_button_group"/>
<buttongroup name="TX_audio_source_button_group"/>
<buttongroup name="PTT_method_button_group"/>
<buttongroup name="TX_mode_button_group"/>
<buttongroup name="CAT_stop_bits_button_group"/>
<buttongroup name="special_op_activity_button_group"/>
<buttongroup name="PTT_method_button_group"/>
<buttongroup name="split_mode_button_group"/>
<buttongroup name="CAT_handshake_button_group"/>
<buttongroup name="TX_audio_source_button_group"/>
<buttongroup name="CAT_data_bits_button_group"/>
<buttongroup name="CAT_stop_bits_button_group"/>
</buttongroups>
</ui>

View File

@ -106,11 +106,11 @@ QString FoxVerifier::formatDecodeMessage(QDateTime ts, QString callsign, unsigne
QTime rx_time = ts.time();
QString hz=QString("%1").arg(hz_, 4, 10 ); // insert Hz
if (verify_message.endsWith(" VERIFIED")) {
return QString("%1 0 0.0 %2 ~ %3 Verified").arg(rx_time.toString("hhmmss")).arg(hz).arg(callsign);
return QString("%1 0 0.0 %2 ~ %3 verified").arg(rx_time.toString("hhmmss")).arg(hz).arg(callsign);
} else
if (verify_message.endsWith(" INVALID"))
{
return QString("%1 0 0.0 %2 ~ %3 Invalid").arg(rx_time.toString("hhmmss")).arg(hz).arg(callsign);
return QString("%1 0 0.0 %2 ~ %3 invalid").arg(rx_time.toString("hhmmss")).arg(hz).arg(callsign);
}
else
return QString{};

View File

@ -224,6 +224,7 @@ bool no_a7_decodes = false;
bool keep_frequency = false;
int m_Nslots0 {1};
int m_TxFreqFox {300};
bool filtered = false;
QSharedMemory mem_qmap("mem_qmap"); //Memory segment to be shared (optionally) with QMAP
struct {
@ -1174,7 +1175,7 @@ void MainWindow::on_the_minute ()
tx_watchdog (false);
}
update_foxLogWindow_rate(); // update the rate on the window
if ((!verified && ui->labDXped->isVisible()) or ui->labDXped->text()!="Super Hound")
if ((!verified && ui->labDXped->isVisible()) or !ui->labDXped->text().contains("Hound"))
ui->labDXped->setStyleSheet("QLabel {background-color: red; color: white;}");
verified = false;
}
@ -1947,6 +1948,7 @@ void MainWindow::fastSink(qint64 frames)
{
int k (frames);
bool decodeNow=false;
filtered = false;
if(k < m_k0) { //New sequence ?
memcpy(fast_green2,fast_green,4*703); //Copy fast_green[] to fast_green2[]
memcpy(fast_s2,fast_s,4*703*64); //Copy fast_s[] into fast_s2[]
@ -2225,7 +2227,10 @@ void MainWindow::on_autoButton_clicked (bool checked)
m_bAutoReply = false; // ready for next
m_bCallingCQ = true; // allows tail-enders to be picked up
}
if (!checked) m_bCallingCQ = false;
if (!checked) {
m_bCallingCQ = false;
filtered = false;
}
statusUpdate ();
m_bEchoTxOK=false;
if(m_mode=="Echo" and m_auto) {
@ -2494,15 +2499,22 @@ void MainWindow::keyPressEvent (QKeyEvent * e)
QMainWindow::keyPressEvent (e);
}
void MainWindow::handleVerifyMsg(int status, QDateTime ts, QString callsign, QString code, unsigned int hz, QString const &response) { (void)status;
void MainWindow::handleVerifyMsg(int status, QDateTime ts, QString callsign, QString code, unsigned int hz, QString const &response)
{
(void)status;
(void)code;
if (response.length() > 0) {
QString msg = FoxVerifier::formatDecodeMessage(ts, callsign, hz, response);
if (msg.length() > 0) {
// Hound label
if ((ui->labDXped->text().contains("Hound") && msg.contains(" verified"))) {
verified = true;
ui->labDXped->setStyleSheet("QLabel {background-color: #00ff00; color: black;}");
}
ui->decodedTextBrowser->displayDecodedText(DecodedText{msg}, m_config.my_callsign(), m_mode, m_config.DXCC(),
m_logBook, m_currentBand, m_config.ppfx());
write_all("Ck",msg);
}
}
}
LOG_INFO(QString("FoxVerifier response for [%1]: - [%2]").arg(callsign).arg(response).toStdString());
}
@ -2856,6 +2868,7 @@ void MainWindow::on_stopButton_clicked() //stopButton
m_bRefSpec=false;
}
stopWRTimer.stop(); // stop a running Tx3 timer
filtered = false;
}
void MainWindow::on_actionRelease_Notes_triggered ()
@ -4144,6 +4157,7 @@ void MainWindow::activeWorked(QString call, QString band)
void MainWindow::readFromStdout() //readFromStdout
{
bool bDisplayPoints = false;
filtered = false;
QString all_decodes;
if(m_ActiveStationsWidget!=NULL) {
bDisplayPoints=(m_mode=="FT4" or m_mode=="FT8") and
@ -4327,12 +4341,14 @@ void MainWindow::readFromStdout() //readFromStdout
callsign = otp_parts[0];
otp = otp_parts[1];
hz = lineparts[3].toInt();
if (m_config.HideOTP()) filtered = true;
} else
{
// split $VERIFY$ K8R 920749 into K8R and 920749
callsign = lineparts[6];
otp = lineparts[7];
hz = 750; // SF is 750
if (m_config.HideOTP()) filtered = true;
}
QDateTime verifyDateTime;
if (m_diskData) {
@ -4353,19 +4369,21 @@ void MainWindow::readFromStdout() //readFromStdout
}
#endif
{
if (ui->labDXped->text() == "Super Hound" && decodedtext0.mid(3, 18).contains(" verified")) {
if (ui->labDXped->text().contains("Hound") && decodedtext0.mid(3,18).contains(" verified")) {
verified = true;
write_all("Vf",decodedtext0.string());
ui->labDXped->setStyleSheet("QLabel {background-color: #00ff00; color: black;}");
} else {
if (decodedtext0.mid(4, 2).contains("00") or decodedtext0.mid(4, 2).contains("30")) verified = false;
if (m_specOp==SpecOp::HOUND && m_config.superFox() && (decodedtext0.mid(4,2).contains("00") or decodedtext0.mid(4,2).contains("30"))) verified = false;
}
if ((!verified && ui->labDXped->isVisible()) or ui->labDXped->text() != "Super Hound")
if ((!verified && ui->labDXped->isVisible()) or !ui->labDXped->text().contains("Hound"))
ui->labDXped->setStyleSheet("QLabel {background-color: red; color: white;}");
ui->decodedTextBrowser->displayDecodedText(decodedtext1, m_config.my_callsign(), m_mode, m_config.DXCC(),
m_logBook, m_currentBandPeriod, m_config.ppfx(),
ui->cbCQonly->isVisible() && ui->cbCQonly->isChecked(),
haveFSpread, fSpread, bDisplayPoints, m_points);
if (!filtered) {
ui->decodedTextBrowser->displayDecodedText(decodedtext1, m_config.my_callsign(), m_mode, m_config.DXCC(),
m_logBook, m_currentBandPeriod, m_config.ppfx(),
ui->cbCQonly->isVisible() && ui->cbCQonly->isChecked(),
haveFSpread, fSpread, bDisplayPoints, m_points);
}
if ((m_mode == "FT4" or m_mode == "FT8") and bDisplayPoints and decodedtext1.isStandardMessage()) {
QString deCall, deGrid;
decodedtext.deCallAndGrid(/*out*/deCall, deGrid);
@ -7084,6 +7102,7 @@ void MainWindow::on_logQSOButton_clicked() //Log QSO button
ui->TxFreqSpinBox->value(), m_noSuffix, m_xSent, m_xRcvd);
m_inQSOwith="";
stopWRTimer.stop(); // stop a running Tx3 timer
filtered = false;
}
void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call, QString const& grid
@ -8464,6 +8483,7 @@ void MainWindow::on_stopTxButton_clicked() //Stop Tx
m_bAutoReply = false; // ready for next
m_maxPoints=-1;
stopWRTimer.stop(); // stop a running Tx3 timer
filtered = false;
}
void MainWindow::rigOpen ()