diff --git a/mainwindow.cpp b/mainwindow.cpp index fc483f95d..3ba4accbf 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -7417,6 +7417,7 @@ void MainWindow::foxTxSequencer() m_msgAvgWidget->foxAddLog(logLine); } on_logQSOButton_clicked(); + m_foxRateQueue.enqueue(now); //Add present time in seconds to Rate queue. m_loggedByFox[hc1] += (m_lastBand + " "); if(m_foxQSOqueue.contains(hc1)) m_foxQSOqueue.removeOne(hc1); @@ -7475,10 +7476,14 @@ Transmit: if(ageSec > maxAge) { m_foxQSO.remove(a); m_foxQSOqueue.removeOne(a); - } else { -// qDebug() << "Age:" << a << ageSec; } } + while(!m_foxRateQueue.isEmpty()) { + qint64 age = now - m_foxRateQueue.head(); + if(age < 3600) break; + m_foxRateQueue.dequeue(); + } + m_msgAvgWidget->foxLabRate(m_foxRateQueue.size()); } void MainWindow::rm_tb4(QString houndCall) diff --git a/mainwindow.h b/mainwindow.h index 95d34d02e..32f19e39a 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -581,6 +581,7 @@ private: QQueue m_houndQueue; QQueue m_foxQSOqueue; QQueue m_foxRR73Queue; + QQueue m_foxRateQueue; QDateTime m_dateTimeQSOOn; QDateTime m_dateTimeLastTX; diff --git a/messageaveraging.cpp b/messageaveraging.cpp index 9f28ba9f7..424b4d3dd 100644 --- a/messageaveraging.cpp +++ b/messageaveraging.cpp @@ -27,6 +27,7 @@ MessageAveraging::MessageAveraging(QSettings * settings, QFont const& font, QWid ui->lab3->setVisible(false); } setWindowTitle(m_title_); + m_nLogged_=0; } MessageAveraging::~MessageAveraging() @@ -111,10 +112,14 @@ void MessageAveraging::foxLabRate(int n) { QString t; t.sprintf("Rate: %3d",n); - ui->lab3->setText(t); + ui->lab4->setText(t); } void MessageAveraging::foxAddLog(QString logLine) { ui->msgAvgPlainTextEdit->insertPlainText(logLine + "\n"); + m_nLogged_++; + QString t; + t.sprintf("Logged: %d",m_nLogged_); + ui->lab3->setText(t); } diff --git a/messageaveraging.h b/messageaveraging.h index 5bbdb3d0c..ea8e06b9e 100644 --- a/messageaveraging.h +++ b/messageaveraging.h @@ -32,6 +32,7 @@ private: void setContentFont (QFont const&); QSettings * settings_; QString m_title_; + qint32 m_nLogged_; QScopedPointer ui; }; diff --git a/messageaveraging.ui b/messageaveraging.ui index c65a80f92..7588ce08c 100644 --- a/messageaveraging.ui +++ b/messageaveraging.ui @@ -6,7 +6,7 @@ 0 0 - 276 + 354 268 @@ -79,6 +79,13 @@ + + Logged: 0 + + + + + 0