diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index cba367735..265d1e4f5 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -601,6 +601,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, ui->actionFT8->setActionGroup(modeGroup); ui->actionJT9->setActionGroup(modeGroup); ui->actionJT65->setActionGroup(modeGroup); + ui->actionJT9_JT65->setActionGroup(modeGroup); ui->actionJT4->setActionGroup(modeGroup); ui->actionWSPR->setActionGroup(modeGroup); ui->actionEcho->setActionGroup(modeGroup); @@ -859,6 +860,9 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, m_msg[0][0]=0; ui->labDXped->setVisible(false); ui->labDXped->setStyleSheet("QLabel {background-color: red; color: white;}"); + ui->labNextCall->setText(""); + ui->labNextCall->setVisible(false); + ui->labNextCall->setToolTip(""); //### Possibly temporary ? ### char const * const power[] = {"1 mW","2 mW","5 mW","10 mW","20 mW","50 mW","100 mW","200 mW","500 mW", "1 W","2 W","5 W","10 W","20 W","50 W","100 W","200 W","500 W","1 kW"}; @@ -1221,6 +1225,8 @@ void MainWindow::readSettings() m_settings->beginGroup("Common"); m_mode=m_settings->value("Mode","JT9").toString(); m_modeTx=m_settings->value("ModeTx","JT9").toString(); + if(m_modeTx.mid(0,3)=="JT9") ui->pbTxMode->setText("Tx JT9 @"); + if(m_modeTx=="JT65") ui->pbTxMode->setText("Tx JT65 #"); ui->actionNone->setChecked(m_settings->value("SaveNone",true).toBool()); ui->actionSave_decoded->setChecked(m_settings->value("SaveDecoded",false).toBool()); ui->actionSave_all->setChecked(m_settings->value("SaveAll",false).toBool()); @@ -2115,6 +2121,8 @@ void MainWindow::keyPressEvent (QKeyEvent * e) return; case Qt::Key_Escape: m_nextCall=""; + ui->labNextCall->setStyleSheet(""); + ui->labNextCall->setText(""); on_stopTxButton_clicked(); abortQSO(); return; @@ -3466,6 +3474,11 @@ void MainWindow::readFromStdout() //readFromStdout ui->decodedTextBrowser2->displayDecodedText(decodedtext0,m_baseCall,m_mode,m_config.DXCC(), m_logBook,m_currentBand,m_config.ppfx()); } + if(m_mode!="JT4") { + bool b65=decodedtext.isJT65(); + if(b65 and m_modeTx!="JT65") on_pbTxMode_clicked(); + if(!b65 and m_modeTx=="JT65") on_pbTxMode_clicked(); + } m_QSOText = decodedtext.string ().trimmed (); } @@ -4376,6 +4389,8 @@ void MainWindow::useNextCall() { ui->dxCallEntry->setText(m_nextCall); m_nextCall=""; + ui->labNextCall->setStyleSheet(""); + ui->labNextCall->setText(""); if(m_nextGrid.contains(grid_regexp)) { ui->dxGridEntry->setText(m_nextGrid); m_ntx=2; @@ -4787,9 +4802,11 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie if (message.isJT9()) { m_modeTx="JT9"; + ui->pbTxMode->setText("Tx JT9 @"); m_wideGraph->setModeTx(m_modeTx); } else if (message.isJT65()) { m_modeTx="JT65"; + ui->pbTxMode->setText("Tx JT65 #"); m_wideGraph->setModeTx(m_modeTx); } } else if ((message.isJT9 () and m_modeTx != "JT9" and m_mode != "JT4") or @@ -5021,6 +5038,17 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie } } else { // nothing for us +// if(message_words.size () > 3 // enough fields for a normal message +// && SpecOp::RTTY == m_config.special_op_id() +// && (message_words.at(1).contains(m_baseCall) || "DE" == message_words.at(1)) +// && (!message_words.at(2).contains(qso_partner_base_call) and !bEU_VHF_w2)) { +//// Queue up the next QSO partner +// m_nextCall=message_words.at(2); +// m_nextGrid=message_words.at(3); +// m_nextRpt=message.report(); +// ui->labNextCall->setText("Next: " + m_nextCall); +// ui->labNextCall->setStyleSheet("QLabel {color: #000000; background-color: #66ff66}"); +// } return; } } @@ -5886,7 +5914,7 @@ void MainWindow::displayWidgets(qint64 n) if(i==8) ui->cbFast9->setVisible(b); if(i==9) ui->cbAutoSeq->setVisible(b); if(i==10) ui->cbTx6->setVisible(b); -// if(i==11) ui->pbTxMode->setVisible(b); + if(i==11) ui->pbTxMode->setVisible(b); if(i==12) ui->pbR2T->setVisible(b); if(i==13) ui->pbT2R->setVisible(b); if(i==14) ui->cbHoldTxFreq->setVisible(b); @@ -5907,7 +5935,7 @@ void MainWindow::displayWidgets(qint64 n) if(i==25) ui->actionEnable_AP_JT65->setVisible (b); if(i==26) ui->actionEnable_AP_DXcall->setVisible (b); if(i==27) ui->cbFirst->setVisible(b); -// if(i==28) ui->labNextCall->setVisible(b); + if(i==28) ui->labNextCall->setVisible(b); if(i==29) ui->measure_check_box->setVisible(b); if(i==30) ui->labDXped->setVisible(b); if(i==31) ui->cbRxAll->setVisible(b); @@ -6257,14 +6285,58 @@ void MainWindow::on_actionJT9_triggered() statusChanged(); } +void MainWindow::on_actionJT9_JT65_triggered() +{ + m_mode="JT9+JT65"; + WSPR_config(false); + switch_mode (Modes::JT65); + if(m_modeTx != "JT65") { + ui->pbTxMode->setText("Tx JT9 @"); + m_modeTx="JT9"; + } + m_nSubMode=0; //Dual-mode always means JT9 and JT65A + m_TRperiod=60.0; + m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe + m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe + m_nsps=6912; + m_FFTSize = m_nsps / 2; + Q_EMIT FFTSize (m_FFTSize); + m_hsymStop=174; + if(m_config.decode_at_52s()) m_hsymStop=183; + m_toneSpacing=0.0; + setup_status_bar (false); + ui->actionJT9_JT65->setChecked(true); + VHF_features_enabled(false); + m_wideGraph->setPeriod(m_TRperiod,m_nsps); + m_wideGraph->setMode(m_mode); + m_wideGraph->setModeTx(m_modeTx); + m_bFastMode=false; + m_bFast9=false; + ui->sbSubmode->setValue(0); + ui->lh_decodes_title_label->setText(tr ("Band Activity")); + ui->rh_decodes_title_label->setText(tr ("Rx Frequency")); + ui->lh_decodes_headings_label->setText("UTC dB DT Freq " + tr ("Message")); + ui->rh_decodes_headings_label->setText("UTC dB DT Freq " + tr ("Message")); + displayWidgets(nWidgets("111010000001111000010000000000001000")); + fast_config(false); + statusChanged(); +} + void MainWindow::on_actionJT65_triggered() { + if(m_mode=="JT4" or m_mode=="WSPR" or m_mode=="FST4W") { +// If coming from JT4, WSPR, or FST4W mode, pretend temporarily that we're coming +// from JT9 and click the pbTxMode button + m_modeTx="JT9"; + on_pbTxMode_clicked(); + } on_actionJT9_triggered(); m_mode="JT65"; m_modeTx="JT65"; bool bVHF=m_config.enable_VHF_features(); WSPR_config(false); switch_mode (Modes::JT65); + if(m_modeTx!="JT65") on_pbTxMode_clicked(); m_TRperiod=60.0; m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe @@ -6416,6 +6488,7 @@ void MainWindow::on_actionMSK144_triggered() if("JT4"==m_mode) ui->actionJT4->setChecked(true); if("JT9"==m_mode) ui->actionJT9->setChecked(true); if("JT65"==m_mode) ui->actionJT65->setChecked(true); + if("JT9_JT65"==m_mode) ui->actionJT9_JT65->setChecked(true); if("ISCAT"==m_mode) ui->actionISCAT->setChecked(true); if("QRA64"==m_mode) ui->actionQRA64->setChecked(true); if("Q65"==m_mode) ui->actionQ65->setChecked(true); @@ -7000,6 +7073,21 @@ void MainWindow::on_readFreq_clicked() } } +void MainWindow::on_pbTxMode_clicked() +{ + if(m_mode=="JT9+JT65") { + if(m_modeTx=="JT9") { + m_modeTx="JT65"; + ui->pbTxMode->setText("Tx JT65 #"); + } else { + m_modeTx="JT9"; + ui->pbTxMode->setText("Tx JT9 @"); + } + m_wideGraph->setModeTx(m_modeTx); + statusChanged(); + } +} + void MainWindow::setXIT(int n, Frequency base) { if (m_transmitting && !m_config.tx_QSY_allowed ()) return; @@ -7478,6 +7566,15 @@ void MainWindow::transmitDisplay (bool transmitting) // the following are always disallowed in transmit ui->menuMode->setEnabled (!transmitting); + //ui->bandComboBox->setEnabled (!transmitting); + if (!transmitting) { + if (m_mode == "JT9+JT65") { + // allow mode switch in Rx when in dual mode + ui->pbTxMode->setEnabled (true); + } + } else { + ui->pbTxMode->setEnabled (false); + } } } @@ -9182,6 +9279,7 @@ void MainWindow::set_mode (QString const& mode) else if ("FT8" == mode) on_actionFT8_triggered (); else if ("JT4" == mode) on_actionJT4_triggered (); else if ("JT9" == mode) on_actionJT9_triggered (); + else if ("JT9+JT65" == mode) on_actionJT9_JT65_triggered (); else if ("JT65" == mode) on_actionJT65_triggered (); else if ("QRA64" == mode) on_actionQRA64_triggered (); else if ("Q65" == mode) on_actionQ65_triggered (); diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 4ab9a4102..3f3fad372 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -204,6 +204,7 @@ private slots: void on_logQSOButton_clicked(); void on_actionJT9_triggered(); void on_actionJT65_triggered(); + void on_actionJT9_JT65_triggered(); void on_actionJT4_triggered(); void on_actionFT4_triggered(); void on_actionFT8_triggered(); @@ -241,6 +242,7 @@ private slots: void on_bandComboBox_editTextChanged (QString const& text); void on_bandComboBox_activated (int index); void on_readFreq_clicked(); + void on_pbTxMode_clicked(); void on_RxFreqSpinBox_valueChanged(int n); void on_outAttenuation_valueChanged (int); void rigOpen (); diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index 51dc92757..b42410cd7 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -7,7 +7,7 @@ 0 0 805 - 584 + 589 @@ -596,7 +596,7 @@ - + @@ -1225,6 +1225,25 @@ Yellow when too low + + + + true + + + + 0 + 0 + + + + Toggle Tx mode + + + Tx JT9 @ + + + @@ -1250,6 +1269,53 @@ Yellow when too low + + + + <html><head/><body><p>Submode determines tone spacing; A is narrowest.</p></body></html> + + + Submode determines tone spacing; A is narrowest. + + + Qt::AlignCenter + + + Submode + + + 0 + + + 7 + + + + + + + Qt::AlignCenter + + + + + + F High + + + 100 + + + 5000 + + + 100 + + + 1400 + + + @@ -1319,6 +1385,44 @@ Yellow when too low + + + + Qt::AlignCenter + + + F Low + + + 100 + + + 5000 + + + 100 + + + 600 + + + + + + + <html><head/><body><p>Double-click on another caller to queue that call for your next QSO.</p></body></html> + + + Double-click on another caller to queue that call for your next QSO. + + + Next Call + + + Qt::AlignCenter + + + @@ -1425,6 +1529,60 @@ Not available to nonstandard callsign holders. + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Tx# + + + 1 + + + 4095 + + + + + + + <html><head/><body><p>Check to keep Tx frequency fixed when double-clicking on decoded text.</p></body></html> + + + Check to keep Tx frequency fixed when double-clicking on decoded text. + + + Hold Tx Freq + + + + + + + <html><head/><body><p>Synchronizing threshold. Lower numbers accept weaker sync signals.</p></body></html> + + + Synchronizing threshold. Lower numbers accept weaker sync signals. + + + Qt::AlignCenter + + + Sync + + + -2 + + + 10 + + + 1 + + + @@ -1552,129 +1710,6 @@ When not checked you can view the calibration results. - - - - <html><head/><body><p>Check to keep Tx frequency fixed when double-clicking on decoded text.</p></body></html> - - - Check to keep Tx frequency fixed when double-clicking on decoded text. - - - Hold Tx Freq - - - - - - - Qt::AlignCenter - - - F Low - - - 100 - - - 5000 - - - 100 - - - 600 - - - - - - - Qt::AlignCenter - - - - - - F High - - - 100 - - - 5000 - - - 100 - - - 1400 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Tx# - - - 1 - - - 4095 - - - - - - - <html><head/><body><p>Submode determines tone spacing; A is narrowest.</p></body></html> - - - Submode determines tone spacing; A is narrowest. - - - Qt::AlignCenter - - - Submode - - - 0 - - - 7 - - - - - - - <html><head/><body><p>Synchronizing threshold. Lower numbers accept weaker sync signals.</p></body></html> - - - Synchronizing threshold. Lower numbers accept weaker sync signals. - - - Qt::AlignCenter - - - Sync - - - -2 - - - 10 - - - 1 - - - @@ -2864,6 +2899,7 @@ list. The list can be maintained in Settings (F2). +