From ee350524fabf6fb5b744e5d71af06ef6054c132b Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Sun, 10 Feb 2019 09:37:26 -0500 Subject: [PATCH] Removed tx power from the log window. It's not valid ADIF without a dropdown --- logbook/adif.cpp | 5 +---- logbook/adif.h | 8 ++++---- logqso.cpp | 17 +++++------------ logqso.h | 5 ++--- logqso.ui | 45 ++++++++++++++++++++++++--------------------- mainwindow.cpp | 7 +------ mainwindow.h | 2 +- 7 files changed, 38 insertions(+), 51 deletions(-) diff --git a/logbook/adif.cpp b/logbook/adif.cpp index a8ea30c..20ef842 100644 --- a/logbook/adif.cpp +++ b/logbook/adif.cpp @@ -166,7 +166,7 @@ QByteArray ADIF::QSOToADIF(QString const& hisCall, QString const& hisGrid, QStri , 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& operator_call) + , QString const& m_myGrid, QString const& operator_call) { QString t; t = "" + hisCall; @@ -187,9 +187,6 @@ QByteArray ADIF::QSOToADIF(QString const& hisCall, QString const& hisGrid, QStri m_myCall; t += " " + m_myGrid; - if (m_txPower != "") - t += " " + m_txPower; if (comments != "") t += " " + comments; diff --git a/logbook/adif.h b/logbook/adif.h index ff45c1d..dbee8bb 100644 --- a/logbook/adif.h +++ b/logbook/adif.h @@ -32,10 +32,10 @@ class ADIF bool addQSOToFile(QByteArray const& ADIF_record); 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& band, 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); + , 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& operator_call); private: diff --git a/logqso.cpp b/logqso.cpp index 1b7361e..7d704f1 100644 --- a/logqso.cpp +++ b/logqso.cpp @@ -37,9 +37,7 @@ void LogQSO::loadSettings () { m_settings->beginGroup ("LogQSO"); 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 ()); - m_txPower = m_settings->value ("TxPower", "").toString (); m_comments = m_settings->value ("LogComments", "").toString(); m_settings->endGroup (); } @@ -48,9 +46,7 @@ void LogQSO::storeSettings () const { m_settings->beginGroup ("LogQSO"); m_settings->setValue ("geometry", saveGeometry ()); - m_settings->setValue ("SaveTxPower", ui->cbTxPower->isChecked ()); m_settings->setValue ("SaveComments", ui->cbComments->isChecked ()); - m_settings->setValue ("TxPower", m_txPower); m_settings->setValue ("LogComments", m_comments); m_settings->endGroup (); } @@ -59,15 +55,13 @@ 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 toRTTY, bool dBtoComments, bool bFox, QString const& opCall) + bool toDATA, bool dBtoComments, bool bFox, QString const& opCall) { if(!isHidden()) return; ui->call->setText(hisCall); ui->grid->setText(hisGrid); ui->name->setText(""); - ui->txPower->setText(""); ui->comments->setText(""); - if (ui->cbTxPower->isChecked ()) ui->txPower->setText(m_txPower); if (ui->cbComments->isChecked ()) ui->comments->setText(m_comments); if(dBtoComments) { QString t=mode; @@ -75,7 +69,7 @@ void LogQSO::initLogQSO(QString const& hisCall, QString const& hisGrid, QString if(rptRcvd!="") t+=" Rcvd: " + rptRcvd; ui->comments->setText(t); } - if(toRTTY) mode="DATA"; + if(toDATA) mode="DATA"; ui->mode->setText(mode); ui->sent->setText(rptSent); ui->rcvd->setText(rptRcvd); @@ -111,7 +105,6 @@ void LogQSO::accept() m_dateTimeOff = ui->end_date_time->dateTime (); band=ui->band->text(); name=ui->name->text(); - m_txPower=ui->txPower->text(); comments=ui->comments->text(); m_comments=comments; QString strDialFreq(QString::number(m_dialFreq / 1.e6,'f',6)); @@ -123,7 +116,7 @@ void LogQSO::accept() adifile.init(adifilePath); 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)) { MessageBox::warning_message (this, tr ("Log file error"), @@ -153,7 +146,7 @@ void LogQSO::accept() m_dateTimeOff.date().toString("yyyy-MM-dd,") + m_dateTimeOff.time().toString("hh:mm:ss,") + hisCall + "," + hisGrid + "," + strDialFreq + "," + (mode == "MFSK" ? "JS8" : mode) + - "," + rptSent + "," + rptRcvd + "," + m_txPower + + "," + rptSent + "," + rptRcvd + "," + comments + "," + name; QTextStream out(&f); out << logEntry << endl; @@ -161,7 +154,7 @@ void LogQSO::accept() } //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(); } diff --git a/logqso.h b/logqso.h index cfda3d4..21dd5a7 100644 --- a/logqso.h +++ b/logqso.h @@ -33,7 +33,7 @@ public: QString const& rptSent, QString const& rptRcvd, QDateTime const& dateTimeOn, QDateTime const& dateTimeOff, 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: void accept(); @@ -42,7 +42,7 @@ signals: void acceptQSO (QDateTime const& QSO_date_off, QString const& call, QString const& grid , Radio::Frequency dial_freq, QString const& mode, QString const& submode , 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& my_call, QString const& my_grid, QByteArray const& ADIF); @@ -56,7 +56,6 @@ private: QScopedPointer ui; QSettings * m_settings; Configuration const * m_config; - QString m_txPower; QString m_comments; Radio::Frequency m_dialFreq; QString m_myCall; diff --git a/logqso.ui b/logqso.ui index 0a1dae4..a7e3b74 100644 --- a/logqso.ui +++ b/logqso.ui @@ -125,6 +125,19 @@ + + + + Qt::Vertical + + + + 20 + 40 + + + + @@ -307,25 +320,17 @@ - - - - - Tx power - - - - - - - - - - Retain - - - - + + + Qt::Vertical + + + + 20 + 40 + + + @@ -434,8 +439,6 @@ rcvd grid name - txPower - cbTxPower comments cbComments diff --git a/mainwindow.cpp b/mainwindow.cpp index 9234008..57f5212 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -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 , Frequency dial_freq, QString const& mode, QString const &submode , 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& my_call, QString const& my_grid, QByteArray const& ADIF) { QString date = QSO_date_on.toString("yyyyMMdd"); 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), { {"UTC.ON", QVariant(QSO_date_on.toMSecsSinceEpoch())}, {"UTC.OFF", QVariant(QSO_date_off.toMSecsSinceEpoch())}, diff --git a/mainwindow.h b/mainwindow.h index 747f76e..98658f1 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -343,7 +343,7 @@ private slots: void acceptQSO (QDateTime const&, QString const& call, QString const& grid , Frequency dial_freq, QString const& mode, QString const& submode , 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& my_call, QString const& my_grid, QByteArray const& ADIF); void on_bandComboBox_currentIndexChanged (int index);