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
This commit is contained in:
Bill Somerville 2017-01-18 17:24:08 +00:00
parent ffb8046c91
commit 423b3b7361
5 changed files with 16 additions and 23 deletions

View File

@ -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)

View File

@ -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<QStandardItem *> 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}

View File

@ -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);

View File

@ -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();

View File

@ -2,20 +2,6 @@
<ui version="4.0">
<class>LogQSO</class>
<widget class="QDialog" name="LogQSO">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>520</width>
<height>318</height>
</rect>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<spacer name="verticalSpacer_3">
@ -806,6 +792,10 @@
<tabstop>call</tabstop>
<tabstop>dateOn</tabstop>
<tabstop>timeOn</tabstop>
<tabstop>dateOff</tabstop>
<tabstop>timeOff</tabstop>
<tabstop>mode</tabstop>
<tabstop>band</tabstop>
<tabstop>sent</tabstop>
<tabstop>rcvd</tabstop>
<tabstop>grid</tabstop>
@ -814,7 +804,6 @@
<tabstop>cbTxPower</tabstop>
<tabstop>comments</tabstop>
<tabstop>cbComments</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources/>
<connections>