Removed QTC as it was confusing and redundant. QTH is now the 'station message'
This commit is contained in:
		
							parent
							
								
									896ca374bb
								
							
						
					
					
						commit
						03f351551d
					
				| @ -583,13 +583,12 @@ private: | |||||||
|   bool frequency_calibration_disabled_; // not persistent
 |   bool frequency_calibration_disabled_; // not persistent
 | ||||||
|   unsigned transceiver_command_number_; |   unsigned transceiver_command_number_; | ||||||
|   QString dynamic_grid_; |   QString dynamic_grid_; | ||||||
|   QString dynamic_qtc_; |   QString dynamic_qth_; | ||||||
| 
 | 
 | ||||||
|   // configuration fields that we publish
 |   // configuration fields that we publish
 | ||||||
|   bool auto_switch_bands_; |   bool auto_switch_bands_; | ||||||
|   QString my_callsign_; |   QString my_callsign_; | ||||||
|   QString my_grid_; |   QString my_grid_; | ||||||
|   QString my_station_; |  | ||||||
|   QStringList my_groups_; |   QStringList my_groups_; | ||||||
|   QStringList auto_whitelist_; |   QStringList auto_whitelist_; | ||||||
|   QString my_qth_; |   QString my_qth_; | ||||||
| @ -951,15 +950,6 @@ QString Configuration::my_grid() const | |||||||
|   return grid.trimmed(); |   return grid.trimmed(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| QString Configuration::my_station() const |  | ||||||
| { |  | ||||||
|     auto station = m_->my_station_; |  | ||||||
|     if(m_->use_dynamic_info_ && !m_->dynamic_qtc_.isEmpty()){ |  | ||||||
|         station = m_->dynamic_qtc_; |  | ||||||
|     } |  | ||||||
|     return station.trimmed(); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| QSet<QString> Configuration::my_groups() const { | QSet<QString> Configuration::my_groups() const { | ||||||
|     return QSet<QString>::fromList(m_->my_groups_); |     return QSet<QString>::fromList(m_->my_groups_); | ||||||
| } | } | ||||||
| @ -984,7 +974,12 @@ QSet<QString> Configuration::auto_whitelist() const { | |||||||
| 
 | 
 | ||||||
| QString Configuration::my_qth() const | QString Configuration::my_qth() const | ||||||
| { | { | ||||||
|     return m_->my_qth_.trimmed(); |     auto qth = m_->my_qth_; | ||||||
|  |     if(m_->use_dynamic_info_ && !m_->dynamic_qth_.isEmpty()){ | ||||||
|  |         qth = m_->dynamic_qth_; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     return qth.trimmed(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| QString Configuration::cq_message() const | QString Configuration::cq_message() const | ||||||
| @ -1012,9 +1007,9 @@ void Configuration::set_dynamic_location (QString const& grid_descriptor) | |||||||
|   m_->dynamic_grid_ = grid_descriptor.trimmed (); |   m_->dynamic_grid_ = grid_descriptor.trimmed (); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void Configuration::set_dynamic_station_message(QString const& qtc) | void Configuration::set_dynamic_station_qth(QString const& qth) | ||||||
| { | { | ||||||
|   m_->dynamic_qtc_ = qtc.trimmed (); |   m_->dynamic_qth_ = qth.trimmed (); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| namespace | namespace | ||||||
| @ -1365,7 +1360,6 @@ void Configuration::impl::initialize_models () | |||||||
|   ui_->grid_line_edit->setText (my_grid_.toUpper()); |   ui_->grid_line_edit->setText (my_grid_.toUpper()); | ||||||
|   ui_->callsign_aging_spin_box->setValue(callsign_aging_); |   ui_->callsign_aging_spin_box->setValue(callsign_aging_); | ||||||
|   ui_->activity_aging_spin_box->setValue(activity_aging_); |   ui_->activity_aging_spin_box->setValue(activity_aging_); | ||||||
|   ui_->station_message_line_edit->setText (my_station_.toUpper()); |  | ||||||
|   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_->qth_message_line_edit->setText (my_qth_.toUpper()); |   ui_->qth_message_line_edit->setText (my_qth_.toUpper()); | ||||||
| @ -1510,7 +1504,6 @@ void Configuration::impl::read_settings () | |||||||
|   auto_switch_bands_ = settings_->value("AutoSwitchBands", false).toBool(); |   auto_switch_bands_ = settings_->value("AutoSwitchBands", false).toBool(); | ||||||
|   my_callsign_ = settings_->value ("MyCall", QString {}).toString (); |   my_callsign_ = settings_->value ("MyCall", QString {}).toString (); | ||||||
|   my_grid_ = settings_->value ("MyGrid", QString {}).toString (); |   my_grid_ = settings_->value ("MyGrid", QString {}).toString (); | ||||||
|   my_station_ = settings_->value("MyStation", QString {}).toString(); |  | ||||||
|   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(); | ||||||
|   callsign_aging_ = settings_->value ("CallsignAging", 0).toInt (); |   callsign_aging_ = settings_->value ("CallsignAging", 0).toInt (); | ||||||
| @ -1771,7 +1764,6 @@ void Configuration::impl::write_settings () | |||||||
|   settings_->setValue ("AutoSwitchBands", auto_switch_bands_); |   settings_->setValue ("AutoSwitchBands", auto_switch_bands_); | ||||||
|   settings_->setValue ("MyCall", my_callsign_); |   settings_->setValue ("MyCall", my_callsign_); | ||||||
|   settings_->setValue ("MyGrid", my_grid_); |   settings_->setValue ("MyGrid", my_grid_); | ||||||
|   settings_->setValue ("MyStation", my_station_); |  | ||||||
|   settings_->setValue ("MyGroups", my_groups_); |   settings_->setValue ("MyGroups", my_groups_); | ||||||
|   settings_->setValue ("AutoWhitelist", auto_whitelist_); |   settings_->setValue ("AutoWhitelist", auto_whitelist_); | ||||||
|   settings_->setValue ("MyQTH", my_qth_); |   settings_->setValue ("MyQTH", my_qth_); | ||||||
| @ -2363,7 +2355,6 @@ void Configuration::impl::accept () | |||||||
|   auto_switch_bands_ = ui_->auto_switch_bands_check_box->isChecked(); |   auto_switch_bands_ = ui_->auto_switch_bands_check_box->isChecked(); | ||||||
|   my_callsign_ = ui_->callsign_line_edit->text ().toUpper(); |   my_callsign_ = ui_->callsign_line_edit->text ().toUpper(); | ||||||
|   my_grid_ = ui_->grid_line_edit->text ().toUpper(); |   my_grid_ = ui_->grid_line_edit->text ().toUpper(); | ||||||
|   my_station_ = ui_->station_message_line_edit->text().toUpper(); |  | ||||||
|   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_ = splitCalls(ui_->auto_whitelist_line_edit->text().toUpper().trimmed()); | ||||||
|   cq_ = ui_->cq_message_line_edit->text().toUpper(); |   cq_ = ui_->cq_message_line_edit->text().toUpper(); | ||||||
|  | |||||||
| @ -97,7 +97,6 @@ public: | |||||||
|   bool use_dynamic_grid() const; |   bool use_dynamic_grid() const; | ||||||
|   QString my_callsign () const; |   QString my_callsign () const; | ||||||
|   QString my_grid () const; |   QString my_grid () const; | ||||||
|   QString my_station () const; |  | ||||||
|   QSet<QString> my_groups() const; |   QSet<QString> my_groups() const; | ||||||
|   void addGroup(QString const &group); |   void addGroup(QString const &group); | ||||||
|   void removeGroup(QString const &group); |   void removeGroup(QString const &group); | ||||||
| @ -233,8 +232,8 @@ public: | |||||||
|   // Set the dynamic grid which is only used if configuration setting is enabled.
 |   // Set the dynamic grid which is only used if configuration setting is enabled.
 | ||||||
|   void set_dynamic_location (QString const&); |   void set_dynamic_location (QString const&); | ||||||
| 
 | 
 | ||||||
|   // Set the dynamic statios message which is only used if configuration setting is enabled.
 |   // Set the dynamic station qth message which is only used if configuration setting is enabled.
 | ||||||
|   void set_dynamic_station_message(QString const& qtc); |   void set_dynamic_station_qth(QString const& qth); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|   // This method queries if a CAT and PTT connection is operational.
 |   // This method queries if a CAT and PTT connection is operational.
 | ||||||
|  | |||||||
| @ -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>0</number> |           <number>1</number> | ||||||
|          </property> |          </property> | ||||||
|          <widget class="QWidget" name="stationTab"> |          <widget class="QWidget" name="stationTab"> | ||||||
|           <attribute name="title"> |           <attribute name="title"> | ||||||
| @ -187,23 +187,6 @@ | |||||||
|                   <string>Station Messages</string> |                   <string>Station Messages</string> | ||||||
|                  </property> |                  </property> | ||||||
|                  <layout class="QGridLayout" name="gridLayout_4"> |                  <layout class="QGridLayout" name="gridLayout_4"> | ||||||
|                   <item row="3" column="0"> |  | ||||||
|                    <widget class="QLabel" name="label_15"> |  | ||||||
|                     <property name="toolTip"> |  | ||||||
|                      <string><html><head/><body><p>Station Description Message</p></body></html></string> |  | ||||||
|                     </property> |  | ||||||
|                     <property name="text"> |  | ||||||
|                      <string>Station Detail (QTC) Message:</string> |  | ||||||
|                     </property> |  | ||||||
|                    </widget> |  | ||||||
|                   </item> |  | ||||||
|                   <item row="0" column="1"> |  | ||||||
|                    <widget class="QLineEdit" name="cq_message_line_edit"> |  | ||||||
|                     <property name="text"> |  | ||||||
|                      <string>CQCQCQ <MYGRID4></string> |  | ||||||
|                     </property> |  | ||||||
|                    </widget> |  | ||||||
|                   </item> |  | ||||||
|                   <item row="1" column="1"> |                   <item row="1" column="1"> | ||||||
|                    <widget class="QLineEdit" name="reply_message_line_edit"> |                    <widget class="QLineEdit" name="reply_message_line_edit"> | ||||||
|                     <property name="text"> |                     <property name="text"> | ||||||
| @ -211,13 +194,6 @@ | |||||||
|                     </property> |                     </property> | ||||||
|                    </widget> |                    </widget> | ||||||
|                   </item> |                   </item> | ||||||
|                   <item row="2" column="1"> |  | ||||||
|                    <widget class="QLineEdit" name="qth_message_line_edit"> |  | ||||||
|                     <property name="toolTip"> |  | ||||||
|                      <string><html><head/><body><p>Station location message that is transmitted in response to &quot;@&quot; directed queries.</p></body></html></string> |  | ||||||
|                     </property> |  | ||||||
|                    </widget> |  | ||||||
|                   </item> |  | ||||||
|                   <item row="1" column="0"> |                   <item row="1" column="0"> | ||||||
|                    <widget class="QLabel" name="label_17"> |                    <widget class="QLabel" name="label_17"> | ||||||
|                     <property name="text"> |                     <property name="text"> | ||||||
| @ -225,27 +201,34 @@ | |||||||
|                     </property> |                     </property> | ||||||
|                    </widget> |                    </widget> | ||||||
|                   </item> |                   </item> | ||||||
|  |                   <item row="0" column="0"> | ||||||
|  |                    <widget class="QLabel" name="label_19"> | ||||||
|  |                     <property name="text"> | ||||||
|  |                      <string>CQ Message:</string> | ||||||
|  |                     </property> | ||||||
|  |                    </widget> | ||||||
|  |                   </item> | ||||||
|  |                   <item row="0" column="1"> | ||||||
|  |                    <widget class="QLineEdit" name="cq_message_line_edit"> | ||||||
|  |                     <property name="text"> | ||||||
|  |                      <string>CQCQCQ <MYGRID4></string> | ||||||
|  |                     </property> | ||||||
|  |                    </widget> | ||||||
|  |                   </item> | ||||||
|  |                   <item row="2" column="1"> | ||||||
|  |                    <widget class="QLineEdit" name="qth_message_line_edit"> | ||||||
|  |                     <property name="toolTip"> | ||||||
|  |                      <string><html><head/><body><p>Station location message that is transmitted in response to &quot;@&quot; directed queries.</p></body></html></string> | ||||||
|  |                     </property> | ||||||
|  |                    </widget> | ||||||
|  |                   </item> | ||||||
|                   <item row="2" column="0"> |                   <item row="2" column="0"> | ||||||
|                    <widget class="QLabel" name="label_14"> |                    <widget class="QLabel" name="label_14"> | ||||||
|                     <property name="toolTip"> |                     <property name="toolTip"> | ||||||
|                      <string><html><head/><body><p>Station location message</p></body></html></string> |                      <string><html><head/><body><p>Station location message</p></body></html></string> | ||||||
|                     </property> |                     </property> | ||||||
|                     <property name="text"> |                     <property name="text"> | ||||||
|                      <string>Station Location (QTH) Message:</string> |                      <string>Station Message (QTH & Equipment):</string> | ||||||
|                     </property> |  | ||||||
|                    </widget> |  | ||||||
|                   </item> |  | ||||||
|                   <item row="3" column="1"> |  | ||||||
|                    <widget class="QLineEdit" name="station_message_line_edit"> |  | ||||||
|                     <property name="toolTip"> |  | ||||||
|                      <string><html><head/><body><p>Station message that is transmitted in response to &quot;&amp;&quot; directed queries.</p></body></html></string> |  | ||||||
|                     </property> |  | ||||||
|                    </widget> |  | ||||||
|                   </item> |  | ||||||
|                   <item row="0" column="0"> |  | ||||||
|                    <widget class="QLabel" name="label_19"> |  | ||||||
|                     <property name="text"> |  | ||||||
|                      <string>CQ Message:</string> |  | ||||||
|                     </property> |                     </property> | ||||||
|                    </widget> |                    </widget> | ||||||
|                   </item> |                   </item> | ||||||
| @ -386,7 +369,7 @@ | |||||||
|                   <item> |                   <item> | ||||||
|                    <widget class="QCheckBox" name="transmit_directed_check_box"> |                    <widget class="QCheckBox" name="transmit_directed_check_box"> | ||||||
|                     <property name="text"> |                     <property name="text"> | ||||||
|                      <string>Immediately transmit CQ, Reply, QTC, QTH, Saved, and Directed messages from the menu</string> |                      <string>Immediately transmit CQ, Reply, QTH, Saved, and Directed messages from the menu</string> | ||||||
|                     </property> |                     </property> | ||||||
|                    </widget> |                    </widget> | ||||||
|                   </item> |                   </item> | ||||||
| @ -4117,12 +4100,12 @@ soundcard changes</string> | |||||||
|   </connection> |   </connection> | ||||||
|  </connections> |  </connections> | ||||||
|  <buttongroups> |  <buttongroups> | ||||||
|   <buttongroup name="CAT_stop_bits_button_group"/> |   <buttongroup name="CAT_data_bits_button_group"/> | ||||||
|   <buttongroup name="CAT_handshake_button_group"/> |   <buttongroup name="CAT_handshake_button_group"/> | ||||||
|   <buttongroup name="TX_mode_button_group"/> |   <buttongroup name="TX_mode_button_group"/> | ||||||
|   <buttongroup name="CAT_data_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="TX_audio_source_button_group"/> |   <buttongroup name="TX_audio_source_button_group"/> | ||||||
|  |   <buttongroup name="CAT_stop_bits_button_group"/> | ||||||
|  </buttongroups> |  </buttongroups> | ||||||
| </ui> | </ui> | ||||||
|  | |||||||
| @ -7070,17 +7070,6 @@ void MainWindow::on_qthMacroButton_clicked(){ | |||||||
|     if(m_config.transmit_directed()) toggleTx(true); |     if(m_config.transmit_directed()) toggleTx(true); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void MainWindow::on_qtcMacroButton_clicked(){ |  | ||||||
|     QString qtc = m_config.my_station(); |  | ||||||
|     if(qtc.isEmpty()){ |  | ||||||
|         return; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     addMessageText(QString("QTC %1").arg(replaceMacros(qtc, buildMacroValues(), true))); |  | ||||||
| 
 |  | ||||||
|     if(m_config.transmit_directed()) toggleTx(true); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| void MainWindow::setShowColumn(QString tableKey, QString columnKey, bool value){ | void MainWindow::setShowColumn(QString tableKey, QString columnKey, bool value){ | ||||||
|     m_showColumnsCache[tableKey + columnKey] = QVariant(value); |     m_showColumnsCache[tableKey + columnKey] = QVariant(value); | ||||||
|     displayBandActivity(); |     displayBandActivity(); | ||||||
| @ -7206,7 +7195,6 @@ void MainWindow::buildQueryMenu(QMenu * menu, QString call){ | |||||||
| 
 | 
 | ||||||
|     auto grid = m_config.my_grid(); |     auto grid = m_config.my_grid(); | ||||||
| 
 | 
 | ||||||
|     bool emptyQTC = m_config.my_station().isEmpty(); |  | ||||||
|     bool emptyQTH = m_config.my_qth().isEmpty(); |     bool emptyQTH = m_config.my_qth().isEmpty(); | ||||||
|     bool emptyGrid = m_config.my_grid().isEmpty(); |     bool emptyGrid = m_config.my_grid().isEmpty(); | ||||||
| 
 | 
 | ||||||
| @ -7254,21 +7242,7 @@ void MainWindow::buildQueryMenu(QMenu * menu, QString call){ | |||||||
|         if(m_config.transmit_directed()) toggleTx(true); |         if(m_config.transmit_directed()) toggleTx(true); | ||||||
|     }); |     }); | ||||||
| 
 | 
 | ||||||
|     auto qtcAction = menu->addAction(QString("%1 QTC - Send my station message").arg(call).trimmed()); |     auto qthAction = menu->addAction(QString("%1 QTH - Send my station message").arg(call).trimmed()); | ||||||
|     qtcAction->setDisabled(emptyQTC); |  | ||||||
|     connect(qtcAction, &QAction::triggered, this, [this](){ |  | ||||||
| 
 |  | ||||||
|         QString selectedCall = callsignSelected(); |  | ||||||
|         if(selectedCall.isEmpty()){ |  | ||||||
|             return; |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         addMessageText(QString("%1 QTC %2").arg(selectedCall).arg(m_config.my_station()), true); |  | ||||||
| 
 |  | ||||||
|         if(m_config.transmit_directed()) toggleTx(true); |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     auto qthAction = menu->addAction(QString("%1 QTH - Send my station location message").arg(call).trimmed()); |  | ||||||
|     qthAction->setDisabled(emptyQTH); |     qthAction->setDisabled(emptyQTH); | ||||||
|     connect(qthAction, &QAction::triggered, this, [this](){ |     connect(qthAction, &QAction::triggered, this, [this](){ | ||||||
| 
 | 
 | ||||||
| @ -7313,7 +7287,7 @@ void MainWindow::buildQueryMenu(QMenu * menu, QString call){ | |||||||
|         if(m_config.transmit_directed()) toggleTx(true); |         if(m_config.transmit_directed()) toggleTx(true); | ||||||
|     }); |     }); | ||||||
| 
 | 
 | ||||||
|     auto qthQueryAction = menu->addAction(QString("%1 QTH? - What is your QTH message?").arg(call).trimmed()); |     auto qthQueryAction = menu->addAction(QString("%1 QTH? - What is your station message?").arg(call).trimmed()); | ||||||
|     qthQueryAction->setDisabled(isAllCall); |     qthQueryAction->setDisabled(isAllCall); | ||||||
|     connect(qthQueryAction, &QAction::triggered, this, [this](){ |     connect(qthQueryAction, &QAction::triggered, this, [this](){ | ||||||
| 
 | 
 | ||||||
| @ -7341,20 +7315,6 @@ void MainWindow::buildQueryMenu(QMenu * menu, QString call){ | |||||||
|         if(m_config.transmit_directed()) toggleTx(true); |         if(m_config.transmit_directed()) toggleTx(true); | ||||||
|     }); |     }); | ||||||
| 
 | 
 | ||||||
|     auto stationMessageQueryAction = menu->addAction(QString("%1 QTC? - What is your station message?").arg(call).trimmed()); |  | ||||||
|     stationMessageQueryAction->setDisabled(isAllCall); |  | ||||||
|     connect(stationMessageQueryAction, &QAction::triggered, this, [this](){ |  | ||||||
| 
 |  | ||||||
|         QString selectedCall = callsignSelected(); |  | ||||||
|         if(selectedCall.isEmpty()){ |  | ||||||
|             return; |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         addMessageText(QString("%1 QTC?").arg(selectedCall), true); |  | ||||||
| 
 |  | ||||||
|         if(m_config.transmit_directed()) toggleTx(true); |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     auto stationIdleQueryAction = menu->addAction(QString("%1 STATUS? - What is the status of your station (auto, hb, version, etc)?").arg(call).trimmed()); |     auto stationIdleQueryAction = menu->addAction(QString("%1 STATUS? - What is the status of your station (auto, hb, version, etc)?").arg(call).trimmed()); | ||||||
|     stationIdleQueryAction->setDisabled(isAllCall); |     stationIdleQueryAction->setDisabled(isAllCall); | ||||||
|     connect(stationIdleQueryAction, &QAction::triggered, this, [this](){ |     connect(stationIdleQueryAction, &QAction::triggered, this, [this](){ | ||||||
| @ -7639,7 +7599,6 @@ QMap<QString, QString> MainWindow::buildMacroValues(){ | |||||||
|         {"<MYCALL>", m_config.my_callsign()}, |         {"<MYCALL>", m_config.my_callsign()}, | ||||||
|         {"<MYGRID4>", m_config.my_grid().left(4)}, |         {"<MYGRID4>", m_config.my_grid().left(4)}, | ||||||
|         {"<MYGRID12>", m_config.my_grid().left(12)}, |         {"<MYGRID12>", m_config.my_grid().left(12)}, | ||||||
|         {"<MYQTC>", m_config.my_station()}, |  | ||||||
|         {"<MYQTH>", m_config.my_qth()}, |         {"<MYQTH>", m_config.my_qth()}, | ||||||
|         {"<MYCQ>", m_config.cq_message()}, |         {"<MYCQ>", m_config.cq_message()}, | ||||||
|         {"<MYREPLY>", m_config.reply_message()}, |         {"<MYREPLY>", m_config.reply_message()}, | ||||||
| @ -7659,7 +7618,6 @@ QMap<QString, QString> MainWindow::buildMacroValues(){ | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     // these macros can have recursive macros
 |     // these macros can have recursive macros
 | ||||||
|     values["<MYQTC>"]   = replaceMacros(values["<MYQTC>"], values, false); |  | ||||||
|     values["<MYQTH>"]   = replaceMacros(values["<MYQTH>"], values, false); |     values["<MYQTH>"]   = replaceMacros(values["<MYQTH>"], values, false); | ||||||
|     values["<MYCQ>"]    = replaceMacros(values["<MYCQ>"], values, false); |     values["<MYCQ>"]    = replaceMacros(values["<MYCQ>"], values, false); | ||||||
|     values["<MYREPLY>"] = replaceMacros(values["<MYREPLY>"], values, false); |     values["<MYREPLY>"] = replaceMacros(values["<MYREPLY>"], values, false); | ||||||
| @ -8598,7 +8556,7 @@ bool MainWindow::shortList(QString callsign) | |||||||
| void MainWindow::pskSetLocal () | void MainWindow::pskSetLocal () | ||||||
| { | { | ||||||
|   psk_Reporter->setLocalStation(m_config.my_callsign (), m_config.my_grid (), |   psk_Reporter->setLocalStation(m_config.my_callsign (), m_config.my_grid (), | ||||||
|         m_config.my_station(), QString {"JS8Call v" + version() }.simplified ()); |         m_config.my_qth(), QString {"JS8Call v" + version() }.simplified ()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void MainWindow::aprsSetLocal () | void MainWindow::aprsSetLocal () | ||||||
| @ -8893,7 +8851,6 @@ void MainWindow::updateButtonDisplay(){ | |||||||
|     ui->cqMacroButton->setDisabled(isTransmitting); |     ui->cqMacroButton->setDisabled(isTransmitting); | ||||||
|     ui->replyMacroButton->setDisabled(isTransmitting || emptyCallsign); |     ui->replyMacroButton->setDisabled(isTransmitting || emptyCallsign); | ||||||
|     ui->snrMacroButton->setDisabled(isTransmitting || emptyCallsign); |     ui->snrMacroButton->setDisabled(isTransmitting || emptyCallsign); | ||||||
|     ui->qtcMacroButton->setDisabled(isTransmitting || m_config.my_station().isEmpty()); |  | ||||||
|     ui->qthMacroButton->setDisabled(isTransmitting || m_config.my_qth().isEmpty()); |     ui->qthMacroButton->setDisabled(isTransmitting || m_config.my_qth().isEmpty()); | ||||||
|     ui->macrosMacroButton->setDisabled(isTransmitting); |     ui->macrosMacroButton->setDisabled(isTransmitting); | ||||||
|     ui->queryButton->setDisabled(isTransmitting || emptyCallsign); |     ui->queryButton->setDisabled(isTransmitting || emptyCallsign); | ||||||
| @ -9822,15 +9779,6 @@ void MainWindow::processCommandActivity() { | |||||||
|             reply = QString("%1 GRID %2").arg(d.from).arg(grid); |             reply = QString("%1 GRID %2").arg(d.from).arg(grid); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         // QUERIED STATION MESSAGE
 |  | ||||||
|         else if (d.cmd == " QTC?" && !isAllCall) { |  | ||||||
|             QString qtc = m_config.my_station(); |  | ||||||
|             if(qtc.isEmpty()) { |  | ||||||
|                 continue; |  | ||||||
|             } |  | ||||||
|             reply = QString("%1 QTC %2").arg(d.from).arg(replaceMacros(qtc, buildMacroValues(), true)); |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         // QUERIED STATIONS HEARD
 |         // QUERIED STATIONS HEARD
 | ||||||
|         else if (d.cmd == " HEARING?" && !isAllCall) { |         else if (d.cmd == " HEARING?" && !isAllCall) { | ||||||
|             int i = 0; |             int i = 0; | ||||||
| @ -10017,18 +9965,7 @@ void MainWindow::processCommandActivity() { | |||||||
|         // PROCESS BUFFERED QUERY MSGS
 |         // PROCESS BUFFERED QUERY MSGS
 | ||||||
|         else if (d.cmd == " QUERY MSGS" && ui->autoReplyButton->isChecked()){ |         else if (d.cmd == " QUERY MSGS" && ui->autoReplyButton->isChecked()){ | ||||||
|             auto who = d.from; |             auto who = d.from; | ||||||
| #if 0 |             auto cmd = | ||||||
|             QString key; |  | ||||||
|             if(d.text.isEmpty()){ |  | ||||||
|                 key = who; |  | ||||||
|             } else { |  | ||||||
|                 QStringList segs = d.text.trimmed().split(" "); |  | ||||||
|                 if(segs.isEmpty()){ |  | ||||||
|                     continue; |  | ||||||
|                 } |  | ||||||
|                 key = segs.first(); |  | ||||||
|             } |  | ||||||
| #endif |  | ||||||
| 
 | 
 | ||||||
|             auto inbox = Inbox(inboxPath()); |             auto inbox = Inbox(inboxPath()); | ||||||
|             if(!inbox.open()){ |             if(!inbox.open()){ | ||||||
| @ -10050,6 +9987,8 @@ void MainWindow::processCommandActivity() { | |||||||
|                     break; |                     break; | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  | 
 | ||||||
|  |             reply = replies.join("\n"); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         // PROCESS BUFFERED QUERY CALL
 |         // PROCESS BUFFERED QUERY CALL
 | ||||||
| @ -11011,8 +10950,8 @@ void MainWindow::networkMessage(Message const &message) | |||||||
|     // STATION.GET_CALLSIGN - Get the current callsign
 |     // STATION.GET_CALLSIGN - Get the current callsign
 | ||||||
|     // STATION.GET_GRID - Get the current grid locator
 |     // STATION.GET_GRID - Get the current grid locator
 | ||||||
|     // STATION.SET_GRID - Set the current grid locator
 |     // STATION.SET_GRID - Set the current grid locator
 | ||||||
|     // STATION.GET_QTC - Get the current station message
 |     // STATION.GET_QTH - Get the current station qth
 | ||||||
|     // STATION.SET_QTC - Set the current station message
 |     // STATION.SET_QTH - Set the current station qth
 | ||||||
|     if(type == "STATION.GET_CALLSIGN"){ |     if(type == "STATION.GET_CALLSIGN"){ | ||||||
|         sendNetworkMessage("STATION.CALLSIGN", m_config.my_callsign()); |         sendNetworkMessage("STATION.CALLSIGN", m_config.my_callsign()); | ||||||
|         return; |         return; | ||||||
| @ -11029,14 +10968,14 @@ void MainWindow::networkMessage(Message const &message) | |||||||
|         return; |         return; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     if(type == "STATION.GET_QTC"){ |     if(type == "STATION.GET_QTH"){ | ||||||
|         sendNetworkMessage("STATION.QTC", m_config.my_station()); |         sendNetworkMessage("STATION.QTH", m_config.my_qth()); | ||||||
|         return; |         return; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     if(type == "STATION.SET_QTC"){ |     if(type == "STATION.SET_QTH"){ | ||||||
|         m_config.set_dynamic_station_message(message.value()); |         m_config.set_dynamic_station_qth(message.value()); | ||||||
|         sendNetworkMessage("STATION.QTC", m_config.my_station()); |         sendNetworkMessage("STATION.QTH", m_config.my_qth()); | ||||||
|         return; |         return; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -293,7 +293,6 @@ private slots: | |||||||
|   void on_replyMacroButton_clicked(); |   void on_replyMacroButton_clicked(); | ||||||
|   void on_snrMacroButton_clicked(); |   void on_snrMacroButton_clicked(); | ||||||
|   void on_qthMacroButton_clicked(); |   void on_qthMacroButton_clicked(); | ||||||
|   void on_qtcMacroButton_clicked(); |  | ||||||
|   void setShowColumn(QString tableKey, QString columnKey, bool value); |   void setShowColumn(QString tableKey, QString columnKey, bool value); | ||||||
|   bool showColumn(QString tableKey, QString columnKey, bool default_=true); |   bool showColumn(QString tableKey, QString columnKey, bool default_=true); | ||||||
|   void buildShowColumnsMenu(QMenu *menu, QString tableKey); |   void buildShowColumnsMenu(QMenu *menu, QString tableKey); | ||||||
|  | |||||||
							
								
								
									
										276
									
								
								mainwindow.ui
									
									
									
									
									
								
							
							
						
						
									
										276
									
								
								mainwindow.ui
									
									
									
									
									
								
							| @ -1315,7 +1315,131 @@ QTextEdit[transmitting="true"] { | |||||||
|         <property name="bottomMargin"> |         <property name="bottomMargin"> | ||||||
|          <number>0</number> |          <number>0</number> | ||||||
|         </property> |         </property> | ||||||
|  |         <item row="1" column="14"> | ||||||
|  |          <spacer name="horizontalSpacer_5"> | ||||||
|  |           <property name="orientation"> | ||||||
|  |            <enum>Qt::Horizontal</enum> | ||||||
|  |           </property> | ||||||
|  |           <property name="sizeType"> | ||||||
|  |            <enum>QSizePolicy::Preferred</enum> | ||||||
|  |           </property> | ||||||
|  |           <property name="sizeHint" stdset="0"> | ||||||
|  |            <size> | ||||||
|  |             <width>20</width> | ||||||
|  |             <height>10</height> | ||||||
|  |            </size> | ||||||
|  |           </property> | ||||||
|  |          </spacer> | ||||||
|  |         </item> | ||||||
|  |         <item row="1" column="6"> | ||||||
|  |          <widget class="QPushButton" name="macrosMacroButton"> | ||||||
|  |           <property name="minimumSize"> | ||||||
|  |            <size> | ||||||
|  |             <width>0</width> | ||||||
|  |             <height>30</height> | ||||||
|  |            </size> | ||||||
|  |           </property> | ||||||
|  |           <property name="toolTip"> | ||||||
|  |            <string><html><head/><body><p>Send a saved message</p></body></html></string> | ||||||
|  |           </property> | ||||||
|  |           <property name="text"> | ||||||
|  |            <string>Saved</string> | ||||||
|  |           </property> | ||||||
|  |          </widget> | ||||||
|  |         </item> | ||||||
|  |         <item row="1" column="3"> | ||||||
|  |          <widget class="QPushButton" name="replyMacroButton"> | ||||||
|  |           <property name="minimumSize"> | ||||||
|  |            <size> | ||||||
|  |             <width>0</width> | ||||||
|  |             <height>30</height> | ||||||
|  |            </size> | ||||||
|  |           </property> | ||||||
|  |           <property name="toolTip"> | ||||||
|  |            <string><html><head/><body><p>Reply to a CQ</p></body></html></string> | ||||||
|  |           </property> | ||||||
|  |           <property name="text"> | ||||||
|  |            <string>Reply</string> | ||||||
|  |           </property> | ||||||
|  |          </widget> | ||||||
|  |         </item> | ||||||
|  |         <item row="1" column="4"> | ||||||
|  |          <widget class="QPushButton" name="snrMacroButton"> | ||||||
|  |           <property name="minimumSize"> | ||||||
|  |            <size> | ||||||
|  |             <width>0</width> | ||||||
|  |             <height>30</height> | ||||||
|  |            </size> | ||||||
|  |           </property> | ||||||
|  |           <property name="toolTip"> | ||||||
|  |            <string><html><head/><body><p>Send an SNR message</p></body></html></string> | ||||||
|  |           </property> | ||||||
|  |           <property name="text"> | ||||||
|  |            <string>SNR</string> | ||||||
|  |           </property> | ||||||
|  |          </widget> | ||||||
|  |         </item> | ||||||
|         <item row="1" column="16"> |         <item row="1" column="16"> | ||||||
|  |          <widget class="QPushButton" name="stopTxButton"> | ||||||
|  |           <property name="minimumSize"> | ||||||
|  |            <size> | ||||||
|  |             <width>75</width> | ||||||
|  |             <height>30</height> | ||||||
|  |            </size> | ||||||
|  |           </property> | ||||||
|  |           <property name="toolTip"> | ||||||
|  |            <string><html><head/><body><p>Stop transmitting</p></body></html></string> | ||||||
|  |           </property> | ||||||
|  |           <property name="text"> | ||||||
|  |            <string>Halt</string> | ||||||
|  |           </property> | ||||||
|  |          </widget> | ||||||
|  |         </item> | ||||||
|  |         <item row="1" column="5"> | ||||||
|  |          <widget class="QPushButton" name="qthMacroButton"> | ||||||
|  |           <property name="minimumSize"> | ||||||
|  |            <size> | ||||||
|  |             <width>0</width> | ||||||
|  |             <height>30</height> | ||||||
|  |            </size> | ||||||
|  |           </property> | ||||||
|  |           <property name="toolTip"> | ||||||
|  |            <string><html><head/><body><p>Send your station location message</p></body></html></string> | ||||||
|  |           </property> | ||||||
|  |           <property name="text"> | ||||||
|  |            <string>QTH</string> | ||||||
|  |           </property> | ||||||
|  |          </widget> | ||||||
|  |         </item> | ||||||
|  |         <item row="1" column="0"> | ||||||
|  |          <widget class="QPushButton" name="hbMacroButton"> | ||||||
|  |           <property name="minimumSize"> | ||||||
|  |            <size> | ||||||
|  |             <width>0</width> | ||||||
|  |             <height>30</height> | ||||||
|  |            </size> | ||||||
|  |           </property> | ||||||
|  |           <property name="toolTip"> | ||||||
|  |            <string><html><head/><body><p align="justify">Send a Heartbeat message</p></body></html></string> | ||||||
|  |           </property> | ||||||
|  |           <property name="autoFillBackground"> | ||||||
|  |            <bool>true</bool> | ||||||
|  |           </property> | ||||||
|  |           <property name="styleSheet"> | ||||||
|  |            <string notr="true">QPushButton:checked {  | ||||||
|  |   font-weight:bold; | ||||||
|  |   color:black; | ||||||
|  | }</string> | ||||||
|  |           </property> | ||||||
|  |           <property name="text"> | ||||||
|  |            <string>HB</string> | ||||||
|  |           </property> | ||||||
|  |           <property name="checkable"> | ||||||
|  |            <bool>true</bool> | ||||||
|  |           </property> | ||||||
|  |          </widget> | ||||||
|  |         </item> | ||||||
|  |         <item row="1" column="15"> | ||||||
|          <widget class="QPushButton" name="startTxButton"> |          <widget class="QPushButton" name="startTxButton"> | ||||||
|           <property name="enabled"> |           <property name="enabled"> | ||||||
|            <bool>false</bool> |            <bool>false</bool> | ||||||
| @ -1350,55 +1474,7 @@ color:#222; | |||||||
|           </property> |           </property> | ||||||
|          </widget> |          </widget> | ||||||
|         </item> |         </item> | ||||||
|         <item row="1" column="17"> |         <item row="1" column="12"> | ||||||
|          <widget class="QPushButton" name="stopTxButton"> |  | ||||||
|           <property name="minimumSize"> |  | ||||||
|            <size> |  | ||||||
|             <width>75</width> |  | ||||||
|             <height>30</height> |  | ||||||
|            </size> |  | ||||||
|           </property> |  | ||||||
|           <property name="toolTip"> |  | ||||||
|            <string><html><head/><body><p>Stop transmitting</p></body></html></string> |  | ||||||
|           </property> |  | ||||||
|           <property name="text"> |  | ||||||
|            <string>Halt</string> |  | ||||||
|           </property> |  | ||||||
|          </widget> |  | ||||||
|         </item> |  | ||||||
|         <item row="1" column="15"> |  | ||||||
|          <spacer name="horizontalSpacer_5"> |  | ||||||
|           <property name="orientation"> |  | ||||||
|            <enum>Qt::Horizontal</enum> |  | ||||||
|           </property> |  | ||||||
|           <property name="sizeType"> |  | ||||||
|            <enum>QSizePolicy::Preferred</enum> |  | ||||||
|           </property> |  | ||||||
|           <property name="sizeHint" stdset="0"> |  | ||||||
|            <size> |  | ||||||
|             <width>20</width> |  | ||||||
|             <height>10</height> |  | ||||||
|            </size> |  | ||||||
|           </property> |  | ||||||
|          </spacer> |  | ||||||
|         </item> |  | ||||||
|         <item row="1" column="5"> |  | ||||||
|          <widget class="QPushButton" name="qthMacroButton"> |  | ||||||
|           <property name="minimumSize"> |  | ||||||
|            <size> |  | ||||||
|             <width>0</width> |  | ||||||
|             <height>30</height> |  | ||||||
|            </size> |  | ||||||
|           </property> |  | ||||||
|           <property name="toolTip"> |  | ||||||
|            <string><html><head/><body><p>Send your station location message</p></body></html></string> |  | ||||||
|           </property> |  | ||||||
|           <property name="text"> |  | ||||||
|            <string>QTH</string> |  | ||||||
|           </property> |  | ||||||
|          </widget> |  | ||||||
|         </item> |  | ||||||
|         <item row="1" column="13"> |  | ||||||
|          <widget class="QPushButton" name="deselectButton"> |          <widget class="QPushButton" name="deselectButton"> | ||||||
|           <property name="sizePolicy"> |           <property name="sizePolicy"> | ||||||
|            <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> |            <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> | ||||||
| @ -1420,8 +1496,8 @@ color:#222; | |||||||
|           </property> |           </property> | ||||||
|          </widget> |          </widget> | ||||||
|         </item> |         </item> | ||||||
|         <item row="1" column="4"> |         <item row="1" column="11"> | ||||||
|          <widget class="QPushButton" name="snrMacroButton"> |          <widget class="QPushButton" name="queryButton"> | ||||||
|           <property name="minimumSize"> |           <property name="minimumSize"> | ||||||
|            <size> |            <size> | ||||||
|             <width>0</width> |             <width>0</width> | ||||||
| @ -1429,14 +1505,14 @@ color:#222; | |||||||
|            </size> |            </size> | ||||||
|           </property> |           </property> | ||||||
|           <property name="toolTip"> |           <property name="toolTip"> | ||||||
|            <string><html><head/><body><p>Send an SNR message</p></body></html></string> |            <string><html><head/><body><p>Send a directed message to another station</p></body></html></string> | ||||||
|           </property> |           </property> | ||||||
|           <property name="text"> |           <property name="text"> | ||||||
|            <string>SNR</string> |            <string>Directed</string> | ||||||
|           </property> |           </property> | ||||||
|          </widget> |          </widget> | ||||||
|         </item> |         </item> | ||||||
|         <item row="1" column="8"> |         <item row="1" column="7"> | ||||||
|          <spacer name="horizontalSpacer_8"> |          <spacer name="horizontalSpacer_8"> | ||||||
|           <property name="orientation"> |           <property name="orientation"> | ||||||
|            <enum>Qt::Horizontal</enum> |            <enum>Qt::Horizontal</enum> | ||||||
| @ -1452,22 +1528,6 @@ color:#222; | |||||||
|           </property> |           </property> | ||||||
|          </spacer> |          </spacer> | ||||||
|         </item> |         </item> | ||||||
|         <item row="1" column="3"> |  | ||||||
|          <widget class="QPushButton" name="replyMacroButton"> |  | ||||||
|           <property name="minimumSize"> |  | ||||||
|            <size> |  | ||||||
|             <width>0</width> |  | ||||||
|             <height>30</height> |  | ||||||
|            </size> |  | ||||||
|           </property> |  | ||||||
|           <property name="toolTip"> |  | ||||||
|            <string><html><head/><body><p>Reply to a CQ</p></body></html></string> |  | ||||||
|           </property> |  | ||||||
|           <property name="text"> |  | ||||||
|            <string>Reply</string> |  | ||||||
|           </property> |  | ||||||
|          </widget> |  | ||||||
|         </item> |  | ||||||
|         <item row="1" column="1"> |         <item row="1" column="1"> | ||||||
|          <widget class="QPushButton" name="cqMacroButton"> |          <widget class="QPushButton" name="cqMacroButton"> | ||||||
|           <property name="minimumSize"> |           <property name="minimumSize"> | ||||||
| @ -1499,82 +1559,6 @@ color:#222; | |||||||
|           </property> |           </property> | ||||||
|          </widget> |          </widget> | ||||||
|         </item> |         </item> | ||||||
|         <item row="1" column="6"> |  | ||||||
|          <widget class="QPushButton" name="qtcMacroButton"> |  | ||||||
|           <property name="minimumSize"> |  | ||||||
|            <size> |  | ||||||
|             <width>0</width> |  | ||||||
|             <height>30</height> |  | ||||||
|            </size> |  | ||||||
|           </property> |  | ||||||
|           <property name="toolTip"> |  | ||||||
|            <string><html><head/><body><p>Send your station message</p></body></html></string> |  | ||||||
|           </property> |  | ||||||
|           <property name="text"> |  | ||||||
|            <string>QTC</string> |  | ||||||
|           </property> |  | ||||||
|          </widget> |  | ||||||
|         </item> |  | ||||||
|         <item row="1" column="7"> |  | ||||||
|          <widget class="QPushButton" name="macrosMacroButton"> |  | ||||||
|           <property name="minimumSize"> |  | ||||||
|            <size> |  | ||||||
|             <width>0</width> |  | ||||||
|             <height>30</height> |  | ||||||
|            </size> |  | ||||||
|           </property> |  | ||||||
|           <property name="toolTip"> |  | ||||||
|            <string><html><head/><body><p>Send a saved message</p></body></html></string> |  | ||||||
|           </property> |  | ||||||
|           <property name="text"> |  | ||||||
|            <string>Saved</string> |  | ||||||
|           </property> |  | ||||||
|          </widget> |  | ||||||
|         </item> |  | ||||||
|         <item row="1" column="12"> |  | ||||||
|          <widget class="QPushButton" name="queryButton"> |  | ||||||
|           <property name="minimumSize"> |  | ||||||
|            <size> |  | ||||||
|             <width>0</width> |  | ||||||
|             <height>30</height> |  | ||||||
|            </size> |  | ||||||
|           </property> |  | ||||||
|           <property name="toolTip"> |  | ||||||
|            <string><html><head/><body><p>Send a directed message to another station</p></body></html></string> |  | ||||||
|           </property> |  | ||||||
|           <property name="text"> |  | ||||||
|            <string>Directed</string> |  | ||||||
|           </property> |  | ||||||
|          </widget> |  | ||||||
|         </item> |  | ||||||
|         <item row="1" column="0"> |  | ||||||
|          <widget class="QPushButton" name="hbMacroButton"> |  | ||||||
|           <property name="minimumSize"> |  | ||||||
|            <size> |  | ||||||
|             <width>0</width> |  | ||||||
|             <height>30</height> |  | ||||||
|            </size> |  | ||||||
|           </property> |  | ||||||
|           <property name="toolTip"> |  | ||||||
|            <string><html><head/><body><p align="justify">Send a Heartbeat message</p></body></html></string> |  | ||||||
|           </property> |  | ||||||
|           <property name="autoFillBackground"> |  | ||||||
|            <bool>true</bool> |  | ||||||
|           </property> |  | ||||||
|           <property name="styleSheet"> |  | ||||||
|            <string notr="true">QPushButton:checked {  |  | ||||||
|   font-weight:bold; |  | ||||||
|   color:black; |  | ||||||
| }</string> |  | ||||||
|           </property> |  | ||||||
|           <property name="text"> |  | ||||||
|            <string>HB</string> |  | ||||||
|           </property> |  | ||||||
|           <property name="checkable"> |  | ||||||
|            <bool>true</bool> |  | ||||||
|           </property> |  | ||||||
|          </widget> |  | ||||||
|         </item> |  | ||||||
|        </layout> |        </layout> | ||||||
|       </widget> |       </widget> | ||||||
|       <widget class="QFrame" name="frame_5"> |       <widget class="QFrame" name="frame_5"> | ||||||
|  | |||||||
							
								
								
									
										16
									
								
								varicode.cpp
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								varicode.cpp
									
									
									
									
									
								
							| @ -51,7 +51,7 @@ QMap<QString, int> directed_cmds = { | |||||||
| 
 | 
 | ||||||
|     {" QTH?",     1  }, // query qth
 |     {" QTH?",     1  }, // query qth
 | ||||||
| 
 | 
 | ||||||
|     {" QTC?",     2  }, // query station message
 |     //{" ",     2  }, // unused
 | ||||||
| 
 | 
 | ||||||
|     {" HEARING?", 3  }, // query station calls heard
 |     {" HEARING?", 3  }, // query station calls heard
 | ||||||
| 
 | 
 | ||||||
| @ -73,14 +73,16 @@ QMap<QString, int> directed_cmds = { | |||||||
| 
 | 
 | ||||||
|     {" QUERY",        11 }, // generic query
 |     {" QUERY",        11 }, // generic query
 | ||||||
| 
 | 
 | ||||||
|     {" QUERY MSGS",    12 }, // do you have any stored messages?
 |     {" QUERY MSGS",   12 }, // do you have any stored messages?
 | ||||||
| 
 | 
 | ||||||
|     {" QUERY CALL",   13 }, // can you transmit a ping to callsign?
 |     {" QUERY CALL",   13 }, // can you transmit a ping to callsign?
 | ||||||
| 
 | 
 | ||||||
|     {" APRS:",   14  }, // send an aprs packet
 |     {" APRS:",   14  }, // send an aprs packet
 | ||||||
| 
 | 
 | ||||||
|     {" GRID",    15  }, // this is my current grid locator
 |     {" GRID",    15  }, // this is my current grid locator
 | ||||||
|     {" QTC",     16  }, // this is my qtc message
 | 
 | ||||||
|  |     //{" ",     16  }, // unused
 | ||||||
|  | 
 | ||||||
|     {" QTH",     17  }, // this is my qth message
 |     {" QTH",     17  }, // this is my qth message
 | ||||||
| 
 | 
 | ||||||
|     {" FB",      18  }, // fine business
 |     {" FB",      18  }, // fine business
 | ||||||
| @ -89,7 +91,9 @@ QMap<QString, int> directed_cmds = { | |||||||
|     {" RR",      21  }, // roger roger
 |     {" RR",      21  }, // roger roger
 | ||||||
|     {" QSL?",    22  }, // do you copy?
 |     {" QSL?",    22  }, // do you copy?
 | ||||||
|     {" QSL",     23  }, // i copy
 |     {" QSL",     23  }, // i copy
 | ||||||
|  | 
 | ||||||
|     // {" ",     24  }, // unused
 |     // {" ",     24  }, // unused
 | ||||||
|  | 
 | ||||||
|     {" SNR",     25  }, // seen a station at the provided snr
 |     {" SNR",     25  }, // seen a station at the provided snr
 | ||||||
|     {" NO",      26  }, // negative confirm
 |     {" NO",      26  }, // negative confirm
 | ||||||
|     {" YES",     27  }, // confirm
 |     {" YES",     27  }, // confirm
 | ||||||
| @ -101,10 +105,10 @@ QMap<QString, int> directed_cmds = { | |||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| // commands allowed to be processed
 | // commands allowed to be processed
 | ||||||
| QSet<int> allowed_cmds = {-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, /*24,*/ 25, 26, 27, 28, 29, 30, 31}; | QSet<int> allowed_cmds = {-1, 0, 1, /*2,*/ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, /*16,*/ 17, 18, 19, 20, 21, 22, 23, /*24,*/ 25, 26, 27, 28, 29, 30, 31}; | ||||||
| 
 | 
 | ||||||
| // commands that result in an autoreply
 | // commands that result in an autoreply
 | ||||||
| QSet<int> autoreply_cmds = {0, 1, 2, 3, 4, 6, 10, 12, 13, 30}; | QSet<int> autoreply_cmds = {0, 1, 3, 4, 6, 10, 12, 13, 30}; | ||||||
| 
 | 
 | ||||||
| // commands that should be buffered
 | // commands that should be buffered
 | ||||||
| QSet<int> buffered_cmds = {3, 5, /*6,*/ /*7,*/ 10, 11, 12, 13, 14, 15}; | QSet<int> buffered_cmds = {3, 5, /*6,*/ /*7,*/ 10, 11, 12, 13, 14, 15}; | ||||||
| @ -124,7 +128,7 @@ QMap<int, int> checksum_cmds = { | |||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| QString callsign_pattern = QString("(?<callsign>[@]?[A-Z0-9/]+)"); | QString callsign_pattern = QString("(?<callsign>[@]?[A-Z0-9/]+)"); | ||||||
| QString optional_cmd_pattern = QString("(?<cmd>\\s?(?:AGN[?]|QSL[?]|HW CPY[?]|APRS[:]|MSG TO[:]|SNR[?]|QTC[?]|QTH[?]|GRID[?]|STATUS[?]|HEARING[?]|(?:(?:STATUS|HEARING|QUERY CALL|QUERY MSGS|QUERY|ACK|73|YES|NO|SNR|QSL|RR|SK|FB|QTH|QTC|GRID|TU)(?=[ ]|$))|[?> ]))?"); | QString optional_cmd_pattern = QString("(?<cmd>\\s?(?:AGN[?]|QSL[?]|HW CPY[?]|APRS[:]|MSG TO[:]|SNR[?]|QTH[?]|GRID[?]|STATUS[?]|HEARING[?]|(?:(?:STATUS|HEARING|QUERY CALL|QUERY MSGS|QUERY|ACK|73|YES|NO|SNR|QSL|RR|SK|FB|QTH|GRID|TU)(?=[ ]|$))|[?> ]))?"); | ||||||
| QString optional_grid_pattern = QString("(?<grid>\\s?[A-R]{2}[0-9]{2})?"); | QString optional_grid_pattern = QString("(?<grid>\\s?[A-R]{2}[0-9]{2})?"); | ||||||
| QString optional_extended_grid_pattern = QString("^(?<grid>\\s?(?:[A-R]{2}[0-9]{2}(?:[A-X]{2}(?:[0-9]{2})?)*))?"); | QString optional_extended_grid_pattern = QString("^(?<grid>\\s?(?:[A-R]{2}[0-9]{2}(?:[A-X]{2}(?:[0-9]{2})?)*))?"); | ||||||
| QString optional_num_pattern = QString("(?<num>(?<=SNR|ACK)\\s?[-+]?(?:3[01]|[0-2]?[0-9]))?"); | QString optional_num_pattern = QString("(?<num>(?<=SNR|ACK)\\s?[-+]?(?:3[01]|[0-2]?[0-9]))?"); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Jordan Sherer
						Jordan Sherer