Added secondary highlight coloring to settings
This commit is contained in:
parent
2c28d6f6f7
commit
378bbcd6e3
@ -467,7 +467,8 @@ private:
|
||||
Q_SLOT void on_calibration_slope_ppm_spin_box_valueChanged (double);
|
||||
Q_SLOT void handle_transceiver_update (TransceiverState const&, unsigned sequence_number);
|
||||
Q_SLOT void handle_transceiver_failure (QString const& reason);
|
||||
Q_SLOT void on_pbCQmsg_clicked();
|
||||
Q_SLOT void on_primaryHighlightButton_clicked();
|
||||
Q_SLOT void on_secondaryHighlightButton_clicked();
|
||||
Q_SLOT void on_pbMyCall_clicked();
|
||||
Q_SLOT void on_tableBackgroundButton_clicked();
|
||||
Q_SLOT void on_tableSelectedRowBackgroundButton_clicked();
|
||||
@ -578,15 +579,18 @@ private:
|
||||
QStringList my_groups_;
|
||||
QStringList auto_whitelist_;
|
||||
QStringList auto_blacklist_;
|
||||
QStringList highlight_words_;
|
||||
QStringList primary_highlight_words_;
|
||||
QStringList secondary_highlight_words_;
|
||||
QString eot_;
|
||||
QString my_info_;
|
||||
QString cq_;
|
||||
QString reply_;
|
||||
int callsign_aging_;
|
||||
int activity_aging_;
|
||||
QColor color_cq_;
|
||||
QColor next_color_cq_;
|
||||
QColor color_primary_highlight_;
|
||||
QColor next_color_primary_highlight_;
|
||||
QColor color_secondary_highlight_;
|
||||
QColor next_color_secondary_highlight_;
|
||||
QColor color_mycall_;
|
||||
QColor next_color_mycall_;
|
||||
|
||||
@ -722,7 +726,8 @@ QString Configuration::my_callsign () const {return m_->my_callsign_;}
|
||||
QColor Configuration::color_table_background() const { return m_->color_table_background_; }
|
||||
QColor Configuration::color_table_highlight() const { return m_->color_table_highlight_; }
|
||||
QColor Configuration::color_table_foreground() const { return m_->color_table_foreground_; }
|
||||
QColor Configuration::color_CQ () const {return m_->color_cq_;}
|
||||
QColor Configuration::color_primary_highlight () const {return m_->color_primary_highlight_;}
|
||||
QColor Configuration::color_secondary_highlight () const {return m_->color_secondary_highlight_;}
|
||||
QColor Configuration::color_MyCall () const {return m_->color_mycall_;}
|
||||
QColor Configuration::color_rx_background () const {return m_->color_rx_background_;}
|
||||
QColor Configuration::color_rx_foreground () const {return m_->color_rx_foreground_;}
|
||||
@ -995,8 +1000,12 @@ 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_);
|
||||
QSet<QString> Configuration::primary_highlight_words() const {
|
||||
return QSet<QString>::fromList(m_->primary_highlight_words_);
|
||||
}
|
||||
|
||||
QSet<QString> Configuration::secondary_highlight_words() const {
|
||||
return QSet<QString>::fromList(m_->secondary_highlight_words_);
|
||||
}
|
||||
|
||||
QString Configuration::eot() const {
|
||||
@ -1395,16 +1404,19 @@ 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_->primaryHighlightLineEdit->setText(primary_highlight_words_.join(", "));
|
||||
ui_->secondaryHighlightLineEdit->setText(secondary_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"));
|
||||
ui_->reply_message_line_edit->setText (reply_.toUpper());
|
||||
ui_->use_dynamic_grid->setChecked(use_dynamic_info_);
|
||||
|
||||
ui_->tableForegroundLabel->setStyleSheet(QString("background: %1; color: %2").arg(next_color_table_background_.name()).arg(next_color_table_foreground_.name()));
|
||||
ui_->tableBackgroundLabel->setStyleSheet(QString("background: %1; color: %2").arg(next_color_table_background_.name()).arg(next_color_table_foreground_.name()));
|
||||
ui_->tableSelectionBackgroundLabel->setStyleSheet(QString("background: %1; color: %2").arg(next_color_table_highlight_.name()).arg(next_color_table_foreground_.name()));
|
||||
ui_->labCQ->setStyleSheet(QString("background: %1; color: %2").arg(next_color_cq_.name()).arg(next_color_table_foreground_.name()));
|
||||
ui_->primaryHighlightLabel->setStyleSheet(QString("background: %1; color: %2").arg(next_color_primary_highlight_.name()).arg(next_color_table_foreground_.name()));
|
||||
ui_->secondaryHighlightLabel->setStyleSheet(QString("background: %1; color: %2").arg(next_color_secondary_highlight_.name()).arg(next_color_table_foreground_.name()));
|
||||
ui_->labMyCall->setStyleSheet(QString("background: %1; color: %2").arg(next_color_mycall_.name()).arg(next_color_table_foreground_.name()));
|
||||
|
||||
ui_->rxLabel->setStyleSheet(QString("background: %1; color: %2").arg(color_rx_background_.name()).arg(color_rx_foreground_.name()));
|
||||
@ -1547,14 +1559,16 @@ 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();
|
||||
primary_highlight_words_ = settings_->value("PrimaryHighlightWords", QStringList{"CQ"}).toStringList();
|
||||
secondary_highlight_words_ = settings_->value("SecondaryHighlightWords", QStringList{}).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);
|
||||
my_info_ = settings_->value("MyInfo", QString {}).toString();
|
||||
cq_ = settings_->value("CQMessage", QString {"CQ CQ CQ <MYGRID4>"}).toString();
|
||||
reply_ = settings_->value("Reply", QString {"HW CPY?"}).toString();
|
||||
next_color_cq_ = color_cq_ = settings_->value("colorCQ","#66ff66").toString();
|
||||
next_color_primary_highlight_ = color_primary_highlight_ = settings_->value("colorPrimary", settings_->value("colorCQ","#66ff66").toString()).toString();
|
||||
next_color_secondary_highlight_ = color_secondary_highlight_ = settings_->value("colorSecondary","#ffff66").toString();
|
||||
next_color_mycall_ = color_mycall_ = settings_->value("colorMyCall","#ff6666").toString();
|
||||
next_color_rx_background_ = color_rx_background_ = settings_->value("color_rx_background","#ffeaa7").toString();
|
||||
next_color_rx_foreground_ = color_rx_foreground_ = settings_->value("color_rx_foreground","#000000").toString();
|
||||
@ -1815,14 +1829,16 @@ 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 ("PrimaryHighlightWords", primary_highlight_words_);
|
||||
settings_->setValue ("SecondaryHighlightWords", secondary_highlight_words_);
|
||||
settings_->setValue ("EOTCharacter", eot_);
|
||||
settings_->setValue ("MyInfo", my_info_);
|
||||
settings_->setValue ("CQMessage", cq_);
|
||||
settings_->setValue ("Reply", reply_);
|
||||
settings_->setValue ("CallsignAging", callsign_aging_);
|
||||
settings_->setValue ("ActivityAging", activity_aging_);
|
||||
settings_->setValue("colorCQ",color_cq_);
|
||||
settings_->setValue("colorCQ",color_primary_highlight_);
|
||||
settings_->setValue("colorSecondary",color_secondary_highlight_);
|
||||
settings_->setValue("colorMyCall",color_mycall_);
|
||||
settings_->setValue("color_rx_background",color_rx_background_);
|
||||
settings_->setValue("color_rx_foreground",color_rx_foreground_);
|
||||
@ -2315,7 +2331,8 @@ void Configuration::impl::accept ()
|
||||
Q_EMIT self_->table_font_changed (table_font_);
|
||||
}
|
||||
|
||||
color_cq_ = next_color_cq_;
|
||||
color_primary_highlight_ = next_color_primary_highlight_;
|
||||
color_secondary_highlight_ = next_color_secondary_highlight_;
|
||||
color_mycall_ = next_color_mycall_;
|
||||
color_rx_background_ = next_color_rx_background_;
|
||||
color_rx_foreground_ = next_color_rx_foreground_;
|
||||
@ -2414,7 +2431,8 @@ void Configuration::impl::accept ()
|
||||
my_groups_ = splitGroups(ui_->groups_line_edit->text().toUpper().trimmed(), true);
|
||||
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());
|
||||
primary_highlight_words_ = splitWords(ui_->primaryHighlightLineEdit->text().toUpper().trimmed());
|
||||
secondary_highlight_words_ = splitWords(ui_->secondaryHighlightLineEdit->text().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);
|
||||
@ -2581,7 +2599,8 @@ void Configuration::impl::on_tableFontButton_clicked ()
|
||||
, QFontDialog::DontUseNativeDialog
|
||||
#endif
|
||||
);
|
||||
ui_->tableFontButton->setText(QString("Table Font (%1 %2)").arg(next_table_font_.family()).arg(next_table_font_.pointSize()));
|
||||
|
||||
ui_->tableFontButton->setText(QString("Font (%1 %2)").arg(next_table_font_.family()).arg(next_table_font_.pointSize()));
|
||||
}
|
||||
|
||||
|
||||
@ -2606,13 +2625,23 @@ QColor getColor(QColor initial, QWidget *parent, QString title){
|
||||
}
|
||||
}
|
||||
|
||||
void Configuration::impl::on_pbCQmsg_clicked()
|
||||
void Configuration::impl::on_primaryHighlightButton_clicked()
|
||||
{
|
||||
auto new_color = getColor(next_color_cq_, this, "CQ Messages Color");
|
||||
auto new_color = getColor(next_color_primary_highlight_, this, "Primary Highlight Color");
|
||||
if (new_color.isValid ())
|
||||
{
|
||||
next_color_cq_ = new_color;
|
||||
ui_->labCQ->setStyleSheet(QString("background: %1; color: %2").arg(next_color_cq_.name()).arg(next_color_table_foreground_.name()));
|
||||
next_color_primary_highlight_ = new_color;
|
||||
ui_->primaryHighlightLabel->setStyleSheet(QString("background: %1; color: %2").arg(next_color_primary_highlight_.name()).arg(next_color_table_foreground_.name()));
|
||||
}
|
||||
}
|
||||
|
||||
void Configuration::impl::on_secondaryHighlightButton_clicked()
|
||||
{
|
||||
auto new_color = getColor(next_color_secondary_highlight_, this, "Secondary Highlight Color");
|
||||
if (new_color.isValid ())
|
||||
{
|
||||
next_color_secondary_highlight_ = new_color;
|
||||
ui_->secondaryHighlightLabel->setStyleSheet(QString("background: %1; color: %2").arg(next_color_secondary_highlight_.name()).arg(next_color_table_foreground_.name()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2632,6 +2661,7 @@ void Configuration::impl::on_tableBackgroundButton_clicked()
|
||||
if (new_color.isValid ())
|
||||
{
|
||||
next_color_table_background_ = new_color;
|
||||
ui_->tableForegroundLabel->setStyleSheet(QString("background: %1; color: %2").arg(next_color_table_background_.name()).arg(next_color_table_foreground_.name()));
|
||||
ui_->tableBackgroundLabel->setStyleSheet(QString("background: %1; color: %2").arg(next_color_table_background_.name()).arg(next_color_table_foreground_.name()));
|
||||
}
|
||||
}
|
||||
@ -2652,9 +2682,11 @@ void Configuration::impl::on_tableForegroundButton_clicked()
|
||||
if (new_color.isValid ())
|
||||
{
|
||||
next_color_table_foreground_ = new_color;
|
||||
ui_->tableForegroundLabel->setStyleSheet(QString("background: %1; color: %2").arg(next_color_table_background_.name()).arg(next_color_table_foreground_.name()));
|
||||
ui_->tableBackgroundLabel->setStyleSheet(QString("background: %1; color: %2").arg(next_color_table_background_.name()).arg(next_color_table_foreground_.name()));
|
||||
ui_->tableSelectionBackgroundLabel->setStyleSheet(QString("background: %1; color: %2").arg(next_color_table_highlight_.name()).arg(next_color_table_foreground_.name()));
|
||||
ui_->labCQ->setStyleSheet(QString("background: %1; color: %2").arg(next_color_cq_.name()).arg(next_color_table_foreground_.name()));
|
||||
ui_->primaryHighlightLabel->setStyleSheet(QString("background: %1; color: %2").arg(next_color_primary_highlight_.name()).arg(next_color_table_foreground_.name()));
|
||||
ui_->secondaryHighlightLabel->setStyleSheet(QString("background: %1; color: %2").arg(next_color_secondary_highlight_.name()).arg(next_color_table_foreground_.name()));
|
||||
ui_->labMyCall->setStyleSheet(QString("background: %1; color: %2").arg(next_color_mycall_.name()).arg(next_color_table_foreground_.name()));
|
||||
}
|
||||
}
|
||||
|
@ -102,7 +102,8 @@ public:
|
||||
void removeGroup(QString const &group);
|
||||
QSet<QString> auto_whitelist() const;
|
||||
QSet<QString> auto_blacklist() const;
|
||||
QSet<QString> highlight_words() const;
|
||||
QSet<QString> primary_highlight_words() const;
|
||||
QSet<QString> secondary_highlight_words() const;
|
||||
int activity_aging() const;
|
||||
int callsign_aging() const;
|
||||
QString eot() const;
|
||||
@ -203,7 +204,8 @@ public:
|
||||
QColor color_table_background() const;
|
||||
QColor color_table_highlight() const;
|
||||
QColor color_table_foreground() const;
|
||||
QColor color_CQ () const;
|
||||
QColor color_primary_highlight () const;
|
||||
QColor color_secondary_highlight () const;
|
||||
QColor color_MyCall () const;
|
||||
QColor color_rx_background () const;
|
||||
QColor color_rx_foreground () const;
|
||||
|
453
Configuration.ui
453
Configuration.ui
@ -23,7 +23,7 @@
|
||||
<string>Select tab to change configuration parameters.</string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="general_tab">
|
||||
<attribute name="title">
|
||||
@ -3037,8 +3037,8 @@ QListView::item:hover {
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>738</width>
|
||||
<height>378</height>
|
||||
<width>724</width>
|
||||
<height>387</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_14">
|
||||
@ -3065,149 +3065,17 @@ QListView::item:hover {
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="6" column="1">
|
||||
<item row="11" column="1">
|
||||
<widget class="QLineEdit" name="secondaryHighlightLineEdit"/>
|
||||
</item>
|
||||
<item row="1" 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/>
|
||||
</ui>
|
||||
</string>
|
||||
</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>
|
||||
@ -3257,8 +3125,8 @@ QListView::item:hover {
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="pbCQmsg">
|
||||
<item row="5" column="1">
|
||||
<widget class="QPushButton" name="pbMyCall">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
@ -3266,19 +3134,285 @@ QListView::item:hover {
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Highlight Background</string>
|
||||
<string>Directed Messages Background</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="primaryHighlightLabel">
|
||||
<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="8" column="0">
|
||||
<widget class="QLabel" name="label_25">
|
||||
<property name="text">
|
||||
<string>Highlight these words or callsigns with the primary background color (comma separated):</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="tableForegroundButton">
|
||||
<property name="text">
|
||||
<string>Foreground Color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QPushButton" name="primaryHighlightButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Primary Highlight Background</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QPushButton" name="tableBackgroundButton">
|
||||
<property name="text">
|
||||
<string>Table Background</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="tableForegroundLabel">
|
||||
<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/>
|
||||
</ui>
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>K1ABC</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QPushButton" name="tableSelectedRowBackgroundButton">
|
||||
<property name="text">
|
||||
<string>Selected Row Background</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<spacer name="verticalSpacer_11">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QPushButton" name="secondaryHighlightButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Secondary Highlight Background</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<spacer name="verticalSpacer_17">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="secondaryHighlightLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel{background-color: #ffff66}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>K1ABC</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" 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="8" column="1">
|
||||
<widget class="QLineEdit" name="primaryHighlightLineEdit"/>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="label_20">
|
||||
<property name="text">
|
||||
<string>Highlight these words or callsigns with the secondary background color (comma separated):</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" 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/>
|
||||
</ui>
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>K1ABC</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_11">
|
||||
<spacer name="verticalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
@ -3288,37 +3422,6 @@ QListView::item:hover {
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_25">
|
||||
<property name="text">
|
||||
<string>Highlight Activity Containing These Words or Callsigns (comma separated):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<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>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>348</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
@ -2444,7 +2444,7 @@ void MainWindow::dataSink(qint64 frames)
|
||||
QString t=QString::fromLatin1(line);
|
||||
DecodedText decodedtext {t, false, m_config.my_grid ()};
|
||||
ui->decodedTextBrowser->displayDecodedText (decodedtext,m_baseCall,m_config.DXCC(),
|
||||
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),m_config.color_DXCC(),
|
||||
m_logBook,m_config.color_primary_highlight(),m_config.color_MyCall(),m_config.color_DXCC(),
|
||||
m_config.color_NewCall(),m_config.ppfx());
|
||||
if (ui->measure_check_box->isChecked ()) {
|
||||
// Append results text to file "fmt.all".
|
||||
@ -2643,7 +2643,7 @@ void MainWindow::fastSink(qint64 frames)
|
||||
QString message {QString::fromLatin1 (line)};
|
||||
DecodedText decodedtext {message.replace (QChar::LineFeed, ""), bcontest, m_config.my_grid ()};
|
||||
ui->decodedTextBrowser->displayDecodedText (decodedtext,m_baseCall,m_config.DXCC(),
|
||||
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),m_config.color_DXCC(),
|
||||
m_logBook,m_config.color_primary_highlight(),m_config.color_MyCall(),m_config.color_DXCC(),
|
||||
m_config.color_NewCall(),m_config.ppfx());
|
||||
m_bDecoded=true;
|
||||
if (m_mode != "ISCAT") postDecode (true, decodedtext.string ());
|
||||
@ -4093,7 +4093,7 @@ void::MainWindow::fast_decode_done()
|
||||
ui->cbVHFcontest->isChecked(), m_config.my_grid ()};
|
||||
if(!m_bFastDone) {
|
||||
ui->decodedTextBrowser->displayDecodedText (decodedtext,m_baseCall,m_config.DXCC(),
|
||||
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),m_config.color_DXCC(),
|
||||
m_logBook,m_config.color_primary_highlight(),m_config.color_MyCall(),m_config.color_DXCC(),
|
||||
m_config.color_NewCall(),m_config.ppfx());
|
||||
}
|
||||
|
||||
@ -11551,10 +11551,21 @@ void MainWindow::displayBandActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
auto matchingWords = m_config.highlight_words() & QSet<QString>::fromList(joined.replace(":", " ").replace(">"," ").split(" "));
|
||||
if (!text.isEmpty() && !matchingWords.isEmpty()){
|
||||
for(int i = 0; i < ui->tableWidgetRXAll->columnCount(); i++){
|
||||
ui->tableWidgetRXAll->item(row, i)->setBackground(QBrush(m_config.color_CQ()));
|
||||
if(!text.isEmpty()){
|
||||
auto words = QSet<QString>::fromList(joined.replace(":", " ").replace(">"," ").split(" "));
|
||||
|
||||
auto matchingSecondaryWords = m_config.secondary_highlight_words() & words;
|
||||
if (!matchingSecondaryWords.isEmpty()){
|
||||
for(int i = 0; i < ui->tableWidgetRXAll->columnCount(); i++){
|
||||
ui->tableWidgetRXAll->item(row, i)->setBackground(QBrush(m_config.color_secondary_highlight()));
|
||||
}
|
||||
}
|
||||
|
||||
auto matchingPrimaryWords = m_config.primary_highlight_words() & words;
|
||||
if (!matchingPrimaryWords.isEmpty()){
|
||||
for(int i = 0; i < ui->tableWidgetRXAll->columnCount(); i++){
|
||||
ui->tableWidgetRXAll->item(row, i)->setBackground(QBrush(m_config.color_primary_highlight()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -11854,9 +11865,15 @@ void MainWindow::displayCallActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
if (m_config.highlight_words().contains(call)){
|
||||
if (m_config.secondary_highlight_words().contains(call)){
|
||||
for(int i = 0; i < ui->tableWidgetCalls->columnCount(); i++){
|
||||
ui->tableWidgetCalls->item(row, i)->setBackground(QBrush(m_config.color_CQ()));
|
||||
ui->tableWidgetCalls->item(row, i)->setBackground(QBrush(m_config.color_secondary_highlight()));
|
||||
}
|
||||
}
|
||||
|
||||
if (m_config.primary_highlight_words().contains(call)){
|
||||
for(int i = 0; i < ui->tableWidgetCalls->columnCount(); i++){
|
||||
ui->tableWidgetCalls->item(row, i)->setBackground(QBrush(m_config.color_primary_highlight()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user