diff options
| author | Dave Hibberd <hibby@debian.org> | 2024-04-27 12:26:26 +0100 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2024-04-27 12:26:26 +0100 |
| commit | 93f7198f9c2864ef9630cc0cc9e46d6cc1933aa9 (patch) | |
| tree | 74e80fba0ae76af8a4f9d5d1b6c8c8de8e383480 /widgets/activeStations.cpp | |
| parent | ffea9660ba79a513401639a2f5d90e2fdc190fb8 (diff) | |
New upstream version 2.7.0~rc4+repackupstream/2.7.0_rc4+repack
Diffstat (limited to 'widgets/activeStations.cpp')
| -rwxr-xr-x | widgets/activeStations.cpp | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/widgets/activeStations.cpp b/widgets/activeStations.cpp index e97cebf0..a2f30b2f 100755 --- a/widgets/activeStations.cpp +++ b/widgets/activeStations.cpp @@ -47,7 +47,7 @@ void ActiveStations::read_settings () ui->sbMaxRecent->setValue(settings_->value("MaxRecent",10).toInt());
ui->sbMaxAge->setValue(settings_->value("MaxAge",10).toInt());
ui->cbReadyOnly->setChecked(settings_->value("ReadyOnly",false).toBool());
- ui->cbWantedOnly->setChecked(settings_->value("WantedOnly",false).toBool());
+ ui->cbWantedOnly->setChecked(settings_->value("# WantedOnly",false).toBool());
}
void ActiveStations::write_settings ()
@@ -64,11 +64,11 @@ void ActiveStations::displayRecentStations(QString mode, QString const& t) {
if(mode!=m_mode) {
m_mode=mode;
- ui->cbReadyOnly->setText("Ready only");
+ ui->cbReadyOnly->setText(" Ready only");
if(m_mode=="Q65") {
- ui->header_label2->setText(" N Frx Fsked S/N Call Grid Tx Age");
+ ui->header_label2->setText(" N Frx Fsked S/N Q65 Call Grid Tx Age");
ui->label->setText("QSOs:");
- ui->cbReadyOnly->setText("CQ only");
+ ui->cbReadyOnly->setText("* CQ only");
} else if(m_mode=="Q65-pileup") {
ui->header_label2->setText(" N Freq Call Grid El Age(h)");
} else {
@@ -92,6 +92,32 @@ void ActiveStations::displayRecentStations(QString mode, QString const& t) bool bClickOK=m_clickOK;
m_clickOK=false;
ui->RecentStationsPlainTextEdit->setPlainText(t);
+
+//White background for Q65-60x decodes, yellow for Q65-30x:
+ int i0=0;
+ int i1=0;
+ int npos=0;
+ int nlines=t.count("\n");
+ QTextCursor cursor=ui->RecentStationsPlainTextEdit->textCursor();
+ QTextCharFormat fmt;
+ for(int i=0; i<nlines; i++) {
+ i1=t.indexOf("\n",i0);
+ npos=t.indexOf(QRegularExpression(" 30[ABCD] "), i0);
+ if(npos>0) {
+ cursor.setPosition(npos);
+ cursor.select(QTextCursor::LineUnderCursor);
+ fmt.setBackground(QBrush(Qt::yellow));
+ fmt.setForeground(QBrush(Qt::black));
+ } else {
+ cursor.setPosition(i0+10);
+ cursor.select(QTextCursor::LineUnderCursor);
+ fmt.clearForeground();
+ fmt.clearBackground();
+ }
+ cursor.setCharFormat(fmt);
+ i0=i1+1;
+ }
+
m_clickOK=bClickOK;
}
|
