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
This commit is contained in:
Joe Taylor 2017-12-14 16:50:46 +00:00
parent 433eb45e86
commit 516aef2e99
2 changed files with 35 additions and 3 deletions

View File

@ -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()) {

View File

@ -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
{