mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-22 12:08:43 -04:00
Include prop mode in ADIF and UDP messages
This commit is contained in:
parent
a24f402655
commit
6cbc91b653
@ -568,7 +568,7 @@ void MessageClient::qso_logged (QDateTime time_off, QString const& dx_call, QStr
|
||||
, QString const& comments, QString const& name, QDateTime time_on
|
||||
, QString const& operator_call, QString const& my_call
|
||||
, QString const& my_grid, QString const& exchange_sent
|
||||
, QString const& exchange_rcvd)
|
||||
, QString const& exchange_rcvd, QString const& propmode)
|
||||
{
|
||||
if (m_->server_port_ && !m_->server_string_.isEmpty ())
|
||||
{
|
||||
@ -577,8 +577,8 @@ void MessageClient::qso_logged (QDateTime time_off, QString const& dx_call, QStr
|
||||
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 << operator_call.toUtf8 () << my_call.toUtf8 () << my_grid.toUtf8 ()
|
||||
<< exchange_sent.toUtf8 () << exchange_rcvd.toUtf8 ();
|
||||
TRACE_UDP ("time off:" << time_off << "DX:" << dx_call << "DX grid:" << dx_grid << "dial:" << dial_frequency << "mode:" << mode << "sent:" << report_sent << "rcvd:" << report_received << "pwr:" << tx_power << "comments:" << comments << "name:" << name << "time on:" << time_on << "op:" << operator_call << "DE:" << my_call << "DE grid:" << my_grid << "exch sent:" << exchange_sent << "exch rcvd:" << exchange_rcvd);
|
||||
<< exchange_sent.toUtf8 () << exchange_rcvd.toUtf8 () << propmode.toUtf8 ();
|
||||
TRACE_UDP ("time off:" << time_off << "DX:" << dx_call << "DX grid:" << dx_grid << "dial:" << dial_frequency << "mode:" << mode << "sent:" << report_sent << "rcvd:" << report_received << "pwr:" << tx_power << "comments:" << comments << "name:" << name << "time on:" << time_on << "op:" << operator_call << "DE:" << my_call << "DE grid:" << my_grid << "exch sent:" << exchange_sent << "exch rcvd:" << exchange_rcvd << "prop_mode:" << propmode);
|
||||
m_->send_message (out, message);
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,8 @@ public:
|
||||
, QString const& report_received, QString const& tx_power, QString const& comments
|
||||
, QString const& name, QDateTime time_on, QString const& operator_call
|
||||
, QString const& my_call, QString const& my_grid
|
||||
, QString const& exchange_sent, QString const& exchange_rcvd);
|
||||
, QString const& exchange_sent, QString const& exchange_rcvd
|
||||
, QString const& propmode);
|
||||
|
||||
// ADIF_record argument should be valid ADIF excluding any <EOR> end
|
||||
// of record marker
|
||||
|
@ -74,7 +74,7 @@ QByteArray LogBook::QSOToADIF (QString const& hisCall, QString const& hisGrid, Q
|
||||
QDateTime const& dateTimeOff, QString const& band, QString const& comments,
|
||||
QString const& name, QString const& strDialFreq, QString const& myCall,
|
||||
QString const& myGrid, QString const& txPower, QString const& operator_call,
|
||||
QString const& xSent, QString const& xRcvd)
|
||||
QString const& xSent, QString const& xRcvd, QString const& propmode)
|
||||
{
|
||||
QString t;
|
||||
t = "<call:" + QString::number(hisCall.size()) + ">" + hisCall;
|
||||
@ -101,6 +101,7 @@ QByteArray LogBook::QSOToADIF (QString const& hisCall, QString const& hisGrid, Q
|
||||
if(comments!="") t += " <comment:" + QString::number(comments.size()) + ">" + comments;
|
||||
if(name!="") t += " <name:" + QString::number(name.size()) + ">" + name;
|
||||
if(operator_call!="") t+=" <operator:" + QString::number(operator_call.size()) + ">" + operator_call;
|
||||
if(propmode!="") t += " <prop_mode:" + QString::number(propmode.size()) + ">" + propmode;
|
||||
if (xSent.size ())
|
||||
{
|
||||
auto words = xSent.split (' '
|
||||
|
@ -44,7 +44,7 @@ public:
|
||||
QDateTime const& dateTimeOff, QString const& band, QString const& comments,
|
||||
QString const& name, QString const& strDialFreq, QString const& myCall,
|
||||
QString const& m_myGrid, QString const& m_txPower, QString const& operator_call,
|
||||
QString const& xSent, QString const& xRcvd);
|
||||
QString const& xSent, QString const& xRcvd, QString const& propmode);
|
||||
|
||||
Q_SIGNAL void finished_loading (int worked_before_record_count, QString const& error) const;
|
||||
|
||||
|
@ -39,8 +39,10 @@ void LogQSO::loadSettings ()
|
||||
restoreGeometry (m_settings->value ("geometry", saveGeometry ()).toByteArray ());
|
||||
ui->cbTxPower->setChecked (m_settings->value ("SaveTxPower", false).toBool ());
|
||||
ui->cbComments->setChecked (m_settings->value ("SaveComments", false).toBool ());
|
||||
ui->cbPropMode->setChecked (m_settings->value ("SavePropMode", false).toBool ());
|
||||
m_txPower = m_settings->value ("TxPower", "").toString ();
|
||||
m_comments = m_settings->value ("LogComments", "").toString();
|
||||
m_propmode = m_settings->value ("PropMode", "").toString();
|
||||
m_settings->endGroup ();
|
||||
}
|
||||
|
||||
@ -50,8 +52,68 @@ void LogQSO::storeSettings () const
|
||||
m_settings->setValue ("geometry", saveGeometry ());
|
||||
m_settings->setValue ("SaveTxPower", ui->cbTxPower->isChecked ());
|
||||
m_settings->setValue ("SaveComments", ui->cbComments->isChecked ());
|
||||
m_settings->setValue ("SavePropMode", ui->cbPropMode->isChecked ());
|
||||
m_settings->setValue ("TxPower", m_txPower);
|
||||
m_settings->setValue ("LogComments", m_comments);
|
||||
switch (ui->comboBoxPropMode->currentIndex()) {
|
||||
case 0:
|
||||
m_settings->setValue ("PropMode", "");
|
||||
break;
|
||||
case 1:
|
||||
m_settings->setValue ("PropMode", "AS");
|
||||
break;
|
||||
case 2:
|
||||
m_settings->setValue ("PropMode", "AUE");
|
||||
break;
|
||||
case 3:
|
||||
m_settings->setValue ("PropMode", "AUR");
|
||||
break;
|
||||
case 4:
|
||||
m_settings->setValue ("PropMode", "BS");
|
||||
break;
|
||||
case 5:
|
||||
m_settings->setValue ("PropMode", "ECH");
|
||||
break;
|
||||
case 6:
|
||||
m_settings->setValue ("PropMode", "EME");
|
||||
break;
|
||||
case 7:
|
||||
m_settings->setValue ("PropMode", "ES");
|
||||
break;
|
||||
case 8:
|
||||
m_settings->setValue ("PropMode", "F2");
|
||||
break;
|
||||
case 9:
|
||||
m_settings->setValue ("PropMode", "FAI");
|
||||
break;
|
||||
case 10:
|
||||
m_settings->setValue ("PropMode", "INTERNET");
|
||||
break;
|
||||
case 11:
|
||||
m_settings->setValue ("PropMode", "ION");
|
||||
break;
|
||||
case 12:
|
||||
m_settings->setValue ("PropMode", "IRL");
|
||||
break;
|
||||
case 13:
|
||||
m_settings->setValue ("PropMode", "MS");
|
||||
break;
|
||||
case 14:
|
||||
m_settings->setValue ("PropMode", "RPT");
|
||||
break;
|
||||
case 15:
|
||||
m_settings->setValue ("PropMode", "RS");
|
||||
break;
|
||||
case 16:
|
||||
m_settings->setValue ("PropMode", "SAT");
|
||||
break;
|
||||
case 17:
|
||||
m_settings->setValue ("PropMode", "TEP");
|
||||
break;
|
||||
case 18:
|
||||
m_settings->setValue ("PropMode", "TR");
|
||||
break;
|
||||
}
|
||||
m_settings->endGroup ();
|
||||
}
|
||||
|
||||
@ -80,6 +142,51 @@ void LogQSO::initLogQSO(QString const& hisCall, QString const& hisGrid, QString
|
||||
{
|
||||
ui->comments->clear ();
|
||||
}
|
||||
if (ui->cbPropMode->isChecked ())
|
||||
{
|
||||
if (m_propmode == "")
|
||||
ui->comboBoxPropMode->setCurrentIndex(0);
|
||||
if (m_propmode == "AS")
|
||||
ui->comboBoxPropMode->setCurrentIndex(1);
|
||||
if (m_propmode == "AUE")
|
||||
ui->comboBoxPropMode->setCurrentIndex(2);
|
||||
if (m_propmode == "AUR")
|
||||
ui->comboBoxPropMode->setCurrentIndex(3);
|
||||
if (m_propmode == "BS")
|
||||
ui->comboBoxPropMode->setCurrentIndex(4);
|
||||
if (m_propmode == "ECH")
|
||||
ui->comboBoxPropMode->setCurrentIndex(5);
|
||||
if (m_propmode == "EME")
|
||||
ui->comboBoxPropMode->setCurrentIndex(6);
|
||||
if (m_propmode == "ES")
|
||||
ui->comboBoxPropMode->setCurrentIndex(7);
|
||||
if (m_propmode == "F2")
|
||||
ui->comboBoxPropMode->setCurrentIndex(8);
|
||||
if (m_propmode == "FAI")
|
||||
ui->comboBoxPropMode->setCurrentIndex(9);
|
||||
if (m_propmode == "INTERNET")
|
||||
ui->comboBoxPropMode->setCurrentIndex(10);
|
||||
if (m_propmode == "ION")
|
||||
ui->comboBoxPropMode->setCurrentIndex(11);
|
||||
if (m_propmode == "IRL")
|
||||
ui->comboBoxPropMode->setCurrentIndex(12);
|
||||
if (m_propmode == "MS")
|
||||
ui->comboBoxPropMode->setCurrentIndex(13);
|
||||
if (m_propmode == "RPT")
|
||||
ui->comboBoxPropMode->setCurrentIndex(14);
|
||||
if (m_propmode == "RS")
|
||||
ui->comboBoxPropMode->setCurrentIndex(15);
|
||||
if (m_propmode == "SAT")
|
||||
ui->comboBoxPropMode->setCurrentIndex(16);
|
||||
if (m_propmode == "TEP")
|
||||
ui->comboBoxPropMode->setCurrentIndex(17);
|
||||
if (m_propmode == "TR")
|
||||
ui->comboBoxPropMode->setCurrentIndex(18);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->comboBoxPropMode->setCurrentIndex(0);
|
||||
}
|
||||
if (m_config->report_in_comments()) {
|
||||
auto t=mode;
|
||||
if(rptSent!="") t+=" Sent: " + rptSent;
|
||||
@ -133,6 +240,65 @@ void LogQSO::accept()
|
||||
auto operator_call = ui->loggedOperator->text ();
|
||||
auto xsent = ui->exchSent->text ();
|
||||
auto xrcvd = ui->exchRcvd->text ();
|
||||
switch (ui->comboBoxPropMode->currentIndex()) {
|
||||
case 0:
|
||||
m_propmode = "";
|
||||
break;
|
||||
case 1:
|
||||
m_propmode = "AS";
|
||||
break;
|
||||
case 2:
|
||||
m_propmode = "AUE";
|
||||
break;
|
||||
case 3:
|
||||
m_propmode = "AUR";
|
||||
break;
|
||||
case 4:
|
||||
m_propmode = "BS";
|
||||
break;
|
||||
case 5:
|
||||
m_propmode = "ECH";
|
||||
break;
|
||||
case 6:
|
||||
m_propmode = "EME";
|
||||
break;
|
||||
case 7:
|
||||
m_propmode = "ES";
|
||||
break;
|
||||
case 8:
|
||||
m_propmode = "F2";
|
||||
break;
|
||||
case 9:
|
||||
m_propmode = "FAI";
|
||||
break;
|
||||
case 10:
|
||||
m_propmode = "INTERNET";
|
||||
break;
|
||||
case 11:
|
||||
m_propmode = "ION";
|
||||
break;
|
||||
case 12:
|
||||
m_propmode = "IRL";
|
||||
break;
|
||||
case 13:
|
||||
m_propmode = "MS";
|
||||
break;
|
||||
case 14:
|
||||
m_propmode = "RPT";
|
||||
break;
|
||||
case 15:
|
||||
m_propmode = "RS";
|
||||
break;
|
||||
case 16:
|
||||
m_propmode = "SAT";
|
||||
break;
|
||||
case 17:
|
||||
m_propmode = "TEP";
|
||||
break;
|
||||
case 18:
|
||||
m_propmode = "TR";
|
||||
break;
|
||||
}
|
||||
|
||||
using SpOp = Configuration::SpecialOperatingActivity;
|
||||
auto special_op = m_config->special_op_id ();
|
||||
@ -191,7 +357,7 @@ void LogQSO::accept()
|
||||
dateTimeOff.time().toString("hh:mm:ss,") + hisCall + "," +
|
||||
hisGrid + "," + strDialFreq + "," + mode +
|
||||
"," + rptSent + "," + rptRcvd + "," + m_txPower +
|
||||
"," + m_comments + "," + name;
|
||||
"," + m_comments + "," + name + "," + m_propmode;
|
||||
QTextStream out(&f);
|
||||
out << logEntry <<
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
|
||||
@ -220,6 +386,7 @@ void LogQSO::accept()
|
||||
, m_myGrid
|
||||
, xsent
|
||||
, xrcvd
|
||||
, m_propmode
|
||||
, m_log->QSOToADIF (hisCall
|
||||
, hisGrid
|
||||
, mode
|
||||
@ -236,7 +403,8 @@ void LogQSO::accept()
|
||||
, m_txPower
|
||||
, operator_call
|
||||
, xsent
|
||||
, xrcvd));
|
||||
, xrcvd
|
||||
, m_propmode));
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ signals:
|
||||
, QString const& name, QDateTime const& QSO_date_on, QString const& operator_call
|
||||
, QString const& my_call, QString const& my_grid
|
||||
, QString const& exchange_sent, QString const& exchange_rcvd
|
||||
, QByteArray const& ADIF);
|
||||
, QString const& propmode, QByteArray const& ADIF);
|
||||
|
||||
protected:
|
||||
void hideEvent (QHideEvent *);
|
||||
@ -57,6 +57,7 @@ private:
|
||||
LogBook * m_log;
|
||||
QString m_txPower;
|
||||
QString m_comments;
|
||||
QString m_propmode;
|
||||
Radio::Frequency m_dialFreq;
|
||||
QString m_myCall;
|
||||
QString m_myGrid;
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>377</width>
|
||||
<height>287</height>
|
||||
<width>437</width>
|
||||
<height>351</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -447,6 +447,123 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8" stretch="0,0,0">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Prop Mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBoxPropMode">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>AS | Aircraft scatter</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>AUE | Aurora-E</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>AUR | Aurora</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>BS | Back scatter</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ECH | Echolink</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>EME | Earth-moon-earth</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ES | Sporadic E</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>F2 | F2 Reflection</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>FAI | Field aligned irregularities</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>INTERNET | Internet-assisted</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ION | Ionoscatter</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>IRL | IRLP</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>MS | Meteor scatter</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>RPT | Terrestrial or atmospheric repeater or transponder</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>RS | Rain scatter</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>SAT | Satellite</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>TEP | Trans-equatorial</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>TR | Troposheric ducting</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbPropMode">
|
||||
<property name="text">
|
||||
<string>Retain</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
@ -486,6 +603,8 @@
|
||||
<tabstop>cbTxPower</tabstop>
|
||||
<tabstop>comments</tabstop>
|
||||
<tabstop>cbComments</tabstop>
|
||||
<tabstop>cbPropMode</tabstop>
|
||||
<tabstop>comboBoxPropMode</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections>
|
||||
|
@ -5700,7 +5700,7 @@ void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call,
|
||||
, QString const& name, QDateTime const& QSO_date_on, QString const& operator_call
|
||||
, QString const& my_call, QString const& my_grid
|
||||
, QString const& exchange_sent, QString const& exchange_rcvd
|
||||
, QByteArray const& ADIF)
|
||||
, QString const& propmode, QByteArray const& ADIF)
|
||||
{
|
||||
QString date = QSO_date_on.toString("yyyyMMdd");
|
||||
if (!m_logBook.add (call, grid, m_config.bands()->find(dial_freq), mode, ADIF))
|
||||
@ -5711,7 +5711,7 @@ void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call,
|
||||
|
||||
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, my_call, my_grid
|
||||
, exchange_sent, exchange_rcvd);
|
||||
, exchange_sent, exchange_rcvd, propmode);
|
||||
m_messageClient->logged_ADIF (ADIF);
|
||||
|
||||
// Log to N1MM Logger
|
||||
|
@ -240,7 +240,7 @@ private slots:
|
||||
, QString const& name, QDateTime const& QSO_date_on, QString const& operator_call
|
||||
, QString const& my_call, QString const& my_grid
|
||||
, QString const& exchange_sent, QString const& exchange_rcvd
|
||||
, QByteArray const& ADIF);
|
||||
, QString const& propmode, QByteArray const& ADIF);
|
||||
void on_bandComboBox_currentIndexChanged (int index);
|
||||
void on_bandComboBox_activated (int index);
|
||||
void on_readFreq_clicked();
|
||||
|
Loading…
Reference in New Issue
Block a user