From 601910101869be0e3ee9aad239e4d9e6ec4ec07d Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 8 Dec 2023 15:21:47 -0500 Subject: [PATCH] Highlight QMAP's Q65-30B decodes with yellow background. --- qmap/mainwindow.cpp | 12 +++++++++++- qmap/mainwindow.h | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/qmap/mainwindow.cpp b/qmap/mainwindow.cpp index d2cb9e4e4..cfbd012fd 100644 --- a/qmap/mainwindow.cpp +++ b/qmap/mainwindow.cpp @@ -899,6 +899,7 @@ void MainWindow::on_EraseButton_clicked() { ui->decodedTextBrowser->clear(); lab4->clear(); + m_nline=0; } @@ -939,10 +940,19 @@ void MainWindow::guiUpdate() if(m_UTC0!="" and m_UTC0!=t.left(4)) { t1="-"; ui->decodedTextBrowser->append(t1.repeated(56)); + m_nline++; } m_UTC0=t.left(4); - ui->decodedTextBrowser->append(t.trimmed()); + t=t.trimmed(); + ui->decodedTextBrowser->append(t); m_fetched++; + m_nline++; + if(t.mid(36,2)=="30") { + QTextCursor cursor(ui->decodedTextBrowser->document()->findBlockByLineNumber(m_nline-1)); + QTextBlockFormat f = cursor.blockFormat(); + f.setBackground(QBrush(Qt::yellow)); + cursor.setBlockFormat(f); + } } } t1=""; diff --git a/qmap/mainwindow.h b/qmap/mainwindow.h index 3f98604f6..f0437d1a3 100644 --- a/qmap/mainwindow.h +++ b/qmap/mainwindow.h @@ -113,10 +113,10 @@ private: qint32 m_modeQ65; qint32 m_dB; qint32 m_fetched=0; -// qint32 m_hsymStop=371; qint32 m_hsymStop=390; //390*0.15 = 58.5 s qint32 m_nTransmitted=0; qint32 m_nDoubleClicked=0; + qint32 m_nline=0; double m_fAdd; double m_xavg;