Working toward display of points in left decode window.

This commit is contained in:
Joe Taylor 2022-03-22 11:22:56 -04:00
parent f47596b2eb
commit f3ee013e43
3 changed files with 25 additions and 6 deletions

View File

@ -372,11 +372,17 @@ QString DisplayText::appendWorkedB4 (QString message, QString call, QString cons
}
m_CQPriority=DecodeHighlightingModel::highlight_name(top_highlight);
if(m_npts == -1) return message;
return leftJustifyAppendage (message, extra);
}
QString DisplayText::leftJustifyAppendage (QString message, QString const& appendage) const
QString DisplayText::leftJustifyAppendage (QString message, QString const& appendage0) const
{
QString appendage=appendage0;
if(m_npts>0) {
appendage=" " + QString::number(m_npts);
if(m_npts<10) appendage=" " + appendage;
}
if (appendage.size ())
{
// allow for seconds
@ -660,3 +666,8 @@ void DisplayText::highlight_callsign (QString const& callsign, QColor const& bg,
}
setCurrentCharFormat (old_format);
}
void DisplayText::displayPoints(int npts)
{
m_npts=npts;
}

View File

@ -35,7 +35,9 @@ public:
void displayQSY(QString text);
void displayFoxToBeCalled(QString t, QColor bg = QColor {}, QColor fg = QColor {});
void new_period ();
void displayPoints(int npts);
QString CQPriority(){return m_CQPriority;};
qint32 m_npts;
Q_SIGNAL void selectCallsign (Qt::KeyboardModifiers);
Q_SIGNAL void erased ();

View File

@ -3417,6 +3417,9 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt)
if(bCQ or deGrid=="RR73" or deGrid=="73") rc.ready2call=true;
rc.decodeTime=m_latestDecodeTime;
m_recentCall[deCall]=rc;
int points=m_activeCall.value(deCall).points;
ui->decodedTextBrowser->displayPoints(points);
}
}
@ -3639,6 +3642,14 @@ void MainWindow::readFromStdout() //readFromStdout
}
} else {
DecodedText decodedtext1=decodedtext0;
ui->decodedTextBrowser->displayPoints(-99);
bool bDisplayPoints=m_config.special_op_id()==SpecOp::ARRL_DIGI;
bDisplayPoints=true;
if((m_mode=="FT4" or m_mode=="FT8") and bDisplayPoints
and decodedtext1.isStandardMessage()) {
ui->decodedTextBrowser->displayPoints(-1);
ARRL_Digi_Update(decodedtext1);
}
ui->decodedTextBrowser->displayDecodedText (decodedtext1, m_config.my_callsign (), m_mode, m_config.DXCC (),
m_logBook, m_currentBand, m_config.ppfx (),
ui->cbCQonly->isVisible() && ui->cbCQonly->isChecked(),
@ -3673,11 +3684,6 @@ void MainWindow::readFromStdout() //readFromStdout
}
}
}
if((m_mode=="FT4" or m_mode=="FT8") /* and SpecOp::ARRL_DIGI==m_config.special_op_id() */
and decodedtext.isStandardMessage()) {
ARRL_Digi_Update(decodedtext);
}
}
//Right (Rx Frequency) window