Removed tx power from the log window. It's not valid ADIF without a dropdown
This commit is contained in:
parent
c4656fcada
commit
ee350524fa
@ -166,7 +166,7 @@ QByteArray ADIF::QSOToADIF(QString const& hisCall, QString const& hisGrid, QStri
|
|||||||
, QString const& rptSent, QString const& rptRcvd, QDateTime const& dateTimeOn
|
, QString const& rptSent, QString const& rptRcvd, QDateTime const& dateTimeOn
|
||||||
, QDateTime const& dateTimeOff, QString const& band, QString const& comments
|
, QDateTime const& dateTimeOff, QString const& band, QString const& comments
|
||||||
, QString const& name, QString const& strDialFreq, QString const& m_myCall
|
, QString const& name, QString const& strDialFreq, QString const& m_myCall
|
||||||
, QString const& m_myGrid, QString const& m_txPower, QString const& operator_call)
|
, QString const& m_myGrid, QString const& operator_call)
|
||||||
{
|
{
|
||||||
QString t;
|
QString t;
|
||||||
t = "<call:" + QString::number(hisCall.length()) + ">" + hisCall;
|
t = "<call:" + QString::number(hisCall.length()) + ">" + hisCall;
|
||||||
@ -187,9 +187,6 @@ QByteArray ADIF::QSOToADIF(QString const& hisCall, QString const& hisGrid, QStri
|
|||||||
m_myCall;
|
m_myCall;
|
||||||
t += " <my_gridsquare:" + QString::number(m_myGrid.length()) + ">" +
|
t += " <my_gridsquare:" + QString::number(m_myGrid.length()) + ">" +
|
||||||
m_myGrid;
|
m_myGrid;
|
||||||
if (m_txPower != "")
|
|
||||||
t += " <tx_pwr:" + QString::number(m_txPower.length()) +
|
|
||||||
">" + m_txPower;
|
|
||||||
if (comments != "")
|
if (comments != "")
|
||||||
t += " <comment:" + QString::number(comments.length()) +
|
t += " <comment:" + QString::number(comments.length()) +
|
||||||
">" + comments;
|
">" + comments;
|
||||||
|
@ -32,10 +32,10 @@ class ADIF
|
|||||||
bool addQSOToFile(QByteArray const& ADIF_record);
|
bool addQSOToFile(QByteArray const& ADIF_record);
|
||||||
|
|
||||||
QByteArray QSOToADIF(QString const& hisCall, QString const& hisGrid, QString const& mode, QString const& submode, QString const& rptSent
|
QByteArray QSOToADIF(QString const& hisCall, QString const& hisGrid, QString const& mode, QString const& submode, QString const& rptSent
|
||||||
, QString const& rptRcvd, QDateTime const& dateTimeOn, QDateTime const& dateTimeOff
|
, QString const& rptRcvd, QDateTime const& dateTimeOn, QDateTime const& dateTimeOff
|
||||||
, QString const& band, QString const& comments, QString const& name
|
, QString const& band, QString const& comments, QString const& name
|
||||||
, QString const& strDialFreq, QString const& m_myCall, QString const& m_myGrid
|
, QString const& strDialFreq, QString const& m_myCall, QString const& m_myGrid
|
||||||
, QString const& m_txPower, QString const& operator_call);
|
, QString const& operator_call);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
17
logqso.cpp
17
logqso.cpp
@ -37,9 +37,7 @@ void LogQSO::loadSettings ()
|
|||||||
{
|
{
|
||||||
m_settings->beginGroup ("LogQSO");
|
m_settings->beginGroup ("LogQSO");
|
||||||
restoreGeometry (m_settings->value ("geometry", saveGeometry ()).toByteArray ());
|
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->cbComments->setChecked (m_settings->value ("SaveComments", false).toBool ());
|
||||||
m_txPower = m_settings->value ("TxPower", "").toString ();
|
|
||||||
m_comments = m_settings->value ("LogComments", "").toString();
|
m_comments = m_settings->value ("LogComments", "").toString();
|
||||||
m_settings->endGroup ();
|
m_settings->endGroup ();
|
||||||
}
|
}
|
||||||
@ -48,9 +46,7 @@ void LogQSO::storeSettings () const
|
|||||||
{
|
{
|
||||||
m_settings->beginGroup ("LogQSO");
|
m_settings->beginGroup ("LogQSO");
|
||||||
m_settings->setValue ("geometry", saveGeometry ());
|
m_settings->setValue ("geometry", saveGeometry ());
|
||||||
m_settings->setValue ("SaveTxPower", ui->cbTxPower->isChecked ());
|
|
||||||
m_settings->setValue ("SaveComments", ui->cbComments->isChecked ());
|
m_settings->setValue ("SaveComments", ui->cbComments->isChecked ());
|
||||||
m_settings->setValue ("TxPower", m_txPower);
|
|
||||||
m_settings->setValue ("LogComments", m_comments);
|
m_settings->setValue ("LogComments", m_comments);
|
||||||
m_settings->endGroup ();
|
m_settings->endGroup ();
|
||||||
}
|
}
|
||||||
@ -59,15 +55,13 @@ void LogQSO::initLogQSO(QString const& hisCall, QString const& hisGrid, QString
|
|||||||
QString const& rptSent, QString const& rptRcvd,
|
QString const& rptSent, QString const& rptRcvd,
|
||||||
QDateTime const& dateTimeOn, QDateTime const& dateTimeOff,
|
QDateTime const& dateTimeOn, QDateTime const& dateTimeOff,
|
||||||
Radio::Frequency dialFreq, QString const& myCall, QString const& myGrid,
|
Radio::Frequency dialFreq, QString const& myCall, QString const& myGrid,
|
||||||
bool toRTTY, bool dBtoComments, bool bFox, QString const& opCall)
|
bool toDATA, bool dBtoComments, bool bFox, QString const& opCall)
|
||||||
{
|
{
|
||||||
if(!isHidden()) return;
|
if(!isHidden()) return;
|
||||||
ui->call->setText(hisCall);
|
ui->call->setText(hisCall);
|
||||||
ui->grid->setText(hisGrid);
|
ui->grid->setText(hisGrid);
|
||||||
ui->name->setText("");
|
ui->name->setText("");
|
||||||
ui->txPower->setText("");
|
|
||||||
ui->comments->setText("");
|
ui->comments->setText("");
|
||||||
if (ui->cbTxPower->isChecked ()) ui->txPower->setText(m_txPower);
|
|
||||||
if (ui->cbComments->isChecked ()) ui->comments->setText(m_comments);
|
if (ui->cbComments->isChecked ()) ui->comments->setText(m_comments);
|
||||||
if(dBtoComments) {
|
if(dBtoComments) {
|
||||||
QString t=mode;
|
QString t=mode;
|
||||||
@ -75,7 +69,7 @@ void LogQSO::initLogQSO(QString const& hisCall, QString const& hisGrid, QString
|
|||||||
if(rptRcvd!="") t+=" Rcvd: " + rptRcvd;
|
if(rptRcvd!="") t+=" Rcvd: " + rptRcvd;
|
||||||
ui->comments->setText(t);
|
ui->comments->setText(t);
|
||||||
}
|
}
|
||||||
if(toRTTY) mode="DATA";
|
if(toDATA) mode="DATA";
|
||||||
ui->mode->setText(mode);
|
ui->mode->setText(mode);
|
||||||
ui->sent->setText(rptSent);
|
ui->sent->setText(rptSent);
|
||||||
ui->rcvd->setText(rptRcvd);
|
ui->rcvd->setText(rptRcvd);
|
||||||
@ -111,7 +105,6 @@ void LogQSO::accept()
|
|||||||
m_dateTimeOff = ui->end_date_time->dateTime ();
|
m_dateTimeOff = ui->end_date_time->dateTime ();
|
||||||
band=ui->band->text();
|
band=ui->band->text();
|
||||||
name=ui->name->text();
|
name=ui->name->text();
|
||||||
m_txPower=ui->txPower->text();
|
|
||||||
comments=ui->comments->text();
|
comments=ui->comments->text();
|
||||||
m_comments=comments;
|
m_comments=comments;
|
||||||
QString strDialFreq(QString::number(m_dialFreq / 1.e6,'f',6));
|
QString strDialFreq(QString::number(m_dialFreq / 1.e6,'f',6));
|
||||||
@ -123,7 +116,7 @@ void LogQSO::accept()
|
|||||||
adifile.init(adifilePath);
|
adifile.init(adifilePath);
|
||||||
|
|
||||||
QByteArray ADIF {adifile.QSOToADIF (hisCall, hisGrid, mode, submode, rptSent, rptRcvd, m_dateTimeOn, m_dateTimeOff, band
|
QByteArray ADIF {adifile.QSOToADIF (hisCall, hisGrid, mode, submode, rptSent, rptRcvd, m_dateTimeOn, m_dateTimeOff, band
|
||||||
, comments, name, strDialFreq, m_myCall, m_myGrid, m_txPower, operator_call)};
|
, comments, name, strDialFreq, m_myCall, m_myGrid, operator_call)};
|
||||||
if (!adifile.addQSOToFile (ADIF))
|
if (!adifile.addQSOToFile (ADIF))
|
||||||
{
|
{
|
||||||
MessageBox::warning_message (this, tr ("Log file error"),
|
MessageBox::warning_message (this, tr ("Log file error"),
|
||||||
@ -153,7 +146,7 @@ void LogQSO::accept()
|
|||||||
m_dateTimeOff.date().toString("yyyy-MM-dd,") +
|
m_dateTimeOff.date().toString("yyyy-MM-dd,") +
|
||||||
m_dateTimeOff.time().toString("hh:mm:ss,") + hisCall + "," +
|
m_dateTimeOff.time().toString("hh:mm:ss,") + hisCall + "," +
|
||||||
hisGrid + "," + strDialFreq + "," + (mode == "MFSK" ? "JS8" : mode) +
|
hisGrid + "," + strDialFreq + "," + (mode == "MFSK" ? "JS8" : mode) +
|
||||||
"," + rptSent + "," + rptRcvd + "," + m_txPower +
|
"," + rptSent + "," + rptRcvd +
|
||||||
"," + comments + "," + name;
|
"," + comments + "," + name;
|
||||||
QTextStream out(&f);
|
QTextStream out(&f);
|
||||||
out << logEntry << endl;
|
out << logEntry << endl;
|
||||||
@ -161,7 +154,7 @@ void LogQSO::accept()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Clean up and finish logging
|
//Clean up and finish logging
|
||||||
Q_EMIT acceptQSO (m_dateTimeOff, hisCall, hisGrid, m_dialFreq, mode, submode, rptSent, rptRcvd, m_txPower, comments, name,m_dateTimeOn, operator_call, m_myCall, m_myGrid, ADIF);
|
Q_EMIT acceptQSO (m_dateTimeOff, hisCall, hisGrid, m_dialFreq, mode, submode, rptSent, rptRcvd, comments, name,m_dateTimeOn, operator_call, m_myCall, m_myGrid, ADIF);
|
||||||
QDialog::accept();
|
QDialog::accept();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
5
logqso.h
5
logqso.h
@ -33,7 +33,7 @@ public:
|
|||||||
QString const& rptSent, QString const& rptRcvd, QDateTime const& dateTimeOn,
|
QString const& rptSent, QString const& rptRcvd, QDateTime const& dateTimeOn,
|
||||||
QDateTime const& dateTimeOff,
|
QDateTime const& dateTimeOff,
|
||||||
Radio::Frequency dialFreq, QString const& myCall, QString const& myGrid,
|
Radio::Frequency dialFreq, QString const& myCall, QString const& myGrid,
|
||||||
bool toRTTY, bool dBtoComments, bool bFox, QString const& opCall);
|
bool toDATA, bool dBtoComments, bool bFox, QString const& opCall);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void accept();
|
void accept();
|
||||||
@ -42,7 +42,7 @@ signals:
|
|||||||
void acceptQSO (QDateTime const& QSO_date_off, QString const& call, QString const& grid
|
void acceptQSO (QDateTime const& QSO_date_off, QString const& call, QString const& grid
|
||||||
, Radio::Frequency dial_freq, QString const& mode, QString const& submode
|
, Radio::Frequency dial_freq, QString const& mode, QString const& submode
|
||||||
, QString const& rpt_sent, QString const& rpt_received
|
, QString const& rpt_sent, QString const& rpt_received
|
||||||
, QString const& tx_power, QString const& comments
|
, QString const& comments
|
||||||
, QString const& name, QDateTime const& QSO_date_on, QString const& operator_call
|
, QString const& name, QDateTime const& QSO_date_on, QString const& operator_call
|
||||||
, QString const& my_call, QString const& my_grid, QByteArray const& ADIF);
|
, QString const& my_call, QString const& my_grid, QByteArray const& ADIF);
|
||||||
|
|
||||||
@ -56,7 +56,6 @@ private:
|
|||||||
QScopedPointer<Ui::LogQSO> ui;
|
QScopedPointer<Ui::LogQSO> ui;
|
||||||
QSettings * m_settings;
|
QSettings * m_settings;
|
||||||
Configuration const * m_config;
|
Configuration const * m_config;
|
||||||
QString m_txPower;
|
|
||||||
QString m_comments;
|
QString m_comments;
|
||||||
Radio::Frequency m_dialFreq;
|
Radio::Frequency m_dialFreq;
|
||||||
QString m_myCall;
|
QString m_myCall;
|
||||||
|
45
logqso.ui
45
logqso.ui
@ -125,6 +125,19 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
@ -307,25 +320,17 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
<spacer name="verticalSpacer_2">
|
||||||
<item>
|
<property name="orientation">
|
||||||
<widget class="QLabel" name="label_2">
|
<enum>Qt::Vertical</enum>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Tx power</string>
|
<property name="sizeHint" stdset="0">
|
||||||
</property>
|
<size>
|
||||||
</widget>
|
<width>20</width>
|
||||||
</item>
|
<height>40</height>
|
||||||
<item>
|
</size>
|
||||||
<widget class="QLineEdit" name="txPower"/>
|
</property>
|
||||||
</item>
|
</spacer>
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="cbTxPower">
|
|
||||||
<property name="text">
|
|
||||||
<string>Retain</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
@ -434,8 +439,6 @@
|
|||||||
<tabstop>rcvd</tabstop>
|
<tabstop>rcvd</tabstop>
|
||||||
<tabstop>grid</tabstop>
|
<tabstop>grid</tabstop>
|
||||||
<tabstop>name</tabstop>
|
<tabstop>name</tabstop>
|
||||||
<tabstop>txPower</tabstop>
|
|
||||||
<tabstop>cbTxPower</tabstop>
|
|
||||||
<tabstop>comments</tabstop>
|
<tabstop>comments</tabstop>
|
||||||
<tabstop>cbComments</tabstop>
|
<tabstop>cbComments</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
|
@ -6370,18 +6370,13 @@ void MainWindow::on_logQSOButton_clicked() //Log QSO button
|
|||||||
void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call, QString const& grid
|
void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call, QString const& grid
|
||||||
, Frequency dial_freq, QString const& mode, QString const &submode
|
, Frequency dial_freq, QString const& mode, QString const &submode
|
||||||
, QString const& rpt_sent, QString const& rpt_received
|
, QString const& rpt_sent, QString const& rpt_received
|
||||||
, QString const& tx_power, QString const& comments
|
, QString const& comments
|
||||||
, QString const& name, QDateTime const& QSO_date_on, QString const& operator_call
|
, QString const& name, QDateTime const& QSO_date_on, QString const& operator_call
|
||||||
, QString const& my_call, QString const& my_grid, QByteArray const& ADIF)
|
, QString const& my_call, QString const& my_grid, QByteArray const& ADIF)
|
||||||
{
|
{
|
||||||
QString date = QSO_date_on.toString("yyyyMMdd");
|
QString date = QSO_date_on.toString("yyyyMMdd");
|
||||||
m_logBook.addAsWorked (m_hisCall, m_config.bands ()->find (m_freqNominal), mode, submode, date);
|
m_logBook.addAsWorked (m_hisCall, m_config.bands ()->find (m_freqNominal), mode, submode, date);
|
||||||
|
|
||||||
#if 0
|
|
||||||
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);
|
|
||||||
m_messageClient->logged_ADIF (ADIF);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
sendNetworkMessage("LOG.QSO", QString(ADIF), {
|
sendNetworkMessage("LOG.QSO", QString(ADIF), {
|
||||||
{"UTC.ON", QVariant(QSO_date_on.toMSecsSinceEpoch())},
|
{"UTC.ON", QVariant(QSO_date_on.toMSecsSinceEpoch())},
|
||||||
{"UTC.OFF", QVariant(QSO_date_off.toMSecsSinceEpoch())},
|
{"UTC.OFF", QVariant(QSO_date_off.toMSecsSinceEpoch())},
|
||||||
|
@ -343,7 +343,7 @@ private slots:
|
|||||||
void acceptQSO (QDateTime const&, QString const& call, QString const& grid
|
void acceptQSO (QDateTime const&, QString const& call, QString const& grid
|
||||||
, Frequency dial_freq, QString const& mode, QString const& submode
|
, Frequency dial_freq, QString const& mode, QString const& submode
|
||||||
, QString const& rpt_sent, QString const& rpt_received
|
, QString const& rpt_sent, QString const& rpt_received
|
||||||
, QString const& tx_power, QString const& comments
|
, QString const& comments
|
||||||
, QString const& name, QDateTime const& QSO_date_on, QString const& operator_call
|
, QString const& name, QDateTime const& QSO_date_on, QString const& operator_call
|
||||||
, QString const& my_call, QString const& my_grid, QByteArray const& ADIF);
|
, QString const& my_call, QString const& my_grid, QByteArray const& ADIF);
|
||||||
void on_bandComboBox_currentIndexChanged (int index);
|
void on_bandComboBox_currentIndexChanged (int index);
|
||||||
|
Loading…
Reference in New Issue
Block a user