From 516aef2e99d89efe86beeae2b34548a21df23303 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 14 Dec 2017 16:50:46 +0000 Subject: [PATCH] Enforce proper GUI settings for Fox and Hound; restore for "normal" operation. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8331 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 36 ++++++++++++++++++++++++++++++++++-- mainwindow.h | 2 +- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 14ebc4c15..2c2ee9f57 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -899,10 +899,8 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, splashTimer.setSingleShot (true); splashTimer.start (20 * 1000); - m_bDXped=false; if(m_config.my_callsign()=="K1JT" or m_config.my_callsign()=="K9AN" or m_config.my_callsign()=="G4WJS" || m_config.my_callsign () == "W9XYZ") { - m_bDXped=true; ui->actionWSPR_LF->setEnabled(true); } else { QString errorMsg; @@ -3504,6 +3502,40 @@ void MainWindow::guiUpdate() ui->labDXped->setText(t); } + int nDXped=0; + if(m_config.bFox()) nDXped=1; + if(m_config.bHound()) nDXped=2; + if(nDXped != m_nDXped) { +//DXped mode has changed, force GUI controls approprtately + if(nDXped==0) { + ui->txFirstCheckBox->setEnabled(true); + ui->cbAutoSeq->setEnabled(true); + ui->cbFirst->setVisible(true); + } + if(nDXped==1) { +//Fox + ui->txFirstCheckBox->setChecked(true); + ui->txFirstCheckBox->setEnabled(false); + ui->cbAutoSeq->setChecked(true); + ui->cbAutoSeq->setEnabled(false); + ui->tabWidget->setCurrentIndex(2); + ui->cbHoldTxFreq->setChecked(true); + ui->cbFirst->setChecked(false); + ui->cbFirst->setVisible(false); + } + if(nDXped==2) { +//Hound + ui->txFirstCheckBox->setChecked(true); + ui->txFirstCheckBox->setEnabled(false); + ui->cbAutoSeq->setChecked(true); + ui->cbAutoSeq->setEnabled(false); + ui->tabWidget->setCurrentIndex(0); + ui->cbFirst->setChecked(false); + ui->cbFirst->setVisible(false); + } + m_nDXped=nDXped; + } + //Once per second: if(nsec != m_sec0) { if(m_freqNominal!=0 and m_freqNominal<50000000 and m_config.enable_VHF_features()) { diff --git a/mainwindow.h b/mainwindow.h index 159c57ca4..8f214f407 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -417,6 +417,7 @@ private: qint32 m_i3bit; qint32 m_isort; qint32 m_max_dB; + qint32 m_nDXped=0; qint32 m_nSortedHounds=0; qint32 m_nHoundsCalling=0; qint32 m_Nlist=12; @@ -476,7 +477,6 @@ private: bool m_bCallingCQ; bool m_bAutoReply; bool m_bCheckedContest; - bool m_bDXped; enum {