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 my_groups_;
 | 
				
			||||||
  QStringList auto_whitelist_;
 | 
					  QStringList auto_whitelist_;
 | 
				
			||||||
  QStringList auto_blacklist_;
 | 
					  QStringList auto_blacklist_;
 | 
				
			||||||
 | 
					  QStringList highlight_words_;
 | 
				
			||||||
  QString eot_;
 | 
					  QString eot_;
 | 
				
			||||||
  QString my_info_;
 | 
					  QString my_info_;
 | 
				
			||||||
  QString cq_;
 | 
					  QString cq_;
 | 
				
			||||||
@ -1010,6 +1011,10 @@ QSet<QString> Configuration::auto_blacklist() const {
 | 
				
			|||||||
    return QSet<QString>::fromList(m_->auto_blacklist_);
 | 
					    return QSet<QString>::fromList(m_->auto_blacklist_);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					QSet<QString> Configuration::highlight_words() const {
 | 
				
			||||||
 | 
					    return QSet<QString>::fromList(m_->highlight_words_);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QString Configuration::eot() const {
 | 
					QString Configuration::eot() const {
 | 
				
			||||||
    return m_->eot_;
 | 
					    return m_->eot_;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -1406,6 +1411,7 @@ void Configuration::impl::initialize_models ()
 | 
				
			|||||||
  ui_->groups_line_edit->setText(my_groups_.join(", "));
 | 
					  ui_->groups_line_edit->setText(my_groups_.join(", "));
 | 
				
			||||||
  ui_->auto_whitelist_line_edit->setText(auto_whitelist_.join(", "));
 | 
					  ui_->auto_whitelist_line_edit->setText(auto_whitelist_.join(", "));
 | 
				
			||||||
  ui_->auto_blacklist_line_edit->setText(auto_blacklist_.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_->eot_line_edit->setText(eot_.trimmed().left(2));
 | 
				
			||||||
  ui_->info_message_line_edit->setText (my_info_.toUpper());
 | 
					  ui_->info_message_line_edit->setText (my_info_.toUpper());
 | 
				
			||||||
  ui_->cq_message_line_edit->setText(cq_.toUpper().replace("CQCQCQ", "CQ CQ CQ"));
 | 
					  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();
 | 
					  my_groups_ = settings_->value("MyGroups", QStringList{}).toStringList();
 | 
				
			||||||
  auto_whitelist_ = settings_->value("AutoWhitelist", QStringList{}).toStringList();
 | 
					  auto_whitelist_ = settings_->value("AutoWhitelist", QStringList{}).toStringList();
 | 
				
			||||||
  auto_blacklist_ = settings_->value("AutoBlacklist", QStringList{}).toStringList();
 | 
					  auto_blacklist_ = settings_->value("AutoBlacklist", QStringList{}).toStringList();
 | 
				
			||||||
 | 
					  highlight_words_ = settings_->value("HighlightWords", QStringList{"CQ"}).toStringList();
 | 
				
			||||||
  callsign_aging_ = settings_->value ("CallsignAging", 0).toInt ();
 | 
					  callsign_aging_ = settings_->value ("CallsignAging", 0).toInt ();
 | 
				
			||||||
  activity_aging_ = settings_->value ("ActivityAging", 2).toInt ();
 | 
					  activity_aging_ = settings_->value ("ActivityAging", 2).toInt ();
 | 
				
			||||||
  eot_ = settings_->value("EOTCharacter", QString{"\u2662"}).toString().trimmed().left(2);
 | 
					  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 ("MyGroups", my_groups_);
 | 
				
			||||||
  settings_->setValue ("AutoWhitelist", auto_whitelist_);
 | 
					  settings_->setValue ("AutoWhitelist", auto_whitelist_);
 | 
				
			||||||
  settings_->setValue ("AutoBlacklist", auto_blacklist_);
 | 
					  settings_->setValue ("AutoBlacklist", auto_blacklist_);
 | 
				
			||||||
 | 
					  settings_->setValue ("HighlightWords", highlight_words_);
 | 
				
			||||||
  settings_->setValue ("EOTCharacter", eot_);
 | 
					  settings_->setValue ("EOTCharacter", eot_);
 | 
				
			||||||
  settings_->setValue ("MyInfo", my_info_);
 | 
					  settings_->setValue ("MyInfo", my_info_);
 | 
				
			||||||
  settings_->setValue ("CQMessage", cq_);
 | 
					  settings_->setValue ("CQMessage", cq_);
 | 
				
			||||||
@ -2125,7 +2133,7 @@ QStringList splitGroups(QString groupsString, bool filter){
 | 
				
			|||||||
    return groups;
 | 
					    return groups;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QStringList splitCalls(QString callsString){
 | 
					QStringList splitWords(QString callsString){
 | 
				
			||||||
    QStringList calls;
 | 
					    QStringList calls;
 | 
				
			||||||
    if(callsString.isEmpty()){
 | 
					    if(callsString.isEmpty()){
 | 
				
			||||||
        return calls;
 | 
					        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)){
 | 
					      if(!Varicode::isValidCallsign(call, nullptr)){
 | 
				
			||||||
          MessageBox::critical_message (this, QString("%1 is not a valid callsign to whitelist").arg(call));
 | 
					          MessageBox::critical_message (this, QString("%1 is not a valid callsign to whitelist").arg(call));
 | 
				
			||||||
          return false;
 | 
					          return false;
 | 
				
			||||||
@ -2429,8 +2437,9 @@ void Configuration::impl::accept ()
 | 
				
			|||||||
  my_callsign_ = ui_->callsign_line_edit->text ().toUpper().trimmed();
 | 
					  my_callsign_ = ui_->callsign_line_edit->text ().toUpper().trimmed();
 | 
				
			||||||
  my_grid_ = ui_->grid_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);
 | 
					  my_groups_ = splitGroups(ui_->groups_line_edit->text().toUpper().trimmed(), true);
 | 
				
			||||||
  auto_whitelist_ = splitCalls(ui_->auto_whitelist_line_edit->text().toUpper().trimmed());
 | 
					  auto_whitelist_ = splitWords(ui_->auto_whitelist_line_edit->text().toUpper().trimmed());
 | 
				
			||||||
  auto_blacklist_ = splitCalls(ui_->auto_blacklist_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();
 | 
					  cq_ = ui_->cq_message_line_edit->text().toUpper();
 | 
				
			||||||
  reply_ = ui_->reply_message_line_edit->text().toUpper();
 | 
					  reply_ = ui_->reply_message_line_edit->text().toUpper();
 | 
				
			||||||
  eot_ = ui_->eot_line_edit->text().trimmed().left(2);
 | 
					  eot_ = ui_->eot_line_edit->text().trimmed().left(2);
 | 
				
			||||||
 | 
				
			|||||||
@ -102,6 +102,7 @@ public:
 | 
				
			|||||||
  void removeGroup(QString const &group);
 | 
					  void removeGroup(QString const &group);
 | 
				
			||||||
  QSet<QString> auto_whitelist() const;
 | 
					  QSet<QString> auto_whitelist() const;
 | 
				
			||||||
  QSet<QString> auto_blacklist() const;
 | 
					  QSet<QString> auto_blacklist() const;
 | 
				
			||||||
 | 
					  QSet<QString> highlight_words() const;
 | 
				
			||||||
  int activity_aging() const;
 | 
					  int activity_aging() const;
 | 
				
			||||||
  int callsign_aging() const;
 | 
					  int callsign_aging() const;
 | 
				
			||||||
  QString eot() const;
 | 
					  QString eot() const;
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										241
									
								
								Configuration.ui
									
									
									
									
									
								
							
							
						
						
									
										241
									
								
								Configuration.ui
									
									
									
									
									
								
							@ -23,7 +23,7 @@
 | 
				
			|||||||
      <string>Select tab to change configuration parameters.</string>
 | 
					      <string>Select tab to change configuration parameters.</string>
 | 
				
			||||||
     </property>
 | 
					     </property>
 | 
				
			||||||
     <property name="currentIndex">
 | 
					     <property name="currentIndex">
 | 
				
			||||||
      <number>0</number>
 | 
					      <number>7</number>
 | 
				
			||||||
     </property>
 | 
					     </property>
 | 
				
			||||||
     <widget class="QWidget" name="general_tab">
 | 
					     <widget class="QWidget" name="general_tab">
 | 
				
			||||||
      <attribute name="title">
 | 
					      <attribute name="title">
 | 
				
			||||||
@ -36,7 +36,7 @@
 | 
				
			|||||||
       <item>
 | 
					       <item>
 | 
				
			||||||
        <widget class="QTabWidget" name="tabWidget_2">
 | 
					        <widget class="QTabWidget" name="tabWidget_2">
 | 
				
			||||||
         <property name="currentIndex">
 | 
					         <property name="currentIndex">
 | 
				
			||||||
          <number>1</number>
 | 
					          <number>0</number>
 | 
				
			||||||
         </property>
 | 
					         </property>
 | 
				
			||||||
         <widget class="QWidget" name="stationTab">
 | 
					         <widget class="QWidget" name="stationTab">
 | 
				
			||||||
          <attribute name="title">
 | 
					          <attribute name="title">
 | 
				
			||||||
@ -278,7 +278,7 @@
 | 
				
			|||||||
               <rect>
 | 
					               <rect>
 | 
				
			||||||
                <x>0</x>
 | 
					                <x>0</x>
 | 
				
			||||||
                <y>0</y>
 | 
					                <y>0</y>
 | 
				
			||||||
                <width>724</width>
 | 
					                <width>615</width>
 | 
				
			||||||
                <height>808</height>
 | 
					                <height>808</height>
 | 
				
			||||||
               </rect>
 | 
					               </rect>
 | 
				
			||||||
              </property>
 | 
					              </property>
 | 
				
			||||||
@ -3229,7 +3229,7 @@ QListView::item:hover {
 | 
				
			|||||||
             <property name="widgetResizable">
 | 
					             <property name="widgetResizable">
 | 
				
			||||||
              <bool>true</bool>
 | 
					              <bool>true</bool>
 | 
				
			||||||
             </property>
 | 
					             </property>
 | 
				
			||||||
             <widget class="QWidget" name="scrollAreaWidgetContents_8">
 | 
					             <widget class="QWidget" name="scrollAreaContentsWidget_8">
 | 
				
			||||||
              <property name="geometry">
 | 
					              <property name="geometry">
 | 
				
			||||||
               <rect>
 | 
					               <rect>
 | 
				
			||||||
                <x>0</x>
 | 
					                <x>0</x>
 | 
				
			||||||
@ -3238,6 +3238,20 @@ QListView::item:hover {
 | 
				
			|||||||
                <height>378</height>
 | 
					                <height>378</height>
 | 
				
			||||||
               </rect>
 | 
					               </rect>
 | 
				
			||||||
              </property>
 | 
					              </property>
 | 
				
			||||||
 | 
					              <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>
 | 
				
			||||||
                <layout class="QGridLayout" name="gridLayout_15">
 | 
					                <layout class="QGridLayout" name="gridLayout_15">
 | 
				
			||||||
                 <property name="leftMargin">
 | 
					                 <property name="leftMargin">
 | 
				
			||||||
                  <number>0</number>
 | 
					                  <number>0</number>
 | 
				
			||||||
@ -3248,10 +3262,10 @@ QListView::item:hover {
 | 
				
			|||||||
                 <property name="bottomMargin">
 | 
					                 <property name="bottomMargin">
 | 
				
			||||||
                  <number>0</number>
 | 
					                  <number>0</number>
 | 
				
			||||||
                 </property>
 | 
					                 </property>
 | 
				
			||||||
               <item row="4" column="1">
 | 
					                 <item row="6" column="1">
 | 
				
			||||||
                <widget class="QPushButton" name="tableForegroundButton">
 | 
					                  <widget class="QPushButton" name="tableFontButton">
 | 
				
			||||||
                   <property name="text">
 | 
					                   <property name="text">
 | 
				
			||||||
                  <string>Foreground Color</string>
 | 
					                    <string>Font</string>
 | 
				
			||||||
                   </property>
 | 
					                   </property>
 | 
				
			||||||
                  </widget>
 | 
					                  </widget>
 | 
				
			||||||
                 </item>
 | 
					                 </item>
 | 
				
			||||||
@ -3274,23 +3288,30 @@ QListView::item:hover {
 | 
				
			|||||||
                   </property>
 | 
					                   </property>
 | 
				
			||||||
                  </widget>
 | 
					                  </widget>
 | 
				
			||||||
                 </item>
 | 
					                 </item>
 | 
				
			||||||
               <item row="2" column="1">
 | 
					                 <item row="7" column="1">
 | 
				
			||||||
                <widget class="QPushButton" name="pbCQmsg">
 | 
					                  <spacer name="verticalSpacer">
 | 
				
			||||||
                 <property name="minimumSize">
 | 
					                   <property name="orientation">
 | 
				
			||||||
 | 
					                    <enum>Qt::Vertical</enum>
 | 
				
			||||||
 | 
					                   </property>
 | 
				
			||||||
 | 
					                   <property name="sizeHint" stdset="0">
 | 
				
			||||||
                    <size>
 | 
					                    <size>
 | 
				
			||||||
                   <width>140</width>
 | 
					                     <width>20</width>
 | 
				
			||||||
                   <height>0</height>
 | 
					                     <height>40</height>
 | 
				
			||||||
                    </size>
 | 
					                    </size>
 | 
				
			||||||
                   </property>
 | 
					                   </property>
 | 
				
			||||||
 | 
					                  </spacer>
 | 
				
			||||||
 | 
					                 </item>
 | 
				
			||||||
 | 
					                 <item row="4" column="1">
 | 
				
			||||||
 | 
					                  <widget class="QPushButton" name="tableForegroundButton">
 | 
				
			||||||
                   <property name="text">
 | 
					                   <property name="text">
 | 
				
			||||||
                  <string>CQ Background</string>
 | 
					                    <string>Foreground Color</string>
 | 
				
			||||||
                   </property>
 | 
					                   </property>
 | 
				
			||||||
                  </widget>
 | 
					                  </widget>
 | 
				
			||||||
                 </item>
 | 
					                 </item>
 | 
				
			||||||
               <item row="6" column="1">
 | 
					                 <item row="1" column="1">
 | 
				
			||||||
                <widget class="QPushButton" name="tableFontButton">
 | 
					                  <widget class="QPushButton" name="tableSelectedRowBackgroundButton">
 | 
				
			||||||
                   <property name="text">
 | 
					                   <property name="text">
 | 
				
			||||||
                  <string>Font</string>
 | 
					                    <string>Selected Row Background</string>
 | 
				
			||||||
                   </property>
 | 
					                   </property>
 | 
				
			||||||
                  </widget>
 | 
					                  </widget>
 | 
				
			||||||
                 </item>
 | 
					                 </item>
 | 
				
			||||||
@ -3305,34 +3326,34 @@ QListView::item:hover {
 | 
				
			|||||||
                   <property name="styleSheet">
 | 
					                   <property name="styleSheet">
 | 
				
			||||||
                    <string notr="true">QLabel{background-color: #3498db}<?xml version="1.0" encoding="UTF-8"?>
 | 
					                    <string notr="true">QLabel{background-color: #3498db}<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
<ui version="4.0">
 | 
					<ui version="4.0">
 | 
				
			||||||
 <widget name="__qt_fake_top_level">
 | 
					<widget name="__qt_fake_top_level">
 | 
				
			||||||
  <widget class="QLabel" name="labCQ">
 | 
					<widget class="QLabel" name="labCQ">
 | 
				
			||||||
   <property name="geometry">
 | 
					<property name="geometry">
 | 
				
			||||||
    <rect>
 | 
					<rect>
 | 
				
			||||||
     <x>12</x>
 | 
					<x>12</x>
 | 
				
			||||||
     <y>32</y>
 | 
					<y>32</y>
 | 
				
			||||||
     <width>302</width>
 | 
					<width>302</width>
 | 
				
			||||||
     <height>25</height>
 | 
					<height>25</height>
 | 
				
			||||||
    </rect>
 | 
					</rect>
 | 
				
			||||||
   </property>
 | 
					</property>
 | 
				
			||||||
   <property name="minimumSize">
 | 
					<property name="minimumSize">
 | 
				
			||||||
    <size>
 | 
					<size>
 | 
				
			||||||
     <width>80</width>
 | 
					<width>80</width>
 | 
				
			||||||
     <height>20</height>
 | 
					<height>20</height>
 | 
				
			||||||
    </size>
 | 
					</size>
 | 
				
			||||||
   </property>
 | 
					</property>
 | 
				
			||||||
   <property name="styleSheet">
 | 
					<property name="styleSheet">
 | 
				
			||||||
    <string notr="true">QLabel{background-color: #66ff66}</string>
 | 
					<string notr="true">QLabel{background-color: #66ff66}</string>
 | 
				
			||||||
   </property>
 | 
					</property>
 | 
				
			||||||
   <property name="text">
 | 
					<property name="text">
 | 
				
			||||||
    <string>K1ABC</string>
 | 
					<string>K1ABC</string>
 | 
				
			||||||
   </property>
 | 
					</property>
 | 
				
			||||||
   <property name="alignment">
 | 
					<property name="alignment">
 | 
				
			||||||
    <set>Qt::AlignCenter</set>
 | 
					<set>Qt::AlignCenter</set>
 | 
				
			||||||
   </property>
 | 
					</property>
 | 
				
			||||||
  </widget>
 | 
					</widget>
 | 
				
			||||||
 </widget>
 | 
					</widget>
 | 
				
			||||||
 <resources/>
 | 
					<resources/>
 | 
				
			||||||
</ui>
 | 
					</ui>
 | 
				
			||||||
</string>
 | 
					</string>
 | 
				
			||||||
                   </property>
 | 
					                   </property>
 | 
				
			||||||
@ -3344,6 +3365,26 @@ QListView::item:hover {
 | 
				
			|||||||
                   </property>
 | 
					                   </property>
 | 
				
			||||||
                  </widget>
 | 
					                  </widget>
 | 
				
			||||||
                 </item>
 | 
					                 </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">
 | 
					                 <item row="3" column="0">
 | 
				
			||||||
                  <widget class="QLabel" name="labMyCall">
 | 
					                  <widget class="QLabel" name="labMyCall">
 | 
				
			||||||
                   <property name="minimumSize">
 | 
					                   <property name="minimumSize">
 | 
				
			||||||
@ -3374,34 +3415,34 @@ QListView::item:hover {
 | 
				
			|||||||
                   <property name="styleSheet">
 | 
					                   <property name="styleSheet">
 | 
				
			||||||
                    <string notr="true">QLabel{background-color: white}<?xml version="1.0" encoding="UTF-8"?>
 | 
					                    <string notr="true">QLabel{background-color: white}<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
<ui version="4.0">
 | 
					<ui version="4.0">
 | 
				
			||||||
 <widget name="__qt_fake_top_level">
 | 
					<widget name="__qt_fake_top_level">
 | 
				
			||||||
  <widget class="QLabel" name="labCQ">
 | 
					<widget class="QLabel" name="labCQ">
 | 
				
			||||||
   <property name="geometry">
 | 
					<property name="geometry">
 | 
				
			||||||
    <rect>
 | 
					<rect>
 | 
				
			||||||
     <x>12</x>
 | 
					<x>12</x>
 | 
				
			||||||
     <y>32</y>
 | 
					<y>32</y>
 | 
				
			||||||
     <width>302</width>
 | 
					<width>302</width>
 | 
				
			||||||
     <height>25</height>
 | 
					<height>25</height>
 | 
				
			||||||
    </rect>
 | 
					</rect>
 | 
				
			||||||
   </property>
 | 
					</property>
 | 
				
			||||||
   <property name="minimumSize">
 | 
					<property name="minimumSize">
 | 
				
			||||||
    <size>
 | 
					<size>
 | 
				
			||||||
     <width>80</width>
 | 
					<width>80</width>
 | 
				
			||||||
     <height>20</height>
 | 
					<height>20</height>
 | 
				
			||||||
    </size>
 | 
					</size>
 | 
				
			||||||
   </property>
 | 
					</property>
 | 
				
			||||||
   <property name="styleSheet">
 | 
					<property name="styleSheet">
 | 
				
			||||||
    <string notr="true">QLabel{background-color: #66ff66}</string>
 | 
					<string notr="true">QLabel{background-color: #66ff66}</string>
 | 
				
			||||||
   </property>
 | 
					</property>
 | 
				
			||||||
   <property name="text">
 | 
					<property name="text">
 | 
				
			||||||
    <string>K1ABC</string>
 | 
					<string>K1ABC</string>
 | 
				
			||||||
   </property>
 | 
					</property>
 | 
				
			||||||
   <property name="alignment">
 | 
					<property name="alignment">
 | 
				
			||||||
    <set>Qt::AlignCenter</set>
 | 
					<set>Qt::AlignCenter</set>
 | 
				
			||||||
   </property>
 | 
					</property>
 | 
				
			||||||
  </widget>
 | 
					</widget>
 | 
				
			||||||
 </widget>
 | 
					</widget>
 | 
				
			||||||
 <resources/>
 | 
					<resources/>
 | 
				
			||||||
</ui>
 | 
					</ui>
 | 
				
			||||||
</string>
 | 
					</string>
 | 
				
			||||||
                   </property>
 | 
					                   </property>
 | 
				
			||||||
@ -3413,8 +3454,8 @@ QListView::item:hover {
 | 
				
			|||||||
                   </property>
 | 
					                   </property>
 | 
				
			||||||
                  </widget>
 | 
					                  </widget>
 | 
				
			||||||
                 </item>
 | 
					                 </item>
 | 
				
			||||||
               <item row="3" column="1">
 | 
					                 <item row="2" column="1">
 | 
				
			||||||
                <widget class="QPushButton" name="pbMyCall">
 | 
					                  <widget class="QPushButton" name="pbCQmsg">
 | 
				
			||||||
                   <property name="minimumSize">
 | 
					                   <property name="minimumSize">
 | 
				
			||||||
                    <size>
 | 
					                    <size>
 | 
				
			||||||
                     <width>140</width>
 | 
					                     <width>140</width>
 | 
				
			||||||
@ -3422,25 +3463,47 @@ QListView::item:hover {
 | 
				
			|||||||
                    </size>
 | 
					                    </size>
 | 
				
			||||||
                   </property>
 | 
					                   </property>
 | 
				
			||||||
                   <property name="text">
 | 
					                   <property name="text">
 | 
				
			||||||
                  <string>Directed Messages Background</string>
 | 
					                    <string>Highlight Background</string>
 | 
				
			||||||
                   </property>
 | 
					                   </property>
 | 
				
			||||||
                  </widget>
 | 
					                  </widget>
 | 
				
			||||||
                 </item>
 | 
					                 </item>
 | 
				
			||||||
               <item row="1" column="1">
 | 
					                </layout>
 | 
				
			||||||
                <widget class="QPushButton" name="tableSelectedRowBackgroundButton">
 | 
					               </item>
 | 
				
			||||||
 | 
					               <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>20</width>
 | 
				
			||||||
 | 
					                   <height>10</height>
 | 
				
			||||||
 | 
					                  </size>
 | 
				
			||||||
 | 
					                 </property>
 | 
				
			||||||
 | 
					                </spacer>
 | 
				
			||||||
 | 
					               </item>
 | 
				
			||||||
 | 
					               <item>
 | 
				
			||||||
 | 
					                <widget class="QLabel" name="label_25">
 | 
				
			||||||
                 <property name="text">
 | 
					                 <property name="text">
 | 
				
			||||||
                  <string>Selected Row Background</string>
 | 
					                  <string>Highlight Activity Containing These Words (comma separated):</string>
 | 
				
			||||||
                 </property>
 | 
					                 </property>
 | 
				
			||||||
                </widget>
 | 
					                </widget>
 | 
				
			||||||
               </item>
 | 
					               </item>
 | 
				
			||||||
               <item row="0" column="1">
 | 
					               <item>
 | 
				
			||||||
                <widget class="QPushButton" name="tableBackgroundButton">
 | 
					                <widget class="QTextEdit" name="highlightTextEdit">
 | 
				
			||||||
                 <property name="text">
 | 
					                 <property name="html">
 | 
				
			||||||
                  <string>Table Background</string>
 | 
					                  <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>
 | 
					                 </property>
 | 
				
			||||||
                </widget>
 | 
					                </widget>
 | 
				
			||||||
               </item>
 | 
					               </item>
 | 
				
			||||||
               <item row="7" column="1">
 | 
					               <item>
 | 
				
			||||||
                <spacer name="verticalSpacer">
 | 
					                <spacer name="verticalSpacer">
 | 
				
			||||||
                 <property name="orientation">
 | 
					                 <property name="orientation">
 | 
				
			||||||
                  <enum>Qt::Vertical</enum>
 | 
					                  <enum>Qt::Vertical</enum>
 | 
				
			||||||
@ -3448,7 +3511,7 @@ QListView::item:hover {
 | 
				
			|||||||
                 <property name="sizeHint" stdset="0">
 | 
					                 <property name="sizeHint" stdset="0">
 | 
				
			||||||
                  <size>
 | 
					                  <size>
 | 
				
			||||||
                   <width>20</width>
 | 
					                   <width>20</width>
 | 
				
			||||||
                   <height>40</height>
 | 
					                   <height>348</height>
 | 
				
			||||||
                  </size>
 | 
					                  </size>
 | 
				
			||||||
                 </property>
 | 
					                 </property>
 | 
				
			||||||
                </spacer>
 | 
					                </spacer>
 | 
				
			||||||
@ -4203,12 +4266,6 @@ soundcard changes</string>
 | 
				
			|||||||
  <tabstop>font_push_button</tabstop>
 | 
					  <tabstop>font_push_button</tabstop>
 | 
				
			||||||
  <tabstop>tabWidget</tabstop>
 | 
					  <tabstop>tabWidget</tabstop>
 | 
				
			||||||
  <tabstop>scrollArea_8</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>scrollArea_9</tabstop>
 | 
				
			||||||
  <tabstop>txFontButton</tabstop>
 | 
					  <tabstop>txFontButton</tabstop>
 | 
				
			||||||
  <tabstop>rxFontButton</tabstop>
 | 
					  <tabstop>rxFontButton</tabstop>
 | 
				
			||||||
@ -4297,12 +4354,12 @@ soundcard changes</string>
 | 
				
			|||||||
  </connection>
 | 
					  </connection>
 | 
				
			||||||
 </connections>
 | 
					 </connections>
 | 
				
			||||||
 <buttongroups>
 | 
					 <buttongroups>
 | 
				
			||||||
 | 
					  <buttongroup name="TX_audio_source_button_group"/>
 | 
				
			||||||
 | 
					  <buttongroup name="CAT_stop_bits_button_group"/>
 | 
				
			||||||
  <buttongroup name="PTT_method_button_group"/>
 | 
					  <buttongroup name="PTT_method_button_group"/>
 | 
				
			||||||
  <buttongroup name="split_mode_button_group"/>
 | 
					  <buttongroup name="split_mode_button_group"/>
 | 
				
			||||||
  <buttongroup name="CAT_handshake_button_group"/>
 | 
					  <buttongroup name="CAT_handshake_button_group"/>
 | 
				
			||||||
  <buttongroup name="TX_audio_source_button_group"/>
 | 
					 | 
				
			||||||
  <buttongroup name="TX_mode_button_group"/>
 | 
					  <buttongroup name="TX_mode_button_group"/>
 | 
				
			||||||
  <buttongroup name="CAT_data_bits_button_group"/>
 | 
					  <buttongroup name="CAT_data_bits_button_group"/>
 | 
				
			||||||
  <buttongroup name="CAT_stop_bits_button_group"/>
 | 
					 | 
				
			||||||
 </buttongroups>
 | 
					 </buttongroups>
 | 
				
			||||||
</ui>
 | 
					</ui>
 | 
				
			||||||
 | 
				
			|||||||
@ -11536,30 +11536,6 @@ void MainWindow::displayBandActivity() {
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
                textItem->setTextAlignment(flag);
 | 
					                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);
 | 
					                ui->tableWidgetRXAll->setItem(row, col++, textItem);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (isOffsetSelected) {
 | 
					                if (isOffsetSelected) {
 | 
				
			||||||
@ -11567,6 +11543,21 @@ void MainWindow::displayBandActivity() {
 | 
				
			|||||||
                        ui->tableWidgetRXAll->item(row, i)->setSelected(true);
 | 
					                        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);
 | 
					                    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
 | 
					        // Set table color
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user