diff --git a/Configuration.cpp b/Configuration.cpp index 064fa5c..dc08907 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -455,7 +455,7 @@ private: Q_SLOT void on_delete_macro_push_button_clicked (bool = false); Q_SLOT void on_PTT_method_button_group_buttonClicked (int); Q_SLOT void on_groups_line_edit_textChanged(QString const&); - Q_SLOT void on_qth_message_line_edit_textChanged(QString const&); + Q_SLOT void on_info_message_line_edit_textChanged(QString const&); Q_SLOT void on_cq_message_line_edit_textChanged(QString const&); Q_SLOT void on_reply_message_line_edit_textChanged(QString const&); Q_SLOT void on_add_macro_line_edit_editingFinished (); @@ -582,7 +582,7 @@ private: bool frequency_calibration_disabled_; // not persistent unsigned transceiver_command_number_; QString dynamic_grid_; - QString dynamic_qth_; + QString dynamic_info_; // configuration fields that we publish bool auto_switch_bands_; @@ -591,7 +591,7 @@ private: QStringList my_groups_; QStringList auto_whitelist_; QStringList auto_blacklist_; - QString my_qth_; + QString my_info_; QString cq_; QString reply_; int callsign_aging_; @@ -976,14 +976,14 @@ QSet Configuration::auto_blacklist() const { return QSet::fromList(m_->auto_blacklist_); } -QString Configuration::my_qth() const +QString Configuration::my_info() const { - auto qth = m_->my_qth_; - if(m_->use_dynamic_info_ && !m_->dynamic_qth_.isEmpty()){ - qth = m_->dynamic_qth_; + auto info = m_->my_info_; + if(m_->use_dynamic_info_ && !m_->dynamic_info_.isEmpty()){ + info = m_->dynamic_info_; } - return qth.trimmed(); + return info.trimmed(); } QString Configuration::cq_message() const @@ -1011,9 +1011,9 @@ void Configuration::set_dynamic_location (QString const& grid_descriptor) m_->dynamic_grid_ = grid_descriptor.trimmed (); } -void Configuration::set_dynamic_station_qth(QString const& qth) +void Configuration::set_dynamic_station_info(QString const& info) { - m_->dynamic_qth_ = qth.trimmed (); + m_->dynamic_info_ = info.trimmed (); } namespace @@ -1161,7 +1161,7 @@ Configuration::impl::impl (Configuration * self, QDir const& temp_directory, ui_->callsign_line_edit->setValidator (new CallsignValidator {this}); ui_->grid_line_edit->setValidator (new MaidenheadLocatorValidator {this, MaidenheadLocatorValidator::Length::doubleextended}); ui_->add_macro_line_edit->setValidator (new QRegExpValidator {message_alphabet, this}); - ui_->qth_message_line_edit->setValidator (new QRegExpValidator {message_alphabet, this}); + ui_->info_message_line_edit->setValidator (new QRegExpValidator {message_alphabet, this}); ui_->reply_message_line_edit->setValidator (new QRegExpValidator {message_alphabet, this}); ui_->cq_message_line_edit->setValidator (new QRegExpValidator {message_alphabet, this}); ui_->groups_line_edit->setValidator (new QRegExpValidator {message_alphabet, this}); @@ -1169,7 +1169,7 @@ Configuration::impl::impl (Configuration * self, QDir const& temp_directory, setUppercase(ui_->callsign_line_edit); setUppercase(ui_->grid_line_edit); setUppercase(ui_->add_macro_line_edit); - setUppercase(ui_->qth_message_line_edit); + setUppercase(ui_->info_message_line_edit); setUppercase(ui_->reply_message_line_edit); setUppercase(ui_->cq_message_line_edit); setUppercase(ui_->groups_line_edit); @@ -1365,7 +1365,7 @@ void Configuration::impl::initialize_models () ui_->groups_line_edit->setText(my_groups_.join(", ")); ui_->auto_whitelist_line_edit->setText(auto_whitelist_.join(", ")); ui_->auto_blacklist_line_edit->setText(auto_blacklist_.join(", ")); - ui_->qth_message_line_edit->setText (my_qth_.toUpper()); + ui_->info_message_line_edit->setText (my_info_.toUpper()); ui_->cq_message_line_edit->setText(cq_.toUpper()); ui_->reply_message_line_edit->setText (reply_.toUpper()); ui_->use_dynamic_grid->setChecked(use_dynamic_info_); @@ -1512,7 +1512,7 @@ void Configuration::impl::read_settings () auto_blacklist_ = settings_->value("AutoBlacklist", QStringList{}).toStringList(); callsign_aging_ = settings_->value ("CallsignAging", 0).toInt (); activity_aging_ = settings_->value ("ActivityAging", 2).toInt (); - my_qth_ = settings_->value("MyQTH", QString {}).toString(); + my_info_ = settings_->value("MyInfo", QString {}).toString(); cq_ = settings_->value("CQMessage", QString {"CQCQCQ "}).toString(); reply_ = settings_->value("Reply", QString {"HW CPY?"}).toString(); next_color_cq_ = color_cq_ = settings_->value("colorCQ","#66ff66").toString(); @@ -1771,7 +1771,7 @@ void Configuration::impl::write_settings () settings_->setValue ("MyGroups", my_groups_); settings_->setValue ("AutoWhitelist", auto_whitelist_); settings_->setValue ("AutoBlacklist", auto_blacklist_); - settings_->setValue ("MyQTH", my_qth_); + settings_->setValue ("MyInfo", my_info_); settings_->setValue ("CQMessage", cq_); settings_->setValue ("Reply", reply_); settings_->setValue ("CallsignAging", callsign_aging_); @@ -2360,7 +2360,7 @@ void Configuration::impl::accept () auto_blacklist_ = splitCalls(ui_->auto_blacklist_line_edit->text().toUpper().trimmed()); cq_ = ui_->cq_message_line_edit->text().toUpper(); reply_ = ui_->reply_message_line_edit->text().toUpper(); - my_qth_ = ui_->qth_message_line_edit->text().toUpper(); + my_info_ = ui_->info_message_line_edit->text().toUpper(); callsign_aging_ = ui_->callsign_aging_spin_box->value(); activity_aging_ = ui_->activity_aging_spin_box->value(); spot_to_reporting_networks_ = ui_->psk_reporter_check_box->isChecked (); @@ -2787,7 +2787,7 @@ void Configuration::impl::on_groups_line_edit_textChanged(QString const &text) { } -void Configuration::impl::on_qth_message_line_edit_textChanged(QString const &text) +void Configuration::impl::on_info_message_line_edit_textChanged(QString const &text) { } diff --git a/Configuration.hpp b/Configuration.hpp index d0ae899..3a14ee4 100644 --- a/Configuration.hpp +++ b/Configuration.hpp @@ -104,7 +104,7 @@ public: QSet auto_blacklist() const; int activity_aging() const; int callsign_aging() const; - QString my_qth () const; + QString my_info () const; QString cq_message () const; QString reply_message () const; QFont table_font() const; @@ -234,7 +234,7 @@ public: void set_dynamic_location (QString const&); // Set the dynamic station qth message which is only used if configuration setting is enabled. - void set_dynamic_station_qth(QString const& qth); + void set_dynamic_station_info(QString const& info); // This method queries if a CAT and PTT connection is operational. diff --git a/Configuration.ui b/Configuration.ui index 85e7048..86f33c4 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -36,7 +36,7 @@ - 1 + 0 @@ -216,7 +216,7 @@ - + <html><head/><body><p>Station location message that is transmitted in response to &quot;@&quot; directed queries.</p></body></html> @@ -228,7 +228,7 @@ <html><head/><body><p>Station location message</p></body></html> - Station Message (QTH & Equipment): + Station Info (Rig, Antenna, Location, etc): @@ -369,7 +369,7 @@ - Immediately transmit CQ, Reply, QTH, Saved, and Directed messages from the menu + Immediately transmit CQ, Reply, Info, Saved, and Directed messages from the menu @@ -4111,11 +4111,11 @@ soundcard changes - - - + + + diff --git a/mainwindow.cpp b/mainwindow.cpp index 9c3b007..b55498b 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -7127,13 +7127,13 @@ void MainWindow::on_snrMacroButton_clicked(){ if(m_config.transmit_directed()) toggleTx(true); } -void MainWindow::on_qthMacroButton_clicked(){ - QString qth = m_config.my_qth(); - if(qth.isEmpty()){ +void MainWindow::on_infoMacroButton_clicked(){ + QString info = m_config.my_info(); + if(info.isEmpty()){ return; } - addMessageText(QString("QTH %1").arg(replaceMacros(qth, buildMacroValues(), true))); + addMessageText(QString("INFO %1").arg(replaceMacros(info, buildMacroValues(), true))); if(m_config.transmit_directed()) toggleTx(true); } @@ -7263,7 +7263,7 @@ void MainWindow::buildQueryMenu(QMenu * menu, QString call){ auto grid = m_config.my_grid(); - bool emptyQTH = m_config.my_qth().isEmpty(); + bool emptyInfo = m_config.my_info().isEmpty(); bool emptyGrid = m_config.my_grid().isEmpty(); auto callAction = menu->addAction(QString("Send a directed message to selected callsign")); @@ -7310,16 +7310,16 @@ void MainWindow::buildQueryMenu(QMenu * menu, QString call){ if(m_config.transmit_directed()) toggleTx(true); }); - auto qthAction = menu->addAction(QString("%1 QTH - Send my station message").arg(call).trimmed()); - qthAction->setDisabled(emptyQTH); - connect(qthAction, &QAction::triggered, this, [this](){ + auto infoAction = menu->addAction(QString("%1 INFO - Send my station information").arg(call).trimmed()); + infoAction->setDisabled(emptyInfo); + connect(infoAction, &QAction::triggered, this, [this](){ QString selectedCall = callsignSelected(); if(selectedCall.isEmpty()){ return; } - addMessageText(QString("%1 QTH %2").arg(selectedCall).arg(m_config.my_qth()), true); + addMessageText(QString("%1 INFO %2").arg(selectedCall).arg(m_config.my_info()), true); if(m_config.transmit_directed()) toggleTx(true); }); @@ -7355,16 +7355,16 @@ void MainWindow::buildQueryMenu(QMenu * menu, QString call){ if(m_config.transmit_directed()) toggleTx(true); }); - auto qthQueryAction = menu->addAction(QString("%1 QTH? - What is your station message?").arg(call).trimmed()); - qthQueryAction->setDisabled(isAllCall); - connect(qthQueryAction, &QAction::triggered, this, [this](){ + auto infoQueryAction = menu->addAction(QString("%1 INFO? - What is your station information?").arg(call).trimmed()); + infoQueryAction->setDisabled(isAllCall); + connect(infoQueryAction, &QAction::triggered, this, [this](){ QString selectedCall = callsignSelected(); if(selectedCall.isEmpty()){ return; } - addMessageText(QString("%1 QTH?").arg(selectedCall), true); + addMessageText(QString("%1 INFO?").arg(selectedCall), true); if(m_config.transmit_directed()) toggleTx(true); }); @@ -7678,7 +7678,7 @@ QMap MainWindow::buildMacroValues(){ {"", m_config.my_callsign()}, {"", m_config.my_grid().left(4)}, {"", m_config.my_grid().left(12)}, - {"", m_config.my_qth()}, + {"", m_config.my_info()}, {"", m_config.cq_message()}, {"", m_config.reply_message()}, {"", generateStatus()}, @@ -7697,7 +7697,7 @@ QMap MainWindow::buildMacroValues(){ } // these macros can have recursive macros - values[""] = replaceMacros(values[""], values, false); + values[""] = replaceMacros(values[""], values, false); values[""] = replaceMacros(values[""], values, false); values[""] = replaceMacros(values[""], values, false); @@ -8647,7 +8647,7 @@ bool MainWindow::shortList(QString callsign) void MainWindow::pskSetLocal () { psk_Reporter->setLocalStation(m_config.my_callsign (), m_config.my_grid (), - m_config.my_qth(), QString {"JS8Call v" + version() }.simplified ()); + m_config.my_info(), QString {"JS8Call v" + version() }.simplified ()); } void MainWindow::aprsSetLocal () @@ -8937,12 +8937,13 @@ void MainWindow::updateButtonDisplay(){ auto selectedCallsign = callsignSelected(true); bool emptyCallsign = selectedCallsign.isEmpty(); + bool emptyInfo = m_config.my_info().isEmpty(); ui->hbMacroButton->setDisabled(isTransmitting); ui->cqMacroButton->setDisabled(isTransmitting); ui->replyMacroButton->setDisabled(isTransmitting || emptyCallsign); ui->snrMacroButton->setDisabled(isTransmitting || emptyCallsign); - ui->qthMacroButton->setDisabled(isTransmitting || m_config.my_qth().isEmpty()); + ui->infoMacroButton->setDisabled(isTransmitting || emptyInfo); ui->macrosMacroButton->setDisabled(isTransmitting); ui->queryButton->setDisabled(isTransmitting || emptyCallsign); ui->deselectButton->setDisabled(isTransmitting || emptyCallsign); @@ -9864,14 +9865,14 @@ void MainWindow::processCommandActivity() { reply = QString("%1 SNR %2").arg(d.from).arg(Varicode::formatSNR(d.snr)); } - // QUERIED QTH - else if (d.cmd == " QTH?" && !isAllCall) { - QString qth = m_config.my_qth(); - if (qth.isEmpty()) { + // QUERIED INFO + else if (d.cmd == " INFO?" && !isAllCall) { + QString info = m_config.my_info(); + if (info.isEmpty()) { continue; } - reply = QString("%1 QTH %2").arg(d.from).arg(replaceMacros(qth, buildMacroValues(), true)); + reply = QString("%1 INFO %2").arg(d.from).arg(replaceMacros(info, buildMacroValues(), true)); } // QUERIED ACTIVE @@ -11237,8 +11238,8 @@ void MainWindow::networkMessage(Message const &message) // STATION.GET_CALLSIGN - Get the current callsign // STATION.GET_GRID - Get the current grid locator // STATION.SET_GRID - Set the current grid locator - // STATION.GET_QTH - Get the current station qth - // STATION.SET_QTH - Set the current station qth + // STATION.GET_INFO - Get the current station qth + // STATION.SET_INFO - Set the current station qth if(type == "STATION.GET_CALLSIGN"){ sendNetworkMessage("STATION.CALLSIGN", m_config.my_callsign(), { {"_ID", id}, @@ -11261,16 +11262,16 @@ void MainWindow::networkMessage(Message const &message) return; } - if(type == "STATION.GET_QTH"){ - sendNetworkMessage("STATION.QTH", m_config.my_qth(), { + if(type == "STATION.GET_INFO"){ + sendNetworkMessage("STATION.INFO", m_config.my_info(), { {"_ID", id}, }); return; } - if(type == "STATION.SET_QTH"){ - m_config.set_dynamic_station_qth(message.value()); - sendNetworkMessage("STATION.QTH", m_config.my_qth(), { + if(type == "STATION.SET_INFO"){ + m_config.set_dynamic_station_info(message.value()); + sendNetworkMessage("STATION.INFO", m_config.my_info(), { {"_ID", id}, }); return; diff --git a/mainwindow.h b/mainwindow.h index 7f9a598..6759119 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -292,7 +292,7 @@ private slots: void on_cqMacroButton_clicked(); void on_replyMacroButton_clicked(); void on_snrMacroButton_clicked(); - void on_qthMacroButton_clicked(); + void on_infoMacroButton_clicked(); void setShowColumn(QString tableKey, QString columnKey, bool value); bool showColumn(QString tableKey, QString columnKey, bool default_=true); void buildShowColumnsMenu(QMenu *menu, QString tableKey); diff --git a/mainwindow.ui b/mainwindow.ui index df8c59e..f495b0d 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -1396,7 +1396,7 @@ QTextEdit[transmitting="true"] { - + 0 @@ -1404,10 +1404,10 @@ QTextEdit[transmitting="true"] { - <html><head/><body><p>Send your station location message</p></body></html> + <html><head/><body><p>Send your station information</p></body></html> - QTH + Info diff --git a/varicode.cpp b/varicode.cpp index 15029cb..b0f5e07 100644 --- a/varicode.cpp +++ b/varicode.cpp @@ -79,8 +79,8 @@ QMap directed_cmds = { {" GRID", 15 }, // this is my current grid locator - {" QTH?", 16 }, // what is your qth message? - {" QTH", 17 }, // this is my qth message + {" INFO?", 16 }, // what is your info message? + {" INFO", 17 }, // this is my info message {" FB", 18 }, // fine business {" HW CPY?", 19 }, // how do you copy? @@ -128,7 +128,7 @@ QMap checksum_cmds = { }; QString callsign_pattern = QString("(?[@]?[A-Z0-9/]+)"); -QString optional_cmd_pattern = QString("(?\\s?(?:AGN[?]|QSL[?]|HW CPY[?]|APRS[:]|MSG TO[:]|SNR[?]|QTH[?]|GRID[?]|STATUS[?]|HEARING[?]|(?:(?:STATUS|HEARING|QUERY CALL|QUERY MSGS|QUERY|CMD|MSG|ACK|73|YES|NO|SNR|QSL|RR|SK|FB|QTH|GRID)(?=[ ]|$))|[?> ]))?"); +QString optional_cmd_pattern = QString("(?\\s?(?:AGN[?]|QSL[?]|HW CPY[?]|APRS[:]|MSG TO[:]|SNR[?]|INFO[?]|GRID[?]|STATUS[?]|HEARING[?]|(?:(?:STATUS|HEARING|QUERY CALL|QUERY MSGS|QUERY|CMD|MSG|ACK|73|YES|NO|SNR|QSL|RR|SK|FB|INFO|GRID)(?=[ ]|$))|[?> ]))?"); QString optional_grid_pattern = QString("(?\\s?[A-R]{2}[0-9]{2})?"); QString optional_extended_grid_pattern = QString("^(?\\s?(?:[A-R]{2}[0-9]{2}(?:[A-X]{2}(?:[0-9]{2})?)*))?"); QString optional_num_pattern = QString("(?(?<=SNR|ACK)\\s?[-+]?(?:3[01]|[0-2]?[0-9]))?");