diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index a6b3c4d7f..9bbf05885 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -1228,6 +1228,10 @@ void MainWindow::writeSettings() m_settings->setValue("SubMode",ui->sbSubmode->value()); m_settings->setValue("TRPeriod", ui->sbTR->value()); } + if(m_mode=="MSK144") m_settings->setValue("ShMsgs_MSK144",m_bShMsgs); + if(m_mode=="Q65") m_settings->setValue("ShMsgs_Q65",m_bShMsgs); + if(m_mode=="JT65") m_settings->setValue("ShMsgs_JT65",m_bShMsgs); + if(m_mode=="JT4") m_settings->setValue("ShMsgs_JT4",m_bShMsgs); m_settings->beginGroup("Common"); m_settings->setValue("Mode",m_mode); @@ -1247,7 +1251,7 @@ void MainWindow::writeSettings() m_settings->setValue("MinSync",m_minSync); m_settings->setValue ("AutoSeq", ui->cbAutoSeq->isChecked ()); m_settings->setValue ("RxAll", ui->cbRxAll->isChecked ()); - m_settings->setValue("ShMsgs",m_bShMsgs); +// m_settings->setValue("ShMsgs",m_bShMsgs); m_settings->setValue("SWL",ui->cbSWL->isChecked()); m_settings->setValue ("DialFreq", QVariant::fromValue(m_lastMonitoredFrequency)); m_settings->setValue("OutAttenuation", ui->outAttenuation->value ()); @@ -1370,6 +1374,10 @@ void MainWindow::readSettings() if (m_currentBand=="6m" or m_currentBand=="4m") ui->sbTR->setValue (m_settings->value ("TRPeriod_MSK144_6m", 15).toInt()); if (m_currentBand=="2m") ui->sbTR->setValue (m_settings->value ("TRPeriod_MSK144_2m", 30).toInt()); } + if (m_mode=="MSK144") m_bShMsgs=m_settings->value("ShMsgs_MSK144",false).toBool(); + if (m_mode=="Q65") m_bShMsgs=m_settings->value("ShMsgs_Q65",false).toBool(); + if (m_mode=="JT65") m_bShMsgs=m_settings->value("ShMsgs_JT65",false).toBool(); + if (m_mode=="JT4") m_bShMsgs=m_settings->value("ShMsgs_JT4",false).toBool(); m_settings->beginGroup("Common"); ui->labDXped->setText(m_settings->value("labDXpedText",QString {}).toString ()); @@ -1393,7 +1401,7 @@ void MainWindow::readSettings() ui->syncSpinBox->setValue(m_minSync); ui->cbAutoSeq->setChecked (m_settings->value ("AutoSeq", false).toBool()); ui->cbRxAll->setChecked (m_settings->value ("RxAll", false).toBool()); - m_bShMsgs=m_settings->value("ShMsgs",false).toBool(); +// m_bShMsgs=m_settings->value("ShMsgs",false).toBool(); m_bSWL=m_settings->value("SWL",false).toBool(); m_bFast9=m_settings->value("Fast9",false).toBool(); m_bFastMode=m_settings->value("FastMode",false).toBool(); @@ -7204,6 +7212,8 @@ void MainWindow::on_actionJT4_triggered() m_nSubMode=m_settings->value("SubMode_JT4",0).toInt(); ui->sbSubmode->setValue(m_settings->value("SubMode_JT4",0).toInt()); QTimer::singleShot (50, [=] {on_sbSubmode_valueChanged(ui->sbSubmode->value());}); + m_bShMsgs=m_settings->value("ShMsgs_JT4",false).toBool(); + ui->cbShMsgs->setChecked(m_bShMsgs); } else { ui->sbSubmode->setValue(0); } @@ -7228,6 +7238,8 @@ void MainWindow::on_actionJT9_triggered() // restore last used parameters if(bVHF && m_mode!="JT65" && !blocked) { ui->sbSubmode->setMaximum(7); + m_bFast9=m_settings->value("JT9_Fast",false).toBool(); + ui->cbFast9->setChecked(m_bFast9 or m_bFastMode); ui->sbFtol->setValue (m_settings->value ("Ftol_JT9", 50).toInt()); m_nSubMode=m_settings->value("SubMode",0).toInt(); ui->sbSubmode->setValue(m_nSubMode); @@ -7236,7 +7248,7 @@ void MainWindow::on_actionJT9_triggered() on_sbSubmode_valueChanged(ui->sbSubmode->value()); }); } - m_bFast9=ui->cbFast9->isChecked(); +// m_bFast9=ui->cbFast9->isChecked(); m_bFastMode=m_bFast9; WSPR_config(false); switch_mode (Modes::JT9); @@ -7333,6 +7345,8 @@ void MainWindow::on_actionJT65_triggered() m_nSubMode=m_settings->value("SubMode_JT65",0).toInt(); ui->sbSubmode->setValue(m_settings->value("SubMode_JT65",0).toInt()); QTimer::singleShot (50, [=] {on_sbSubmode_valueChanged(ui->sbSubmode->value());}); + m_bShMsgs=m_settings->value("ShMsgs_JT65",false).toBool(); + ui->cbShMsgs->setChecked(m_bShMsgs); } else { ui->sbSubmode->setValue(0); ui->lh_decodes_title_label->setText(tr ("Band Activity")); @@ -7385,6 +7399,8 @@ void MainWindow::on_actionQ65_triggered() on_sbTR_valueChanged (ui->sbTR->value()); on_sbSubmode_valueChanged(ui->sbSubmode->value()); }); + m_bShMsgs=m_settings->value("ShMsgs_Q65",false).toBool(); + ui->cbShMsgs->setChecked(m_bShMsgs); QString fname {QDir::toNativeSeparators(m_config.temp_dir().absoluteFilePath ("red.dat"))}; m_wideGraph->setRedFile(fname); m_wideGraph->setMode(m_mode); @@ -7465,6 +7481,8 @@ void MainWindow::on_actionMSK144_triggered() ui->sbTR->values ({5, 10, 15, 30}); ui->sbTR->setValue (m_settings->value ("TRPeriod_MSK144", 15).toInt()); // restore last used TRperiod QTimer::singleShot (50, [=] {on_sbTR_valueChanged (ui->sbTR->value());}); + m_bShMsgs=m_settings->value("ShMsgs_MSK144",false).toBool(); + ui->cbShMsgs->setChecked(m_bShMsgs); m_wideGraph->hide(); m_fastGraph->showNormal(); ui->TxFreqSpinBox->setValue(1500); @@ -8714,7 +8732,7 @@ void MainWindow::on_sbSubmode_valueChanged(int n) ui->sbTR->setVisible(false); m_TRperiod=60.0; } else { - ui->cbFast9->setEnabled(true); + if(!blocked) ui->cbFast9->setEnabled(true); } ui->sbTR->setVisible(m_bFast9); if(m_bFast9) ui->TxFreqSpinBox->setValue(700); @@ -8739,6 +8757,9 @@ void MainWindow::on_cbFast9_clicked(bool b) blocked=true; // needed to prevent a loop on_actionJT9_triggered(); QTimer::singleShot (50, [=] {blocked = false;}); // needed to prevent a loop + QTimer::singleShot (200, [=] { + if(m_mode=="JT9") m_settings->setValue("JT9_Fast",m_bFast9); + }); } if(b) { @@ -8770,6 +8791,12 @@ void MainWindow::on_cbShMsgs_toggled(bool b) if(ntx==4) ui->txrb4->setChecked(true); if(ntx==5) ui->txrb5->setChecked(true); if(ntx==6) ui->txrb6->setChecked(true); + QTimer::singleShot (200, [=] { + if(m_mode=="MSK144") m_settings->setValue("ShMsgs_MSK144",m_bShMsgs); + if(m_mode=="Q65") m_settings->setValue("ShMsgs_Q65",m_bShMsgs); + if(m_mode=="JT65") m_settings->setValue("ShMsgs_JT65",m_bShMsgs); + if(m_mode=="JT4") m_settings->setValue("ShMsgs_JT4",m_bShMsgs); + }); } void MainWindow::on_cbSWL_toggled(bool b)