mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
Cleanup of "workedB4" interaction with ActiveStations.
This commit is contained in:
parent
f3ee013e43
commit
ffe8927a30
@ -277,6 +277,8 @@ QString DisplayText::appendWorkedB4 (QString message, QString call, QString cons
|
|||||||
gridB4onBand=true;
|
gridB4onBand=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(callB4onBand) m_points=0;
|
||||||
|
|
||||||
message = message.trimmed ();
|
message = message.trimmed ();
|
||||||
|
|
||||||
highlight_types types;
|
highlight_types types;
|
||||||
@ -372,16 +374,16 @@ QString DisplayText::appendWorkedB4 (QString message, QString call, QString cons
|
|||||||
}
|
}
|
||||||
m_CQPriority=DecodeHighlightingModel::highlight_name(top_highlight);
|
m_CQPriority=DecodeHighlightingModel::highlight_name(top_highlight);
|
||||||
|
|
||||||
if(m_npts == -1) return message;
|
if((m_points == 00) or (m_points == -1)) return message;
|
||||||
return leftJustifyAppendage (message, extra);
|
return leftJustifyAppendage (message, extra);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString DisplayText::leftJustifyAppendage (QString message, QString const& appendage0) const
|
QString DisplayText::leftJustifyAppendage (QString message, QString const& appendage0) const
|
||||||
{
|
{
|
||||||
QString appendage=appendage0;
|
QString appendage=appendage0;
|
||||||
if(m_npts>0) {
|
if(m_bDisplayPoints and (m_points>0)) {
|
||||||
appendage=" " + QString::number(m_npts);
|
appendage=" " + QString::number(m_points);
|
||||||
if(m_npts<10) appendage=" " + appendage;
|
if(m_points<10) appendage=" " + appendage;
|
||||||
}
|
}
|
||||||
if (appendage.size ())
|
if (appendage.size ())
|
||||||
{
|
{
|
||||||
@ -404,8 +406,10 @@ void DisplayText::displayDecodedText(DecodedText const& decodedText, QString con
|
|||||||
QString const& mode,
|
QString const& mode,
|
||||||
bool displayDXCCEntity, LogBook const& logBook,
|
bool displayDXCCEntity, LogBook const& logBook,
|
||||||
QString const& currentBand, bool ppfx, bool bCQonly,
|
QString const& currentBand, bool ppfx, bool bCQonly,
|
||||||
bool haveFSpread, float fSpread)
|
bool haveFSpread, float fSpread, bool bDisplayPoints, int points)
|
||||||
{
|
{
|
||||||
|
m_points=points;
|
||||||
|
m_bDisplayPoints=bDisplayPoints;
|
||||||
m_bPrincipalPrefix=ppfx;
|
m_bPrincipalPrefix=ppfx;
|
||||||
QColor bg;
|
QColor bg;
|
||||||
QColor fg;
|
QColor fg;
|
||||||
@ -666,8 +670,3 @@ void DisplayText::highlight_callsign (QString const& callsign, QColor const& bg,
|
|||||||
}
|
}
|
||||||
setCurrentCharFormat (old_format);
|
setCurrentCharFormat (old_format);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisplayText::displayPoints(int npts)
|
|
||||||
{
|
|
||||||
m_npts=npts;
|
|
||||||
}
|
|
||||||
|
@ -30,14 +30,14 @@ public:
|
|||||||
void displayDecodedText(DecodedText const& decodedText, QString const& myCall, QString const& mode,
|
void displayDecodedText(DecodedText const& decodedText, QString const& myCall, QString const& mode,
|
||||||
bool displayDXCCEntity, LogBook const& logBook,
|
bool displayDXCCEntity, LogBook const& logBook,
|
||||||
QString const& currentBand=QString {}, bool ppfx=false, bool bCQonly=false,
|
QString const& currentBand=QString {}, bool ppfx=false, bool bCQonly=false,
|
||||||
bool haveFSpread = false, float fSpread = 0.);
|
bool haveFSpread = false, float fSpread = 0.0, bool bDisplayPoints=false, int points=-99);
|
||||||
void displayTransmittedText(QString text, QString modeTx, qint32 txFreq, bool bFastMode, double TRperiod);
|
void displayTransmittedText(QString text, QString modeTx, qint32 txFreq, bool bFastMode, double TRperiod);
|
||||||
void displayQSY(QString text);
|
void displayQSY(QString text);
|
||||||
void displayFoxToBeCalled(QString t, QColor bg = QColor {}, QColor fg = QColor {});
|
void displayFoxToBeCalled(QString t, QColor bg = QColor {}, QColor fg = QColor {});
|
||||||
void new_period ();
|
void new_period ();
|
||||||
void displayPoints(int npts);
|
|
||||||
QString CQPriority(){return m_CQPriority;};
|
QString CQPriority(){return m_CQPriority;};
|
||||||
qint32 m_npts;
|
qint32 m_points;
|
||||||
|
bool m_bDisplayPoints;
|
||||||
|
|
||||||
Q_SIGNAL void selectCallsign (Qt::KeyboardModifiers);
|
Q_SIGNAL void selectCallsign (Qt::KeyboardModifiers);
|
||||||
Q_SIGNAL void erased ();
|
Q_SIGNAL void erased ();
|
||||||
|
@ -1502,8 +1502,8 @@ void MainWindow::dataSink(qint64 frames)
|
|||||||
freqcal_(&dec_data.d2[0], &k, &nkhz, &RxFreq, &ftol, &line[0], (FCL)80);
|
freqcal_(&dec_data.d2[0], &k, &nkhz, &RxFreq, &ftol, &line[0], (FCL)80);
|
||||||
QString t=QString::fromLatin1(line);
|
QString t=QString::fromLatin1(line);
|
||||||
DecodedText decodedtext {t};
|
DecodedText decodedtext {t};
|
||||||
ui->decodedTextBrowser->displayDecodedText (decodedtext, m_config.my_callsign (), m_mode, m_config.DXCC (),
|
ui->decodedTextBrowser->displayDecodedText (decodedtext, m_config.my_callsign(),
|
||||||
m_logBook, m_currentBand, m_config.ppfx ());
|
m_mode, m_config.DXCC(), m_logBook, m_currentBand, m_config.ppfx());
|
||||||
if (ui->measure_check_box->isChecked ()) {
|
if (ui->measure_check_box->isChecked ()) {
|
||||||
// Append results text to file "fmt.all".
|
// Append results text to file "fmt.all".
|
||||||
QFile f {m_config.writeable_data_dir ().absoluteFilePath ("fmt.all")};
|
QFile f {m_config.writeable_data_dir ().absoluteFilePath ("fmt.all")};
|
||||||
@ -3393,7 +3393,7 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_points=-1;
|
||||||
if(m_activeCall.contains(deCall)) {
|
if(m_activeCall.contains(deCall)) {
|
||||||
|
|
||||||
// Don't display stations we already worked on this band.
|
// Don't display stations we already worked on this band.
|
||||||
@ -3417,9 +3417,7 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt)
|
|||||||
if(bCQ or deGrid=="RR73" or deGrid=="73") rc.ready2call=true;
|
if(bCQ or deGrid=="RR73" or deGrid=="73") rc.ready2call=true;
|
||||||
rc.decodeTime=m_latestDecodeTime;
|
rc.decodeTime=m_latestDecodeTime;
|
||||||
m_recentCall[deCall]=rc;
|
m_recentCall[deCall]=rc;
|
||||||
|
m_points=m_activeCall.value(deCall).points;
|
||||||
int points=m_activeCall.value(deCall).points;
|
|
||||||
ui->decodedTextBrowser->displayPoints(points);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3630,6 +3628,8 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QFile f(m_appDir + "/DisplayPoints");
|
||||||
|
bool bDisplayPoints = f.exists() or m_config.special_op_id()==SpecOp::ARRL_DIGI;
|
||||||
//Left (Band activity) window
|
//Left (Band activity) window
|
||||||
if(!bAvgMsg) {
|
if(!bAvgMsg) {
|
||||||
if(m_mode=="FT8" and SpecOp::FOX == m_config.special_op_id()) {
|
if(m_mode=="FT8" and SpecOp::FOX == m_config.special_op_id()) {
|
||||||
@ -3642,18 +3642,14 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DecodedText decodedtext1=decodedtext0;
|
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
|
if((m_mode=="FT4" or m_mode=="FT8") and bDisplayPoints
|
||||||
and decodedtext1.isStandardMessage()) {
|
and decodedtext1.isStandardMessage()) {
|
||||||
ui->decodedTextBrowser->displayPoints(-1);
|
|
||||||
ARRL_Digi_Update(decodedtext1);
|
ARRL_Digi_Update(decodedtext1);
|
||||||
}
|
}
|
||||||
ui->decodedTextBrowser->displayDecodedText (decodedtext1, m_config.my_callsign (), m_mode, m_config.DXCC (),
|
ui->decodedTextBrowser->displayDecodedText (decodedtext1, m_config.my_callsign (), m_mode, m_config.DXCC (),
|
||||||
m_logBook, m_currentBand, m_config.ppfx (),
|
m_logBook, m_currentBand, m_config.ppfx (),
|
||||||
ui->cbCQonly->isVisible() && ui->cbCQonly->isChecked(),
|
ui->cbCQonly->isVisible() && ui->cbCQonly->isChecked(),
|
||||||
haveFSpread, fSpread);
|
haveFSpread, fSpread, bDisplayPoints, m_points);
|
||||||
|
|
||||||
if (m_config.highlight_DXcall () && (m_hisCall!="") && ((decodedtext.string().contains(QRegularExpression {"(\\w+) " + m_hisCall}))
|
if (m_config.highlight_DXcall () && (m_hisCall!="") && ((decodedtext.string().contains(QRegularExpression {"(\\w+) " + m_hisCall}))
|
||||||
|| (decodedtext.string().contains(QRegularExpression {"(\\w+) <" + m_hisCall +">"}))
|
|| (decodedtext.string().contains(QRegularExpression {"(\\w+) <" + m_hisCall +">"}))
|
||||||
@ -3757,7 +3753,7 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
// or contains MyCall
|
// or contains MyCall
|
||||||
if(!m_bBestSPArmed or m_mode!="FT4") {
|
if(!m_bBestSPArmed or m_mode!="FT4") {
|
||||||
ui->decodedTextBrowser2->displayDecodedText (decodedtext0, m_config.my_callsign (), m_mode, m_config.DXCC (),
|
ui->decodedTextBrowser2->displayDecodedText (decodedtext0, m_config.my_callsign (), m_mode, m_config.DXCC (),
|
||||||
m_logBook, m_currentBand, m_config.ppfx ());
|
m_logBook, m_currentBand, m_config.ppfx (), false, false, 0.0, bDisplayPoints, m_points);
|
||||||
}
|
}
|
||||||
m_QSOText = decodedtext.string ().trimmed ();
|
m_QSOText = decodedtext.string ().trimmed ();
|
||||||
}
|
}
|
||||||
|
@ -494,6 +494,7 @@ private:
|
|||||||
qint32 m_nDecodes=0;
|
qint32 m_nDecodes=0;
|
||||||
qint32 m_maxPoints=-1;
|
qint32 m_maxPoints=-1;
|
||||||
qint32 m_latestDecodeTime=-1;
|
qint32 m_latestDecodeTime=-1;
|
||||||
|
qint32 m_points=-99;
|
||||||
|
|
||||||
bool m_btxok; //True if OK to transmit
|
bool m_btxok; //True if OK to transmit
|
||||||
bool m_diskData;
|
bool m_diskData;
|
||||||
|
Loading…
Reference in New Issue
Block a user