Added ability to customize the text which is highlighted in the call activity and band activity
This commit is contained in:
parent
6aad422cd8
commit
925aade1a2
@ -591,6 +591,7 @@ private:
|
||||
QStringList my_groups_;
|
||||
QStringList auto_whitelist_;
|
||||
QStringList auto_blacklist_;
|
||||
QStringList highlight_words_;
|
||||
QString eot_;
|
||||
QString my_info_;
|
||||
QString cq_;
|
||||
@ -1010,6 +1011,10 @@ QSet<QString> Configuration::auto_blacklist() const {
|
||||
return QSet<QString>::fromList(m_->auto_blacklist_);
|
||||
}
|
||||
|
||||
QSet<QString> Configuration::highlight_words() const {
|
||||
return QSet<QString>::fromList(m_->highlight_words_);
|
||||
}
|
||||
|
||||
QString Configuration::eot() const {
|
||||
return m_->eot_;
|
||||
}
|
||||
@ -1406,6 +1411,7 @@ void Configuration::impl::initialize_models ()
|
||||
ui_->groups_line_edit->setText(my_groups_.join(", "));
|
||||
ui_->auto_whitelist_line_edit->setText(auto_whitelist_.join(", "));
|
||||
ui_->auto_blacklist_line_edit->setText(auto_blacklist_.join(", "));
|
||||
ui_->highlightTextEdit->setText(highlight_words_.join(", "));
|
||||
ui_->eot_line_edit->setText(eot_.trimmed().left(2));
|
||||
ui_->info_message_line_edit->setText (my_info_.toUpper());
|
||||
ui_->cq_message_line_edit->setText(cq_.toUpper().replace("CQCQCQ", "CQ CQ CQ"));
|
||||
@ -1560,6 +1566,7 @@ void Configuration::impl::read_settings ()
|
||||
my_groups_ = settings_->value("MyGroups", QStringList{}).toStringList();
|
||||
auto_whitelist_ = settings_->value("AutoWhitelist", QStringList{}).toStringList();
|
||||
auto_blacklist_ = settings_->value("AutoBlacklist", QStringList{}).toStringList();
|
||||
highlight_words_ = settings_->value("HighlightWords", QStringList{"CQ"}).toStringList();
|
||||
callsign_aging_ = settings_->value ("CallsignAging", 0).toInt ();
|
||||
activity_aging_ = settings_->value ("ActivityAging", 2).toInt ();
|
||||
eot_ = settings_->value("EOTCharacter", QString{"\u2662"}).toString().trimmed().left(2);
|
||||
@ -1830,6 +1837,7 @@ void Configuration::impl::write_settings ()
|
||||
settings_->setValue ("MyGroups", my_groups_);
|
||||
settings_->setValue ("AutoWhitelist", auto_whitelist_);
|
||||
settings_->setValue ("AutoBlacklist", auto_blacklist_);
|
||||
settings_->setValue ("HighlightWords", highlight_words_);
|
||||
settings_->setValue ("EOTCharacter", eot_);
|
||||
settings_->setValue ("MyInfo", my_info_);
|
||||
settings_->setValue ("CQMessage", cq_);
|
||||
@ -2125,7 +2133,7 @@ QStringList splitGroups(QString groupsString, bool filter){
|
||||
return groups;
|
||||
}
|
||||
|
||||
QStringList splitCalls(QString callsString){
|
||||
QStringList splitWords(QString callsString){
|
||||
QStringList calls;
|
||||
if(callsString.isEmpty()){
|
||||
return calls;
|
||||
@ -2159,7 +2167,7 @@ bool Configuration::impl::validate ()
|
||||
}
|
||||
}
|
||||
|
||||
foreach(auto call, splitCalls(ui_->auto_whitelist_line_edit->text().toUpper().trimmed())){
|
||||
foreach(auto call, splitWords(ui_->auto_whitelist_line_edit->text().toUpper().trimmed())){
|
||||
if(!Varicode::isValidCallsign(call, nullptr)){
|
||||
MessageBox::critical_message (this, QString("%1 is not a valid callsign to whitelist").arg(call));
|
||||
return false;
|
||||
@ -2429,8 +2437,9 @@ void Configuration::impl::accept ()
|
||||
my_callsign_ = ui_->callsign_line_edit->text ().toUpper().trimmed();
|
||||
my_grid_ = ui_->grid_line_edit->text ().toUpper().trimmed();
|
||||
my_groups_ = splitGroups(ui_->groups_line_edit->text().toUpper().trimmed(), true);
|
||||
auto_whitelist_ = splitCalls(ui_->auto_whitelist_line_edit->text().toUpper().trimmed());
|
||||
auto_blacklist_ = splitCalls(ui_->auto_blacklist_line_edit->text().toUpper().trimmed());
|
||||
auto_whitelist_ = splitWords(ui_->auto_whitelist_line_edit->text().toUpper().trimmed());
|
||||
auto_blacklist_ = splitWords(ui_->auto_blacklist_line_edit->text().toUpper().trimmed());
|
||||
highlight_words_ = splitWords(ui_->highlightTextEdit->toPlainText().toUpper().trimmed());
|
||||
cq_ = ui_->cq_message_line_edit->text().toUpper();
|
||||
reply_ = ui_->reply_message_line_edit->text().toUpper();
|
||||
eot_ = ui_->eot_line_edit->text().trimmed().left(2);
|
||||
|
@ -102,6 +102,7 @@ public:
|
||||
void removeGroup(QString const &group);
|
||||
QSet<QString> auto_whitelist() const;
|
||||
QSet<QString> auto_blacklist() const;
|
||||
QSet<QString> highlight_words() const;
|
||||
int activity_aging() const;
|
||||
int callsign_aging() const;
|
||||
QString eot() const;
|
||||
|
431
Configuration.ui
431
Configuration.ui
@ -23,7 +23,7 @@
|
||||
<string>Select tab to change configuration parameters.</string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>7</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="general_tab">
|
||||
<attribute name="title">
|
||||
@ -36,7 +36,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget_2">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="stationTab">
|
||||
<attribute name="title">
|
||||
@ -278,7 +278,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>724</width>
|
||||
<width>615</width>
|
||||
<height>808</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -3229,7 +3229,7 @@ QListView::item:hover {
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents_8">
|
||||
<widget class="QWidget" name="scrollAreaContentsWidget_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@ -3238,209 +3238,272 @@ QListView::item:hover {
|
||||
<height>378</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_15">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_14">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="4" column="1">
|
||||
<widget class="QPushButton" name="tableForegroundButton">
|
||||
<property name="text">
|
||||
<string>Foreground Color</string>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_15">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="labCQ">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel{background-color: #66ff66}</string>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>K1ABC</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="pbCQmsg">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>CQ Background</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QPushButton" name="tableFontButton">
|
||||
<property name="text">
|
||||
<string>Font</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="tableSelectionBackgroundLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel{background-color: #3498db}<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item row="6" column="1">
|
||||
<widget class="QPushButton" name="tableFontButton">
|
||||
<property name="text">
|
||||
<string>Font</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="labCQ">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel{background-color: #66ff66}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>K1ABC</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QPushButton" name="tableForegroundButton">
|
||||
<property name="text">
|
||||
<string>Foreground Color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="tableSelectedRowBackgroundButton">
|
||||
<property name="text">
|
||||
<string>Selected Row Background</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="tableSelectionBackgroundLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel{background-color: #3498db}<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<widget name="__qt_fake_top_level">
|
||||
<widget class="QLabel" name="labCQ">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>12</x>
|
||||
<y>32</y>
|
||||
<width>302</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel{background-color: #66ff66}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>K1ABC</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<widget name="__qt_fake_top_level">
|
||||
<widget class="QLabel" name="labCQ">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>12</x>
|
||||
<y>32</y>
|
||||
<width>302</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel{background-color: #66ff66}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>K1ABC</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
</ui>
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>K1ABC</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="labMyCall">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel{background-color: #ff6666}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>K1ABC</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="tableBackgroundLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel{background-color: white}<?xml version="1.0" encoding="UTF-8"?>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>K1ABC</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QPushButton" name="pbMyCall">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Directed Messages Background</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="tableBackgroundButton">
|
||||
<property name="text">
|
||||
<string>Table Background</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="labMyCall">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel{background-color: #ff6666}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>K1ABC</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="tableBackgroundLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel{background-color: white}<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<widget name="__qt_fake_top_level">
|
||||
<widget class="QLabel" name="labCQ">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>12</x>
|
||||
<y>32</y>
|
||||
<width>302</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel{background-color: #66ff66}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>K1ABC</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<widget name="__qt_fake_top_level">
|
||||
<widget class="QLabel" name="labCQ">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>12</x>
|
||||
<y>32</y>
|
||||
<width>302</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel{background-color: #66ff66}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>K1ABC</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
</ui>
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>K1ABC</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>K1ABC</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="pbCQmsg">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Highlight Background</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QPushButton" name="pbMyCall">
|
||||
<property name="minimumSize">
|
||||
<item>
|
||||
<spacer name="verticalSpacer_11">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>0</height>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_25">
|
||||
<property name="text">
|
||||
<string>Directed Messages Background</string>
|
||||
<string>Highlight Activity Containing These Words (comma separated):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="tableSelectedRowBackgroundButton">
|
||||
<property name="text">
|
||||
<string>Selected Row Background</string>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="highlightTextEdit">
|
||||
<property name="html">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">CQ</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="tableBackgroundButton">
|
||||
<property name="text">
|
||||
<string>Table Background</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@ -3448,7 +3511,7 @@ QListView::item:hover {
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
<height>348</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
@ -4203,12 +4266,6 @@ soundcard changes</string>
|
||||
<tabstop>font_push_button</tabstop>
|
||||
<tabstop>tabWidget</tabstop>
|
||||
<tabstop>scrollArea_8</tabstop>
|
||||
<tabstop>tableForegroundButton</tabstop>
|
||||
<tabstop>pbCQmsg</tabstop>
|
||||
<tabstop>tableFontButton</tabstop>
|
||||
<tabstop>pbMyCall</tabstop>
|
||||
<tabstop>tableSelectedRowBackgroundButton</tabstop>
|
||||
<tabstop>tableBackgroundButton</tabstop>
|
||||
<tabstop>scrollArea_9</tabstop>
|
||||
<tabstop>txFontButton</tabstop>
|
||||
<tabstop>rxFontButton</tabstop>
|
||||
@ -4297,12 +4354,12 @@ soundcard changes</string>
|
||||
</connection>
|
||||
</connections>
|
||||
<buttongroups>
|
||||
<buttongroup name="TX_audio_source_button_group"/>
|
||||
<buttongroup name="CAT_stop_bits_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="TX_mode_button_group"/>
|
||||
<buttongroup name="CAT_data_bits_button_group"/>
|
||||
<buttongroup name="CAT_stop_bits_button_group"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
@ -11536,30 +11536,6 @@ void MainWindow::displayBandActivity() {
|
||||
}
|
||||
textItem->setTextAlignment(flag);
|
||||
|
||||
if (
|
||||
Varicode::startsWithCQ(text.last()) ||
|
||||
text.last().contains(QRegularExpression {"\\b(CQCQCQ|CQ)\\b"})
|
||||
){
|
||||
offsetItem->setBackground(QBrush(m_config.color_CQ()));
|
||||
tdriftItem->setBackground(QBrush(m_config.color_CQ()));
|
||||
ageItem->setBackground(QBrush(m_config.color_CQ()));
|
||||
snrItem->setBackground(QBrush(m_config.color_CQ()));
|
||||
textItem->setBackground(QBrush(m_config.color_CQ()));
|
||||
}
|
||||
|
||||
bool isDirectedAllCall = false;
|
||||
|
||||
// TODO: jsherer - there's a potential here for a previous allcall to poison the highlight.
|
||||
if (
|
||||
(isDirectedOffset(offset, &isDirectedAllCall) && !isDirectedAllCall) || isMyCallIncluded(text.last())
|
||||
) {
|
||||
offsetItem->setBackground(QBrush(m_config.color_MyCall()));
|
||||
tdriftItem->setBackground(QBrush(m_config.color_MyCall()));
|
||||
ageItem->setBackground(QBrush(m_config.color_MyCall()));
|
||||
snrItem->setBackground(QBrush(m_config.color_MyCall()));
|
||||
textItem->setBackground(QBrush(m_config.color_MyCall()));
|
||||
}
|
||||
|
||||
ui->tableWidgetRXAll->setItem(row, col++, textItem);
|
||||
|
||||
if (isOffsetSelected) {
|
||||
@ -11567,6 +11543,21 @@ void MainWindow::displayBandActivity() {
|
||||
ui->tableWidgetRXAll->item(row, i)->setSelected(true);
|
||||
}
|
||||
}
|
||||
|
||||
bool isDirectedAllCall = false;
|
||||
if(
|
||||
(isDirectedOffset(offset, &isDirectedAllCall) && !isDirectedAllCall) || isMyCallIncluded(text.last())
|
||||
){
|
||||
for(int i = 0; i < ui->tableWidgetRXAll->columnCount(); i++){
|
||||
ui->tableWidgetRXAll->item(row, i)->setBackground(QBrush(m_config.color_MyCall()));
|
||||
}
|
||||
}
|
||||
|
||||
if (!text.isEmpty() && m_config.highlight_words().intersects(QSet<QString>::fromList(text.last().replace(":", " ").replace(">"," ").split(" ")))){
|
||||
for(int i = 0; i < ui->tableWidgetRXAll->columnCount(); i++){
|
||||
ui->tableWidgetRXAll->item(row, i)->setBackground(QBrush(m_config.color_CQ()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -11863,6 +11854,12 @@ void MainWindow::displayCallActivity() {
|
||||
ui->tableWidgetCalls->item(row, i)->setSelected(true);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_config.highlight_words().contains(call)){
|
||||
for(int i = 0; i < ui->tableWidgetCalls->columnCount(); i++){
|
||||
ui->tableWidgetCalls->item(row, i)->setBackground(QBrush(m_config.color_CQ()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set table color
|
||||
|
Loading…
Reference in New Issue
Block a user