Merge branch 'qmap' of bitbucket.org:k1jt/wsjtx into qmap

This commit is contained in:
Joe Taylor 2023-12-12 12:23:08 -05:00
commit 7255a7c86a
2 changed files with 18 additions and 5 deletions

View File

@ -954,11 +954,9 @@ void MainWindow::guiUpdate()
m_nline++;
QTextCursor cursor(ui->decodedTextBrowser->document()->findBlockByLineNumber(m_nline-1));
QTextBlockFormat f = cursor.blockFormat();
if(t.mid(36,2)=="30") {
f.setBackground(QBrush(Qt::yellow));
} else {
f.setBackground(QBrush(Qt::white));
}
f.setBackground(QBrush(Qt::white));
if(t.mid(36,2)=="30") f.setBackground(QBrush(Qt::yellow));
if(t.indexOf(m_myCall)>10) f.setBackground(QBrush(Qt::red));
cursor.setBlockFormat(f);
}
}

View File

@ -92,6 +92,21 @@ void ActiveStations::displayRecentStations(QString mode, QString const& t)
bool bClickOK=m_clickOK;
m_clickOK=false;
ui->RecentStationsPlainTextEdit->setPlainText(t);
//Yellow background for Q65-30x decodes:
int istart=0;
while(istart<t.length()) {
int npos=t.indexOf(QRegularExpression(" 30[ABCD] "), istart);
if(npos<0) break;
QTextCursor cursor=ui->RecentStationsPlainTextEdit->textCursor();
cursor.setPosition(npos);
cursor.select(QTextCursor::LineUnderCursor);
QTextCharFormat fmt;
fmt.setBackground(QBrush(Qt::yellow));
cursor.setCharFormat(fmt);
istart=npos+10;
}
m_clickOK=bClickOK;
}