From 48312bc6204bfbc5461417c20338c276e4e64fca Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 18 Mar 2022 14:18:49 -0400 Subject: [PATCH] Moew work on ActiveStations window features. --- widgets/mainwindow.cpp | 48 ++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index f9a04b192..aff96c031 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3398,7 +3398,18 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) m_activeCall[deCall]=ac; } } - +/* +// Don't display stations we already worked on this band. + QString band=m_config.bands()->find(m_freqNominal); + qDebug() << "aa" << band; + if(band=="160m" and m_activeCall[deCall].bands.indexOf("a")>=0) return; + if(band=="80m" and m_activeCall[deCall].bands.indexOf("b")>=0) return; + if(band=="40m" and m_activeCall[deCall].bands.indexOf("c")>=0) return; + if(band=="20m" and m_activeCall[deCall].bands.indexOf("d")>=0) return; + if(band=="15m" and m_activeCall[deCall].bands.indexOf("e")>=0) return; + if(band=="10m" and m_activeCall[deCall].bands.indexOf("f")>=0) return; + if(band=="6m" and m_activeCall[deCall].bands.indexOf("g")>=0) return; +*/ if(m_activeCall.contains(deCall)) { // Update the variable data for this deCall rc.dialFreq=m_freqNominal; @@ -3477,12 +3488,13 @@ void MainWindow::callSandP2(int n) { if(m_ready2call[n]=="") return; QStringList w=m_ready2call[n].split(' ', SkipEmptyParts); - m_deCall=w[0]; //### needed? - m_deGrid=w[1]; //### needed? + m_deCall=w[0]; + m_deGrid=w[1]; m_bDoubleClicked=true; //### needed? ui->dxCallEntry->setText(m_deCall); ui->dxGridEntry->setText(m_deGrid); - genStdMsgs("-10"); //### real SNR would be better here? + genStdMsgs(w[3]); //### real SNR would be better here? + ui->RxFreqSpinBox->setValue(w[4].toInt()); setTxMsg(1); m_txFirst = (w[2]=="0"); ui->txFirstCheckBox->setChecked(m_txFirst); @@ -3490,6 +3502,20 @@ void MainWindow::callSandP2(int n) if(m_transmitting) m_restart=true; } +void MainWindow::activeWorked(QString call, QString band) +{ + QString bands=m_activeCall[call].bands; + QByteArray ba=bands.toLatin1(); + if(band=="160m") ba[0]='a'; + if(band=="80m") ba[1]='b'; + if(band=="40m") ba[2]='c'; + if(band=="20m") ba[3]='d'; + if(band=="15m") ba[4]='e'; + if(band=="10m") ba[5]='f'; + if(band=="6m") ba[6]='g'; + m_activeCall[call].bands=QString::fromLatin1(ba); +} + void MainWindow::readFromStdout() //readFromStdout { while(proc_jt9.canReadLine()) { @@ -6212,20 +6238,6 @@ void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call, if (m_config.clear_DXgrid ()) ui->dxGridEntry->clear (); } -void MainWindow::activeWorked(QString call, QString band) -{ - QString bands=m_activeCall[call].bands; - QByteArray ba=bands.toLatin1(); - if(band=="160m") ba[0]='a'; - if(band=="80m") ba[1]='b'; - if(band=="40m") ba[2]='c'; - if(band=="20m") ba[3]='d'; - if(band=="15m") ba[4]='e'; - if(band=="10m") ba[5]='f'; - if(band=="6m") ba[6]='g'; - m_activeCall[call].bands=QString::fromLatin1(ba); -} - qint64 MainWindow::nWidgets(QString t) { Q_ASSERT(t.length()==N_WIDGETS);