diff --git a/Configuration.cpp b/Configuration.cpp index 87ea1c5e7..66c67176d 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -564,6 +564,7 @@ private: bool bHound_; bool x2ToneSpacing_; bool realTimeDecode_; + QString opCall_; QString udp_server_name_; port_type udp_server_port_; bool accept_udp_requests_; @@ -657,6 +658,7 @@ bool Configuration::bHound() const {return m_->bHound_;} bool Configuration::x2ToneSpacing() const {return m_->x2ToneSpacing_;} bool Configuration::realTimeDecode() const {return m_->realTimeDecode_;} bool Configuration::split_mode () const {return m_->split_mode ();} +QString Configuration::opCall() const {return m_->opCall_;} QString Configuration::udp_server_name () const {return m_->udp_server_name_;} auto Configuration::udp_server_port () const -> port_type {return m_->udp_server_port_;} bool Configuration::accept_udp_requests () const {return m_->accept_udp_requests_;} @@ -1139,6 +1141,7 @@ void Configuration::impl::initialize_models () } ui_->TX_audio_source_button_group->button (rig_params_.audio_source)->setChecked (true); ui_->CAT_poll_interval_spin_box->setValue (rig_params_.poll_interval); + ui_->opCallEntry->setText (opCall_); ui_->udp_server_line_edit->setText (udp_server_name_); ui_->udp_server_port_spin_box->setValue (udp_server_port_); ui_->accept_udp_requests_check_box->setChecked (accept_udp_requests_); @@ -1344,6 +1347,7 @@ void Configuration::impl::read_settings () realTimeDecode_ = settings_->value("RealTimeDecode",false).toBool (); rig_params_.poll_interval = settings_->value ("Polling", 0).toInt (); rig_params_.split_mode = settings_->value ("SplitMode", QVariant::fromValue (TransceiverFactory::split_mode_none)).value (); + opCall_ = settings_->value ("OpCall", "").toString (); udp_server_name_ = settings_->value ("UDPServer", "127.0.0.1").toString (); udp_server_port_ = settings_->value ("UDPServerPort", 2237).toUInt (); accept_udp_requests_ = settings_->value ("AcceptUDPRequests", false).toBool (); @@ -1442,6 +1446,7 @@ void Configuration::impl::write_settings () settings_->setValue ("Hound", bHound_); settings_->setValue ("x2ToneSpacing", x2ToneSpacing_); settings_->setValue ("RealTimeDecode", realTimeDecode_); + settings_->setValue ("OpCall", opCall_); settings_->setValue ("UDPServer", udp_server_name_); settings_->setValue ("UDPServerPort", udp_server_port_); settings_->setValue ("AcceptUDPRequests", accept_udp_requests_); @@ -1843,6 +1848,7 @@ void Configuration::impl::accept () calibration_.slope_ppm = ui_->calibration_slope_ppm_spin_box->value (); pwrBandTxMemory_ = ui_->checkBoxPwrBandTxMemory->isChecked (); pwrBandTuneMemory_ = ui_->checkBoxPwrBandTuneMemory->isChecked (); + opCall_=ui_->opCallEntry->text(); auto new_server = ui_->udp_server_line_edit->text (); if (new_server != udp_server_name_) { diff --git a/Configuration.hpp b/Configuration.hpp index c76118513..4a876c6d9 100644 --- a/Configuration.hpp +++ b/Configuration.hpp @@ -136,6 +136,7 @@ public: bool NN() const; bool EMEonly() const; bool post_decodes () const; + QString opCall() const; QString udp_server_name () const; port_type udp_server_port () const; bool accept_udp_requests () const; diff --git a/Configuration.ui b/Configuration.ui index 6da245bb1..ab01a37cc 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -1618,50 +1618,77 @@ QListView::item:hover { Logging - + - - - The program will pop up a partially completed Log QSO dialog when you send a 73 or free text message. - - - Promp&t me to log QSO - - - - - - - Some logging programs will not accept JT-65 or JT9 as a recognized mode. - - - Con&vert mode to RTTY - - - - - - - Some logging programs will not accept the type of reports + + + + + The program will pop up a partially completed Log QSO dialog when you send a 73 or free text message. + + + Promp&t me to log QSO + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Op Call: + + + + + + + + + + Some logging programs will not accept JT-65 or JT9 as a recognized mode. + + + Con&vert mode to RTTY + + + + + + + Some logging programs will not accept the type of reports saved by this program. Check this option to save the sent and received reports in the comments field. - - - d&B reports to comments - - - - - - - Check this option to force the clearing of the DX Call + + + d&B reports to comments + + + + + + + Check this option to force the clearing of the DX Call and DX Grid fields when a 73 or free text message is sent. - - - Clear &DX call and grid after logging - - + + + Clear &DX call and grid after logging + + + + @@ -2662,11 +2689,11 @@ soundcard changes - - - + + + diff --git a/MessageClient.cpp b/MessageClient.cpp index 4c031a7d7..87de8c678 100644 --- a/MessageClient.cpp +++ b/MessageClient.cpp @@ -410,7 +410,7 @@ void MessageClient::clear_decodes () void MessageClient::qso_logged (QDateTime time_off, QString const& dx_call, QString const& dx_grid , Frequency dial_frequency, QString const& mode, QString const& report_sent , QString const& report_received, QString const& tx_power - , QString const& comments, QString const& name, QDateTime time_on) + , QString const& comments, QString const& name, QDateTime time_on, QString const& operator_call) { if (m_->server_port_ && !m_->server_string_.isEmpty ()) { @@ -418,7 +418,7 @@ void MessageClient::qso_logged (QDateTime time_off, QString const& dx_call, QStr NetworkMessage::Builder out {&message, NetworkMessage::QSOLogged, m_->id_, m_->schema_}; out << time_off << dx_call.toUtf8 () << dx_grid.toUtf8 () << dial_frequency << mode.toUtf8 () << report_sent.toUtf8 () << report_received.toUtf8 () << tx_power.toUtf8 () << comments.toUtf8 () - << name.toUtf8 () << time_on; + << name.toUtf8 () << time_on << operator_call; m_->send_message (out, message); } } diff --git a/MessageClient.hpp b/MessageClient.hpp index d641a66d7..048b1a28f 100644 --- a/MessageClient.hpp +++ b/MessageClient.hpp @@ -62,7 +62,7 @@ public: Q_SLOT void qso_logged (QDateTime time_off, QString const& dx_call, QString const& dx_grid , Frequency dial_frequency, QString const& mode, QString const& report_sent , QString const& report_received, QString const& tx_power, QString const& comments - , QString const& name, QDateTime time_on); + , QString const& name, QDateTime time_on, QString const& operator_call); // this slot may be used to send arbitrary UDP datagrams to and // destination allowing the underlying socket to be used for general diff --git a/logbook/adif.cpp b/logbook/adif.cpp index fc1fdbebe..a62cd62f1 100644 --- a/logbook/adif.cpp +++ b/logbook/adif.cpp @@ -175,7 +175,7 @@ int ADIF::getCount() const // open ADIF file and append the QSO details. Return true on success bool ADIF::addQSOToFile(QString const& hisCall, QString const& hisGrid, QString const& mode, QString const& rptSent, QString const& rptRcvd, QDateTime const& dateTimeOn, QDateTime const& dateTimeOff, QString const& band, - QString const& comments, QString const& name, QString const& strDialFreq, QString const& m_myCall, QString const& m_myGrid, QString const& m_txPower) + QString const& comments, QString const& name, QString const& strDialFreq, QString const& m_myCall, QString const& m_myGrid, QString const& m_txPower, QString const& operator_call) { QFile f2(_filename); if (!f2.open(QIODevice::Text | QIODevice::Append)) @@ -208,6 +208,8 @@ bool ADIF::addQSOToFile(QString const& hisCall, QString const& hisGrid, QString ">" + comments; if(name!="") t+=" " + name; + if(operator_call!="") t+=" " + operator_call; t+=" "; out << t << endl; f2.close(); diff --git a/logbook/adif.h b/logbook/adif.h index e47720551..925c9a7d7 100644 --- a/logbook/adif.h +++ b/logbook/adif.h @@ -30,7 +30,7 @@ class ADIF // open ADIF file and append the QSO details. Return true on success bool addQSOToFile(QString const& hisCall, QString const& hisGrid, QString const& mode, QString const& rptSent, QString const& rptRcvd, QDateTime const& dateTimeOn, QDateTime const& dateTimeOff, QString const& band, - QString const& comments, QString const& name, QString const& strDialFreq, QString const& m_myCall, QString const& m_myGrid, QString const& m_txPower); + QString const& comments, QString const& name, QString const& strDialFreq, QString const& m_myCall, QString const& m_myGrid, QString const& m_txPower,QString const& operator_call); private: struct QSO diff --git a/logqso.cpp b/logqso.cpp index f8657e152..a9631d905 100644 --- a/logqso.cpp +++ b/logqso.cpp @@ -56,7 +56,7 @@ void LogQSO::initLogQSO(QString const& hisCall, QString const& hisGrid, QString QString const& rptSent, QString const& rptRcvd, QDateTime const& dateTimeOn, QDateTime const& dateTimeOff, Radio::Frequency dialFreq, QString const& myCall, QString const& myGrid, - bool noSuffix, bool toRTTY, bool dBtoComments) + bool noSuffix, bool toRTTY, bool dBtoComments, QString const& opCall) { if(!isHidden()) return; ui->call->setText(hisCall); @@ -83,13 +83,13 @@ void LogQSO::initLogQSO(QString const& hisCall, QString const& hisGrid, QString m_myCall=myCall; m_myGrid=myGrid; ui->band->setText (m_config->bands ()->find (dialFreq)); - + ui->loggedOperator->setText(opCall); show (); } void LogQSO::accept() { - QString hisCall,hisGrid,mode,rptSent,rptRcvd,dateOn,dateOff,timeOn,timeOff,band; + QString hisCall,hisGrid,mode,rptSent,rptRcvd,dateOn,dateOff,timeOn,timeOff,band,operator_call; QString comments,name; hisCall=ui->call->text(); @@ -105,13 +105,14 @@ void LogQSO::accept() comments=ui->comments->text(); m_comments=comments; QString strDialFreq(QString::number(m_dialFreq / 1.e6,'f',6)); - + operator_call = ui->loggedOperator->text(); //Log this QSO to ADIF file "wsjtx_log.adi" QString filename = "wsjtx_log.adi"; // TODO allow user to set ADIF adifile; auto adifilePath = QDir {QStandardPaths::writableLocation (QStandardPaths::DataLocation)}.absoluteFilePath ("wsjtx_log.adi"); adifile.init(adifilePath); - if (!adifile.addQSOToFile(hisCall,hisGrid,mode,rptSent,rptRcvd,m_dateTimeOn,m_dateTimeOff,band,comments,name,strDialFreq,m_myCall,m_myGrid,m_txPower)) + // TODO add the operator to this + if (!adifile.addQSOToFile(hisCall,hisGrid,mode,rptSent,rptRcvd,m_dateTimeOn,m_dateTimeOff,band,comments,name,strDialFreq,m_myCall,m_myGrid,m_txPower, operator_call)) { MessageBox::warning_message (this, tr ("Log file error"), tr ("Cannot open \"%1\"").arg (adifilePath)); @@ -137,7 +138,7 @@ void LogQSO::accept() } //Clean up and finish logging - Q_EMIT acceptQSO (m_dateTimeOff, hisCall, hisGrid, m_dialFreq, mode, rptSent, rptRcvd, m_txPower, comments, name,m_dateTimeOn); + Q_EMIT acceptQSO (m_dateTimeOff, hisCall, hisGrid, m_dialFreq, mode, rptSent, rptRcvd, m_txPower, comments, name,m_dateTimeOn, operator_call); QDialog::accept(); } diff --git a/logqso.h b/logqso.h index 6c3eb4213..154b41fe8 100644 --- a/logqso.h +++ b/logqso.h @@ -30,7 +30,7 @@ public: QString const& rptSent, QString const& rptRcvd, QDateTime const& dateTimeOn, QDateTime const& dateTimeOff, Radio::Frequency dialFreq, QString const& myCall, QString const& myGrid, - bool noSuffix, bool toRTTY, bool dBtoComments); + bool noSuffix, bool toRTTY, bool dBtoComments, QString const& opCall); public slots: void accept(); @@ -40,7 +40,7 @@ signals: , Radio::Frequency dial_freq, QString const& mode , QString const& rpt_sent, QString const& rpt_received , QString const& tx_power, QString const& comments - , QString const& name, QDateTime const& QSO_date_on); + , QString const& name, QDateTime const& QSO_date_on, QString const& operator_call); protected: void hideEvent (QHideEvent *); diff --git a/logqso.ui b/logqso.ui index d00b9ad99..842e1b4dd 100644 --- a/logqso.ui +++ b/logqso.ui @@ -6,8 +6,8 @@ 0 0 - 374 - 229 + 377 + 257 @@ -351,6 +351,45 @@ + + + + + + + 10 + + + + Operator + + + + + + + + 300 + 16777215 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + diff --git a/mainwindow.cpp b/mainwindow.cpp index 9541850be..b5e3fd821 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -381,6 +381,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, ui->sbTR->values ({5, 10, 15, 30}); m_baseCall = Radio::base_callsign (m_config.my_callsign ()); + m_opCall = m_config.opCall(); m_optimizingProgress.setWindowModality (Qt::WindowModal); m_optimizingProgress.setAutoReset (false); @@ -1635,6 +1636,7 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog ui->actionInclude_averaging->setChecked(false); ui->actionInclude_correlation->setChecked(false); } + m_opCall=m_config.opCall(); } } @@ -4778,19 +4780,19 @@ void MainWindow::on_logQSOButton_clicked() //Log QSO button m_logDlg->initLogQSO (m_hisCall, m_hisGrid, m_modeTx, m_rptSent, m_rptRcvd, m_dateTimeQSOOn, dateTimeQSOOff, m_freqNominal + ui->TxFreqSpinBox->value(), m_config.my_callsign(), m_config.my_grid(), m_noSuffix, - m_config.log_as_RTTY(), m_config.report_in_comments()); + m_config.log_as_RTTY(), m_config.report_in_comments(), m_opCall); } void MainWindow::acceptQSO2(QDateTime const& QSO_date_off, QString const& call, QString const& grid , Frequency dial_freq, QString const& mode , QString const& rpt_sent, QString const& rpt_received , QString const& tx_power, QString const& comments - , QString const& name, QDateTime const& QSO_date_on) + , QString const& name, QDateTime const& QSO_date_on, QString const& operator_call) { QString date = QSO_date_on.toString("yyyyMMdd"); m_logBook.addAsWorked (m_hisCall, m_config.bands ()->find (m_freqNominal), m_modeTx, date); - m_messageClient->qso_logged (QSO_date_off, call, grid, dial_freq, mode, rpt_sent, rpt_received, tx_power, comments, name, QSO_date_on); + m_messageClient->qso_logged (QSO_date_off, call, grid, dial_freq, mode, rpt_sent, rpt_received, tx_power, comments, name, QSO_date_on, operator_call); if (m_config.clear_DX ()) { diff --git a/mainwindow.h b/mainwindow.h index ff57e03f3..0c04835e9 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -220,7 +220,7 @@ private slots: , Frequency dial_freq, QString const& mode , QString const& rpt_sent, QString const& rpt_received , QString const& tx_power, QString const& comments - , QString const& name, QDateTime const&); + , QString const& name, QDateTime const& QSO_date_on, QString const& operator_call); void on_bandComboBox_currentIndexChanged (int index); void on_bandComboBox_activated (int index); void on_readFreq_clicked(); @@ -554,6 +554,7 @@ private: QString m_fileToSave; QString m_calls; QString m_CQtype; + QString m_opCall; QString m_FoxCallers; QString m_toBeCalled; diff --git a/mainwindow.ui b/mainwindow.ui index b93780ab7..9db976466 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -542,7 +542,7 @@ - + @@ -1058,27 +1058,8 @@ QLabel[oob="true"] { - - - - Switch to this Tx message NOW - - - padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3% - - - Tx &2 - - - Alt+2 - - - - - - - - + + Send this message in next Tx interval @@ -1089,151 +1070,13 @@ QLabel[oob="true"] { - Ctrl+3 + Ctrl+2 buttonGroup - - - - <html><head/><body><p>Send this message in next Tx interval</p><p>Double-click to toggle between RRR and RR73 messages in Tx4 (not allowed for type 2 compound call holders)</p><p>RR73 messages should only be used when you are reasonably confident that no message repetitions will be required</p></body></html> - - - margin-left: 10%; margin-right: 0% - - - - - - Ctrl+4 - - - buttonGroup - - - - - - - <html><head/><body><p>Send this message in next Tx interval</p><p>Double-click to reset to the standard 73 message</p></body></html> - - - margin-left: 10%; margin-right: 0% - - - - - - Ctrl+5 - - - buttonGroup - - - - - - - <html><head/><body><p>Switch to this Tx message NOW</p><p>Double-click to reset to the standard 73 message</p></body></html> - - - padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3% - - - Tx &5 - - - Alt+5 - - - - - - - <html><head/><body><p>Switch to this Tx message NOW</p><p>Double-click to toggle between RRR and RR73 messages in Tx4 (not allowed for type2 compound call holders)</p><p>RR73 messages should only be used when you are reasonably confident that no message repetitions will be required</p></body></html> - - - padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3% - - - Tx &4 - - - Alt+4 - - - - - - - Enter a free text message (maximum 13 characters) -or select a predefined macro from the dropdown list. -Press ENTER to add the current text to the predefined -list. The list can be maintained in Settings (F2). - - - true - - - QComboBox::InsertAtBottom - - - - - - - - - - - - - - Switch to this Tx message NOW - - - Now - - - Qt::AlignCenter - - - - - - - <html><head/><body><p>Switch to this Tx message NOW</p><p>Double click to toggle the use of the Tx1 message to start a QSO with a station (not allowed for type 1 compund call holders)</p></body></html> - - - Qt::LeftToRight - - - padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3% - - - Tx &1 - - - Alt+1 - - - - - - - Queue up the next Tx message - - - Next - - - Qt::AlignCenter - - - @@ -1253,43 +1096,8 @@ list. The list can be maintained in Settings (F2). - - - - - - - Send this message in next Tx interval - - - margin-left: 10%; margin-right: 0% - - - - - - Ctrl+2 - - - buttonGroup - - - - - - - Generate standard messages for minimal QSO - - - Generate Std Msgs - - - - - - - - + + Switch to this Tx message NOW @@ -1297,17 +1105,32 @@ list. The list can be maintained in Settings (F2). padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3% - Tx &3 + Tx &2 - Alt+3 + Alt+2 - - + + + + + + + <html><head/><body><p>Switch to this Tx message NOW</p><p>Double click to toggle the use of the Tx1 message to start a QSO with a station (not allowed for type 1 compund call holders)</p></body></html> + + + Qt::LeftToRight + + + padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3% + - + Tx &1 + + + Alt+1 @@ -1333,6 +1156,140 @@ list. The list can be maintained in Settings (F2). + + + + + + + <html><head/><body><p>Send this message in next Tx interval</p><p>Double-click to reset to the standard 73 message</p></body></html> + + + margin-left: 10%; margin-right: 0% + + + + + + Ctrl+5 + + + buttonGroup + + + + + + + Send this message in next Tx interval + + + margin-left: 10%; margin-right: 0% + + + + + + Ctrl+3 + + + buttonGroup + + + + + + + Switch to this Tx message NOW + + + padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3% + + + Tx &3 + + + Alt+3 + + + + + + + <html><head/><body><p>Send this message in next Tx interval</p><p>Double-click to toggle between RRR and RR73 messages in Tx4 (not allowed for type 2 compound call holders)</p><p>RR73 messages should only be used when you are reasonably confident that no message repetitions will be required</p></body></html> + + + margin-left: 10%; margin-right: 0% + + + + + + Ctrl+4 + + + buttonGroup + + + + + + + <html><head/><body><p>Switch to this Tx message NOW</p><p>Double-click to toggle between RRR and RR73 messages in Tx4 (not allowed for type2 compound call holders)</p><p>RR73 messages should only be used when you are reasonably confident that no message repetitions will be required</p></body></html> + + + padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3% + + + Tx &4 + + + Alt+4 + + + + + + + <html><head/><body><p>Switch to this Tx message NOW</p><p>Double-click to reset to the standard 73 message</p></body></html> + + + padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3% + + + Tx &5 + + + Alt+5 + + + + + + + + + + Switch to this Tx message NOW + + + Now + + + Qt::AlignCenter + + + + + + + Generate standard messages for minimal QSO + + + Generate Std Msgs + + + @@ -1349,6 +1306,49 @@ list. The list can be maintained in Settings (F2). + + + + Enter a free text message (maximum 13 characters) +or select a predefined macro from the dropdown list. +Press ENTER to add the current text to the predefined +list. The list can be maintained in Settings (F2). + + + true + + + QComboBox::InsertAtBottom + + + + + + + + + + + + + + + + + + + + + Queue up the next Tx message + + + Next + + + Qt::AlignCenter + + + @@ -2371,34 +2371,6 @@ list. The list can be maintained in Settings (F2). - - - - Adjust Tx audio level - - - 450 - - - 0 - - - Qt::Vertical - - - true - - - true - - - QSlider::TicksBelow - - - 50 - - - @@ -2445,6 +2417,50 @@ QPushButton[state="ok"] { + + + + Adjust Tx audio level + + + 450 + + + 0 + + + Qt::Vertical + + + true + + + true + + + QSlider::TicksBelow + + + 50 + + + + + + + <html><head/><body><p>Select operating band or enter frequency in MHz or enter kHz increment followed by k.</p></body></html> + + + true + + + QComboBox::NoInsert + + + QComboBox::AdjustToMinimumContentsLength + + + @@ -2484,22 +2500,6 @@ QPushButton[state="ok"] { - - - - <html><head/><body><p>Select operating band or enter frequency in MHz or enter kHz increment followed by k.</p></body></html> - - - true - - - QComboBox::NoInsert - - - QComboBox::AdjustToMinimumContentsLength - - -