Remove JT9+JT65 mode. Remove labNextCall. Tighten up central array of GUI controls.

This commit is contained in:
Joe Taylor 2020-11-16 10:06:10 -05:00
parent 24ed64e5cc
commit df2daf60bd
3 changed files with 127 additions and 263 deletions

View File

@ -601,7 +601,6 @@ 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);
@ -860,9 +859,6 @@ 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"};
@ -1225,8 +1221,6 @@ 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());
@ -2121,8 +2115,6 @@ void MainWindow::keyPressEvent (QKeyEvent * e)
return;
case Qt::Key_Escape:
m_nextCall="";
ui->labNextCall->setStyleSheet("");
ui->labNextCall->setText("");
on_stopTxButton_clicked();
abortQSO();
return;
@ -3469,11 +3461,6 @@ 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 ();
}
@ -4384,8 +4371,6 @@ 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;
@ -4796,11 +4781,9 @@ 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
@ -5032,17 +5015,6 @@ 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;
}
}
@ -5908,7 +5880,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);
@ -5929,7 +5901,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);
@ -6279,58 +6251,14 @@ 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
@ -6482,7 +6410,6 @@ 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);
@ -7067,21 +6994,6 @@ 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;
@ -7560,15 +7472,6 @@ 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);
}
}
}
@ -9273,7 +9176,6 @@ 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 ();

View File

@ -203,7 +203,6 @@ 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,7 +240,6 @@ 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 ();

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>805</width>
<height>589</height>
<height>637</height>
</rect>
</property>
<property name="sizePolicy">
@ -590,7 +590,7 @@
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_5" rowstretch="1,0,0,0">
<layout class="QGridLayout" name="gridLayout_5" rowstretch="1,0,0">
<item row="0" column="2">
<widget class="QLabel" name="labDialFreq">
<property name="sizePolicy">
@ -1219,25 +1219,6 @@ Yellow when too low</string>
</item>
</layout>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="pbTxMode">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Toggle Tx mode</string>
</property>
<property name="text">
<string>Tx JT9 @</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QSpinBox" name="TxFreqSpinBox">
<property name="toolTip">
@ -1263,53 +1244,6 @@ Yellow when too low</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="LettersSpinBox" name="sbSubmode">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Submode determines tone spacing; A is narrowest.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="accessibleDescription">
<string>Submode determines tone spacing; A is narrowest.</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="prefix">
<string>Submode </string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>7</number>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="sbF_High">
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="suffix">
<string/>
</property>
<property name="prefix">
<string>F High </string>
</property>
<property name="minimum">
<number>100</number>
</property>
<property name="maximum">
<number>5000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>1400</number>
</property>
</widget>
</item>
<item row="18" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
@ -1379,44 +1313,6 @@ Yellow when too low</string>
</item>
</layout>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="sbF_Low">
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="prefix">
<string>F Low </string>
</property>
<property name="minimum">
<number>100</number>
</property>
<property name="maximum">
<number>5000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>600</number>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLabel" name="labNextCall">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Double-click on another caller to queue that call for your next QSO.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="accessibleDescription">
<string>Double-click on another caller to queue that call for your next QSO.</string>
</property>
<property name="text">
<string>Next Call</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QSpinBox" name="RxFreqSpinBox">
<property name="toolTip">
@ -1523,60 +1419,6 @@ Not available to nonstandard callsign holders.</string>
</item>
</layout>
</item>
<item row="7" column="1">
<widget class="QSpinBox" name="sbSerialNumber">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="prefix">
<string>Tx# </string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>4095</number>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="cbHoldTxFreq">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Check to keep Tx frequency fixed when double-clicking on decoded text.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="accessibleDescription">
<string>Check to keep Tx frequency fixed when double-clicking on decoded text.</string>
</property>
<property name="text">
<string>Hold Tx Freq</string>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QSpinBox" name="syncSpinBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Synchronizing threshold. Lower numbers accept weaker sync signals.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="accessibleDescription">
<string>Synchronizing threshold. Lower numbers accept weaker sync signals.</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="prefix">
<string>Sync </string>
</property>
<property name="minimum">
<number>-2</number>
</property>
<property name="maximum">
<number>10</number>
</property>
<property name="value">
<number>1</number>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="txFirstCheckBox">
<property name="toolTip">
@ -1704,6 +1546,129 @@ When not checked you can view the calibration results.</string>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="cbHoldTxFreq">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Check to keep Tx frequency fixed when double-clicking on decoded text.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="accessibleDescription">
<string>Check to keep Tx frequency fixed when double-clicking on decoded text.</string>
</property>
<property name="text">
<string>Hold Tx Freq</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="sbF_Low">
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="prefix">
<string>F Low </string>
</property>
<property name="minimum">
<number>100</number>
</property>
<property name="maximum">
<number>5000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>600</number>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="sbF_High">
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="suffix">
<string/>
</property>
<property name="prefix">
<string>F High </string>
</property>
<property name="minimum">
<number>100</number>
</property>
<property name="maximum">
<number>5000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>1400</number>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="sbSerialNumber">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="prefix">
<string>Tx# </string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>4095</number>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="LettersSpinBox" name="sbSubmode">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Submode determines tone spacing; A is narrowest.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="accessibleDescription">
<string>Submode determines tone spacing; A is narrowest.</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="prefix">
<string>Submode </string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>7</number>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QSpinBox" name="syncSpinBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Synchronizing threshold. Lower numbers accept weaker sync signals.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="accessibleDescription">
<string>Synchronizing threshold. Lower numbers accept weaker sync signals.</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="prefix">
<string>Sync </string>
</property>
<property name="minimum">
<number>-2</number>
</property>
<property name="maximum">
<number>10</number>
</property>
<property name="value">
<number>1</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
@ -2892,7 +2857,6 @@ list. The list can be maintained in Settings (F2).</string>
<addaction name="actionFT8"/>
<addaction name="actionJT4"/>
<addaction name="actionJT9"/>
<addaction name="actionJT9_JT65"/>
<addaction name="actionJT65"/>
<addaction name="actionQRA64"/>
<addaction name="actionQ65"/>