From a3410b1e02aaa2d0aa8fe592209444ca1108c1d5 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 13 Oct 2016 18:02:44 +0000 Subject: [PATCH] Display Hot A/B and El in MSK144 mode. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7173 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 42 +++++++++++++++++------------------ mainwindow.ui | 60 ++++++++++++++++++-------------------------------- 2 files changed, 42 insertions(+), 60 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 240f29071..eedcee824 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -659,7 +659,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, } ui->labAz->setStyleSheet("border: 0px;"); - ui->labDist->setStyleSheet("border: 0px;"); +// ui->labDist->setStyleSheet("border: 0px;"); auto t = "UTC dB DT Freq Message"; ui->decodedTextLabel->setText(t); @@ -1672,6 +1672,7 @@ void MainWindow::statusChanged() , tr ("Cannot open \"%1\" for writing: %2") .arg (f.fileName ()).arg (f.errorString ())); } + on_dxGridEntry_textChanged(m_hisGrid); } bool MainWindow::eventFilter (QObject * object, QEvent * event) @@ -3536,7 +3537,7 @@ void MainWindow::genStdMsgs(QString rpt) QString hisCall=ui->dxCallEntry->text(); if(!hisCall.size ()) { ui->labAz->clear (); - ui->labDist->clear (); +// ui->labDist->clear (); ui->tx1->clear (); ui->tx2->clear (); ui->tx3->clear (); @@ -3888,33 +3889,30 @@ void MainWindow::on_dxGridEntry_textChanged (QString const& grid) m_hisGrid = grid; statusUpdate (); } - qint64 nsec = QDateTime::currentMSecsSinceEpoch() % 86400; + qint64 nsec = (QDateTime::currentMSecsSinceEpoch()/1000) % 86400; double utch=nsec/3600.0; int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter; azdist_(const_cast ((m_config.my_grid () + " ").left (6).toLatin1().constData()), const_cast ((m_hisGrid + " ").left (6).toLatin1().constData()),&utch, &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,6,6); QString t; - t.sprintf("Az: %d",nAz); + int nd=nDkm; + if(m_config.miles()) nd=nDmiles; + if(m_mode=="MSK144") { + if(nHotABetter==0)t.sprintf("Az: %d B: %d El: %d %d",nAz,nHotAz,nEl,nd); + if(nHotABetter!=0)t.sprintf("Az: %d A: %d El: %d %d",nAz,nHotAz,nEl,nd); + } else { + t.sprintf("Az: %d %d",nAz,nd); + } + if(m_config.miles()) t += " mi"; + if(!m_config.miles()) t += " km"; ui->labAz->setText (t); - if (m_config.miles ()) - { - t.sprintf ("%d mi", int (0.621371 * nDkm)); - } - else - { - t.sprintf ("%d km", nDkm); - } - ui->labDist->setText(t); - } - else { - if (m_hisGrid.size ()) - { - m_hisGrid.clear (); - ui->labAz->clear (); - ui->labDist->clear (); - statusUpdate (); - } + } else { + if (m_hisGrid.size ()) { + m_hisGrid.clear (); + ui->labAz->clear (); + statusUpdate (); + } } } diff --git a/mainwindow.ui b/mainwindow.ui index 3e8f37f1a..0a6937e7e 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -2080,28 +2080,6 @@ list. The list can be maintained in Settings (F2). - - - - - 0 - 0 - - - - true - - - - - - Qt::AlignCenter - - - 4 - - - @@ -2115,22 +2093,6 @@ list. The list can be maintained in Settings (F2). - - - - - 0 - 0 - - - - - - - Qt::AlignCenter - - - @@ -2164,6 +2126,28 @@ list. The list can be maintained in Settings (F2). + + + + + 0 + 0 + + + + true + + + + + + Qt::AlignCenter + + + 4 + + +