mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 05:38:46 -05:00
Add labels to Log window, and correct the log-window entry logic.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8355 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
32c5490f55
commit
b7fea62960
@ -7298,6 +7298,10 @@ void MainWindow::selectHound(QString line)
|
||||
QTextCursor cursor = ui->textBrowser4->textCursor();
|
||||
cursor.setPosition(0); // Scroll to top of list
|
||||
ui->textBrowser4->setTextCursor(cursor);
|
||||
if(m_msgAvgWidget != NULL and m_msgAvgWidget->isVisible()) {
|
||||
m_msgAvgWidget->foxLabQueued(m_houndQueue.size());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -7316,10 +7320,12 @@ void MainWindow::houndCallers()
|
||||
QString t="";
|
||||
QString line,houndCall,paddedHoundCall;
|
||||
m_nHoundsCalling=0;
|
||||
int nTotal=0; //Total number of decoded Hounds calling Fox in 4 most recent Rx sequences
|
||||
|
||||
// Read and process the file of Hound callers.
|
||||
while(!s.atEnd()) {
|
||||
line=s.readLine();
|
||||
nTotal++;
|
||||
houndCall=line.mid(0,6).trimmed();
|
||||
paddedHoundCall=houndCall + " ";
|
||||
//Don't list a hound already in the queue
|
||||
@ -7337,9 +7343,13 @@ void MainWindow::houndCallers()
|
||||
int i1=countryName.lastIndexOf(";");
|
||||
continent=countryName.mid(i1+2,-1);
|
||||
t = t + line + " " + continent + "\n";
|
||||
m_nHoundsCalling++; // Total number of decoded Hounds calling Fox
|
||||
m_nHoundsCalling++; // Number of accepted Hounds to be sorted
|
||||
}
|
||||
}
|
||||
if(m_msgAvgWidget != NULL and m_msgAvgWidget->isVisible()) {
|
||||
m_msgAvgWidget->foxLabCallers(nTotal);
|
||||
}
|
||||
|
||||
// Sort and display accumulated list of Hound callers
|
||||
if(t.length()>30) {
|
||||
m_isort=ui->comboBoxHoundSort->currentIndex();
|
||||
@ -7360,7 +7370,6 @@ void MainWindow::foxRxSequencer(QString houndCall, QString houndGrid)
|
||||
* message appears for slot i, we queue its message to be repeated.
|
||||
*/
|
||||
|
||||
qDebug() << "AA" << houndCall << houndGrid;
|
||||
for(int i=0; i<m_Nslots; i++) {
|
||||
if(m_foxMsgSent[i].contains(houndCall + " ")) {
|
||||
m_houndRptRcvd[i]=houndGrid.mid(1);
|
||||
@ -7407,9 +7416,7 @@ TxTimeout:
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(fm.contains(" RR73")) {
|
||||
|
||||
// Log this QSO!
|
||||
m_hisCall=m_houndCall[i];
|
||||
m_hisGrid=m_houndGrid[i];
|
||||
@ -7417,12 +7424,14 @@ TxTimeout:
|
||||
m_rptRcvd=m_houndRptRcvd[i];
|
||||
qDebug() << "Logged by Fox:" << i << m_hisCall << m_hisGrid << m_rptSent
|
||||
<< m_rptRcvd << m_lastBand;
|
||||
|
||||
QDateTime now {QDateTime::currentDateTimeUtc ()};
|
||||
QString logLine=now.toString("yyyy-MM-dd hh:mm") + " " + m_hisCall +
|
||||
" " + m_hisGrid + " " + m_rptSent + " " + m_rptRcvd + " " + m_lastBand;
|
||||
if(m_msgAvgWidget != NULL and m_msgAvgWidget->isVisible()) {
|
||||
m_msgAvgWidget->displayAvg(logLine);
|
||||
m_msgAvgWidget->foxAddLog(logLine);
|
||||
}
|
||||
|
||||
on_logQSOButton_clicked();
|
||||
m_loggedByFox[m_hisCall] += (m_lastBand + " ");
|
||||
|
||||
@ -7442,6 +7451,7 @@ TxTimeout:
|
||||
m_houndGrid[i]="";
|
||||
}
|
||||
}
|
||||
|
||||
if(!fm.contains(";")) {
|
||||
fm.remove("<");
|
||||
fm.remove(">");
|
||||
|
@ -22,6 +22,9 @@ MessageAveraging::MessageAveraging(QSettings * settings, QFont const& font, QWid
|
||||
ui->header_label->setText(" Date Time Call Grid Sent Rcvd Band");
|
||||
} else {
|
||||
ui->header_label->setText(" UTC Sync DT Freq ");
|
||||
ui->lab1->setVisible(false);
|
||||
ui->lab2->setVisible(false);
|
||||
ui->lab3->setVisible(false);
|
||||
}
|
||||
setWindowTitle(m_title_);
|
||||
}
|
||||
@ -87,5 +90,31 @@ void MessageAveraging::foxLogSetup()
|
||||
{
|
||||
m_title_=QApplication::applicationName () + " - Fox Log";
|
||||
setWindowTitle(m_title_);
|
||||
ui->header_label->setText(" Date Time Call Grid Sent Rcvd Band");
|
||||
ui->header_label->setText(" Date Time Call Grid Sent Rcvd Band");
|
||||
}
|
||||
|
||||
void MessageAveraging::foxLabCallers(int n)
|
||||
{
|
||||
QString t;
|
||||
t.sprintf("Callers: %3d",n);
|
||||
ui->lab1->setText(t);
|
||||
}
|
||||
|
||||
void MessageAveraging::foxLabQueued(int n)
|
||||
{
|
||||
QString t;
|
||||
t.sprintf("Queued: %3d",n);
|
||||
ui->lab2->setText(t);
|
||||
}
|
||||
|
||||
void MessageAveraging::foxLabRate(int n)
|
||||
{
|
||||
QString t;
|
||||
t.sprintf("Rate: %3d",n);
|
||||
ui->lab3->setText(t);
|
||||
}
|
||||
|
||||
void MessageAveraging::foxAddLog(QString logLine)
|
||||
{
|
||||
ui->msgAvgPlainTextEdit->insertPlainText(logLine + "\n");
|
||||
}
|
||||
|
@ -18,6 +18,10 @@ public:
|
||||
void displayAvg(QString const&);
|
||||
void changeFont (QFont const&);
|
||||
void foxLogSetup();
|
||||
void foxLabCallers(int n);
|
||||
void foxLabQueued(int n);
|
||||
void foxLabRate(int n);
|
||||
void foxAddLog(QString logLine);
|
||||
|
||||
protected:
|
||||
void closeEvent (QCloseEvent *) override;
|
||||
|
@ -2,13 +2,21 @@
|
||||
<ui version="4.0">
|
||||
<class>MessageAveraging</class>
|
||||
<widget class="QWidget" name="MessageAveraging">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>276</width>
|
||||
<height>268</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Message Averaging</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="header_label">
|
||||
<property name="text">
|
||||
<string> UTC Sync DT Freq </string>
|
||||
@ -18,13 +26,72 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="msgAvgPlainTextEdit">
|
||||
<property name="lineWrapMode">
|
||||
<enum>QPlainTextEdit::NoWrap</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lab1">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Callers: 0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lab2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Queued: 0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lab3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Rate: 0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
Loading…
Reference in New Issue
Block a user