Add optional highlighting of messages with 73 or RR73

This commit is contained in:
Uwe Risse 2022-01-11 14:35:15 +01:00
parent 947ab4eb25
commit 3a765e3b12
4 changed files with 37 additions and 21 deletions

View File

@ -593,6 +593,7 @@ private:
bool highlight_by_mode_;
bool highlight_only_fields_;
bool include_WAE_entities_;
bool highlight_73_;
int LotW_days_since_upload_;
TransceiverFactory::ParameterPack rig_params_;
@ -791,6 +792,7 @@ DecodeHighlightingModel const& Configuration::decode_highlighting () const {retu
bool Configuration::highlight_by_mode () const {return m_->highlight_by_mode_;}
bool Configuration::highlight_only_fields () const {return m_->highlight_only_fields_;}
bool Configuration::include_WAE_entities () const {return m_->include_WAE_entities_;}
bool Configuration::highlight_73 () const {return m_->highlight_73_;}
bool Configuration::highlight_DXcall () const {return m_->highlight_DXcall_;}
bool Configuration::clear_DXcall () const {return m_->clear_DXcall_;}
bool Configuration::highlight_DXgrid () const {return m_->highlight_DXgrid_;}
@ -1016,6 +1018,7 @@ Configuration::impl::impl (Configuration * self, QNetworkAccessManager * network
, highlight_by_mode_ {false}
, highlight_only_fields_ {false}
, include_WAE_entities_ {false}
, highlight_73_ {false}
, LotW_days_since_upload_ {0}
, last_port_type_ {TransceiverFactory::Capabilities::none}
, rig_is_dummy_ {false}
@ -1429,6 +1432,7 @@ void Configuration::impl::initialize_models ()
ui_->highlight_by_mode_check_box->setChecked (highlight_by_mode_);
ui_->only_fields_check_box->setChecked (highlight_only_fields_);
ui_->include_WAE_check_box->setChecked (include_WAE_entities_);
ui_->highlight_73_check_box->setChecked (highlight_73_);
ui_->LotW_days_since_upload_spin_box->setValue (LotW_days_since_upload_);
ui_->cbHighlightDXcall->setChecked(highlight_DXcall_);
ui_->cbClearDXcall->setChecked(clear_DXcall_);
@ -1528,6 +1532,7 @@ void Configuration::impl::read_settings ()
highlight_by_mode_ = settings_->value("HighlightByMode", false).toBool ();
highlight_only_fields_ = settings_->value("OnlyFieldsSought", false).toBool ();
include_WAE_entities_ = settings_->value("IncludeWAEEntities", false).toBool ();
highlight_73_ = settings_->value("Highlight73", false).toBool ();
LotW_days_since_upload_ = settings_->value ("LotWDaysSinceLastUpload", 365).toInt ();
lotw_users_.set_age_constraint (LotW_days_since_upload_);
@ -1666,6 +1671,7 @@ void Configuration::impl::write_settings ()
settings_->setValue ("HighlightByMode", highlight_by_mode_);
settings_->setValue ("OnlyFieldsSought", highlight_only_fields_);
settings_->setValue ("IncludeWAEEntities", include_WAE_entities_);
settings_->setValue ("Highlight73", highlight_73_);
settings_->setValue ("LotWDaysSinceLastUpload", LotW_days_since_upload_);
settings_->setValue ("toRTTY", log_as_RTTY_);
settings_->setValue ("dBtoComments", report_in_comments_);
@ -2207,6 +2213,7 @@ void Configuration::impl::accept ()
highlight_by_mode_ = ui_->highlight_by_mode_check_box->isChecked ();
highlight_only_fields_ = ui_->only_fields_check_box->isChecked ();
include_WAE_entities_ = ui_->include_WAE_check_box->isChecked ();
highlight_73_ = ui_->highlight_73_check_box->isChecked ();
LotW_days_since_upload_ = ui_->LotW_days_since_upload_spin_box->value ();
lotw_users_.set_age_constraint (LotW_days_since_upload_);

View File

@ -181,6 +181,7 @@ public:
bool highlight_by_mode () const;
bool highlight_only_fields () const;
bool include_WAE_entities () const;
bool highlight_73 () const;
void setSpecial_Hound();
void setSpecial_Fox();
void setSpecial_None();

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>554</width>
<height>560</height>
<height>599</height>
</rect>
</property>
<property name="windowTitle">
@ -17,7 +17,7 @@
<item>
<widget class="QTabWidget" name="configuration_tabs">
<property name="currentIndex">
<number>0</number>
<number>6</number>
</property>
<widget class="QWidget" name="general_tab">
<attribute name="title">
@ -2330,6 +2330,23 @@ Right click for insert and delete options.</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="include_WAE_check_box">
<property name="text">
<string>Include extra WAE entities</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="only_fields_check_box">
<property name="toolTip">
<string>Check to for grid highlighting to only apply to unworked grid fields</string>
</property>
<property name="text">
<string>Only grid Fields sought</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="DecodeHighlightingListView" name="highlighting_list_view">
<property name="sizePolicy">
@ -2377,20 +2394,10 @@ Right click for insert and delete options.</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="include_WAE_check_box">
<item row="5" column="0">
<widget class="QCheckBox" name="highlight_73_check_box">
<property name="text">
<string>Include extra WAE entities</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="only_fields_check_box">
<property name="toolTip">
<string>Check to for grid highlighting to only apply to unworked grid fields</string>
</property>
<property name="text">
<string>Only grid Fields sought</string>
<string>Highlight also messages with 73 or RR73</string>
</property>
</widget>
</item>
@ -3262,12 +3269,12 @@ Right click for insert and delete options.</string>
</connections>
<buttongroups>
<buttongroup name="PTT_method_button_group"/>
<buttongroup name="TX_mode_button_group"/>
<buttongroup name="split_mode_button_group"/>
<buttongroup name="CAT_handshake_button_group"/>
<buttongroup name="special_op_activity_button_group"/>
<buttongroup name="split_mode_button_group"/>
<buttongroup name="TX_mode_button_group"/>
<buttongroup name="CAT_data_bits_button_group"/>
<buttongroup name="TX_audio_source_button_group"/>
<buttongroup name="CAT_stop_bits_button_group"/>
<buttongroup name="special_op_activity_button_group"/>
<buttongroup name="CAT_data_bits_button_group"/>
</buttongroups>
</ui>

View File

@ -404,6 +404,7 @@ void DisplayText::displayDecodedText(DecodedText const& decodedText, QString con
QColor bg;
QColor fg;
bool CQcall = false;
auto is_73 = decodedText.messageWords().filter (QRegularExpression {"^(73|RR73)$"}).size();
if (decodedText.string ().contains (" CQ ")
|| decodedText.string ().contains (" CQDX ")
|| decodedText.string ().contains (" QRZ "))
@ -446,14 +447,14 @@ void DisplayText::displayDecodedText(DecodedText const& decodedText, QString con
message = message.left (ap_pos).trimmed ();
}
m_CQPriority="";
if (CQcall)
if (CQcall || (is_73 && (m_config->highlight_73 ())))
{
if (displayDXCCEntity)
{
// if enabled add the DXCC entity and B4 status to the end of the
// preformated text line t1
auto currentMode = mode;
message = appendWorkedB4 (message, decodedText.CQersCall(), dxGrid, &bg, &fg
message = appendWorkedB4 (message, dxCall, dxGrid, &bg, &fg
, logBook, currentBand, currentMode, extra);
}
else