From 423b3b7361f65da46abc25588852cba35bc89d0b Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Wed, 18 Jan 2017 17:24:08 +0000 Subject: [PATCH] Fix Log QSO so new data entries on form are actually used for the UDP message. Fix tab order on Log QSO window. Amend message_aggregator QSOs logged window to show both time on and time off. Thanks to Mike W9MDB for this patch. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7532 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- MessageServer.cpp | 2 +- UDPExamples/MessageAggregatorMainWindow.cpp | 12 +++++++----- UDPExamples/MessageAggregatorMainWindow.hpp | 4 ++-- logqso.cpp | 2 ++ logqso.ui | 19 ++++--------------- 5 files changed, 16 insertions(+), 23 deletions(-) diff --git a/MessageServer.cpp b/MessageServer.cpp index a9812e3f3..e73203a40 100644 --- a/MessageServer.cpp +++ b/MessageServer.cpp @@ -283,7 +283,7 @@ void MessageServer::impl::parse_message (QHostAddress const& sender, port_type s QByteArray tx_power; QByteArray comments; QByteArray name; - QDateTime timeOn; + QDateTime timeOn; // Note: LOTW uses TIME_ON for their +/- 30-minute time window in >> timeOff >> dx_call >> dx_grid >> dial_frequency >> mode >> report_sent >> report_received >> tx_power >> comments >> name >> timeOn; if (check_status (in) != Fail) diff --git a/UDPExamples/MessageAggregatorMainWindow.cpp b/UDPExamples/MessageAggregatorMainWindow.cpp index e15fcbf17..d46dde859 100644 --- a/UDPExamples/MessageAggregatorMainWindow.cpp +++ b/UDPExamples/MessageAggregatorMainWindow.cpp @@ -12,7 +12,8 @@ using port_type = MessageServer::port_type; namespace { char const * const headings[] = { - QT_TRANSLATE_NOOP ("MessageAggregatorMainWindow", "Date/Time"), + QT_TRANSLATE_NOOP ("MessageAggregatorMainWindow", "Time On"), + QT_TRANSLATE_NOOP ("MessageAggregatorMainWindow", "Time Off"), QT_TRANSLATE_NOOP ("MessageAggregatorMainWindow", "Callsign"), QT_TRANSLATE_NOOP ("MessageAggregatorMainWindow", "Grid"), QT_TRANSLATE_NOOP ("MessageAggregatorMainWindow", "Name"), @@ -26,7 +27,7 @@ namespace } MessageAggregatorMainWindow::MessageAggregatorMainWindow () - : log_ {new QStandardItemModel {0, 10, this}} + : log_ {new QStandardItemModel {0, 11, this}} , decodes_model_ {new DecodesModel {this}} , beacons_model_ {new BeaconsModel {this}} , server_ {new MessageServer {this}} @@ -109,13 +110,14 @@ MessageAggregatorMainWindow::MessageAggregatorMainWindow () show (); } -void MessageAggregatorMainWindow::log_qso (QString const& /*id*/, QDateTime time, QString const& dx_call, QString const& dx_grid +void MessageAggregatorMainWindow::log_qso (QString const& /*id*/, QDateTime timeOff, 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) + , QString const& name, QDateTime timeOn) { QList row; - row << new QStandardItem {time.toString ("dd-MMM-yyyy hh:mm")} + row << new QStandardItem {timeOn.toString ("dd-MMM-yyyy hh:mm")} + << new QStandardItem {timeOff.toString ("dd-MMM-yyyy hh:mm")} << new QStandardItem {dx_call} << new QStandardItem {dx_grid} << new QStandardItem {name} diff --git a/UDPExamples/MessageAggregatorMainWindow.hpp b/UDPExamples/MessageAggregatorMainWindow.hpp index 4e86c9a55..7bf34426b 100644 --- a/UDPExamples/MessageAggregatorMainWindow.hpp +++ b/UDPExamples/MessageAggregatorMainWindow.hpp @@ -26,10 +26,10 @@ class MessageAggregatorMainWindow public: MessageAggregatorMainWindow (); - Q_SLOT void log_qso (QString const& /*id*/, QDateTime time, QString const& dx_call, QString const& dx_grid + Q_SLOT void log_qso (QString const& /*id*/, QDateTime timeOff, 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); + , QString const& name, QDateTime timeOn); private: void add_client (QString const& id, QString const& version, QString const& revision); diff --git a/logqso.cpp b/logqso.cpp index 39ef44495..4892d9849 100644 --- a/logqso.cpp +++ b/logqso.cpp @@ -101,6 +101,8 @@ void LogQSO::accept() mode=ui->mode->text(); rptSent=ui->sent->text(); rptRcvd=ui->rcvd->text(); + m_dateTimeOn = m_dateTimeOn.fromString(ui->dateOn->text()+" "+ui->timeOn->text(),"yyyy-MM-dd hhmm"); + m_dateTimeOff = m_dateTimeOff.fromString(ui->dateOff->text()+" "+ui->timeOff->text(),"yyyy-MM-dd hhmm"); dateOn=ui->dateOn->text(); dateOn=dateOn.mid(0,4) + dateOn.mid(5,2) + dateOn.mid(8,2); timeOn=ui->timeOn->text(); diff --git a/logqso.ui b/logqso.ui index 2ea916eee..8926f8d05 100644 --- a/logqso.ui +++ b/logqso.ui @@ -2,20 +2,6 @@ LogQSO - - - 0 - 0 - 520 - 318 - - - - - 16777215 - 16777215 - - @@ -806,6 +792,10 @@ call dateOn timeOn + dateOff + timeOff + mode + band sent rcvd grid @@ -814,7 +804,6 @@ cbTxPower comments cbComments - buttonBox