Add 'Call First' and 'Weak' checkboxes.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7824 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2017-07-09 19:25:28 +00:00
parent fffeb17ec0
commit b27c269647
3 changed files with 137 additions and 80 deletions

View File

@ -855,6 +855,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
m_bNoMoreFiles=false;
m_bVHFwarned=false;
m_bDoubleClicked=false;
m_bCallingCQ=false;
m_wait=0;
if(m_mode.startsWith ("WSPR") and m_pctx>0) {
@ -882,11 +883,9 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
splashTimer.setSingleShot (true);
splashTimer.start (20 * 1000);
// ui->actionFT8->setEnabled(false);
if(m_config.my_callsign()=="K1JT" or m_config.my_callsign()=="K9AN" or
m_config.my_callsign()=="G4WJS" || m_config.my_callsign () == "G3PQA") {
ui->actionWSPR_LF->setEnabled(true);
// ui->actionFT8->setEnabled(true);
}
if(!ui->cbMenus->isChecked()) {
ui->cbMenus->setChecked(true);
@ -957,6 +956,8 @@ void MainWindow::writeSettings()
m_settings->setValue ("MsgAvgDisplayed", m_msgAvgWidget && m_msgAvgWidget->isVisible());
m_settings->setValue ("FreeText", ui->freeTextMsg->currentText ());
m_settings->setValue("ShowMenus",ui->cbMenus->isChecked());
m_settings->setValue("CallFirst",ui->cbFirst->isChecked());
m_settings->setValue("CallWeak",ui->cbWeak->isChecked());
m_settings->endGroup();
m_settings->beginGroup("Common");
@ -1021,6 +1022,8 @@ void MainWindow::readSettings()
if (m_settings->contains ("FreeText")) ui->freeTextMsg->setCurrentText (
m_settings->value ("FreeText").toString ());
ui->cbMenus->setChecked(m_settings->value("ShowMenus",true).toBool());
ui->cbFirst->setChecked(m_settings->value("CallFirst",true).toBool());
ui->cbWeak->setChecked(m_settings->value("CallWeak",true).toBool());
m_settings->endGroup();
// do this outside of settings group because it uses groups internally
@ -2722,9 +2725,20 @@ void MainWindow::readFromStdout() //readFromStdout
//Right (Rx Frequency) window
bool bDisplayRight=bAvgMsg;
int audioFreq=decodedtext.frequencyOffset();
if(m_mode=="FT8") audioFreq=decodedtext.string().mid(16,4).toInt();
if(!m_config.enable_VHF_features() and
(abs(audioFreq - m_wideGraph->rxFreq()) <= 10)) bDisplayRight=true;
if(m_mode=="FT8") {
audioFreq=decodedtext.string().mid(16,4).toInt();
int i1=decodedtext.string().indexOf(" "+m_baseCall+" ");
m_bCallingCQ=true;
if(m_bCallingCQ and i1>0 and ui->cbFirst->isChecked()) {
// int snr=decodedtext.string().mid(6,4).toInt();
m_bDoubleClicked=true;
processMessage(decodedtext.string(),43,false);
m_bCallingCQ=false;
}
}
if (bDisplayRight) {
// This msg is within 10 hertz of our tuned frequency, or a JT4 or JT65 avg
ui->decodedTextBrowser2->displayDecodedText(decodedtext,m_baseCall,false,
@ -3049,7 +3063,8 @@ void MainWindow::guiUpdate()
len1, len1);
if(m_modeTx=="WSPR-LF") genwspr_fsk8_(message, msgsent, const_cast<int *> (itone),
len1, len1);
if(m_modeTx=="FT8") genft8_(message, msgsent, const_cast<char *> (ft8msgbits), const_cast<int *> (itone), len1, len1);
if(m_modeTx=="FT8") genft8_(message, msgsent, const_cast<char *> (ft8msgbits),
const_cast<int *> (itone), len1, len1);
if(m_modeTx=="MSK144") {
bool bcontest=m_config.contestMode();
char MyGrid[6];
@ -3067,6 +3082,7 @@ void MainWindow::guiUpdate()
}
m_currentMessage = QString::fromLatin1(msgsent);
if(m_mode=="FT8") m_bCallingCQ=m_currentMessage.mid(0,3)=="CQ ";
if (m_tune) {
m_currentMessage = "TUNE";
m_currentMessageType = -1;
@ -3494,10 +3510,7 @@ void MainWindow::doubleClickOnCall(bool shift, bool ctrl)
QString messages;
if(!m_decodedText2) messages= ui->decodedTextBrowser2->toPlainText();
if(m_decodedText2) messages= ui->decodedTextBrowser->toPlainText();
if(ui->cbCQTx->isEnabled () && ui->cbCQTx->isEnabled () && ui->cbCQTx->isChecked())
{
m_bDoubleClickAfterCQnnn=true;
}
if(ui->cbCQTx->isEnabled() && ui->cbCQTx->isChecked()) m_bDoubleClickAfterCQnnn=true;
m_bDoubleClicked=true;
processMessage(messages, position, ctrl);
}
@ -4293,6 +4306,14 @@ void MainWindow::displayWidgets(int n)
}
j=j>>1;
}
if(m_config.my_callsign()=="K1JT" or m_config.my_callsign()=="K9AN" or
m_config.my_callsign()=="G4WJS" || m_config.my_callsign () == "KI7MT") {
ui->actionWSPR_LF->setEnabled(true);
b=m_mode=="FT8";
ui->cbFirst->setVisible(b);
ui->cbWeak->setVisible(b);
ui->cbWeak->setEnabled(false);
}
}
void MainWindow::on_actionFT8_triggered()
@ -6434,6 +6455,16 @@ void MainWindow::on_cbMenus_toggled(bool b)
hideMenus(!b);
}
void MainWindow::on_cbFirst_toggled(bool b)
{
if(b) ui->cbWeak->setChecked(!b);
}
void MainWindow::on_cbWeak_toggled(bool b)
{
if(b) ui->cbFirst->setChecked(!b);
}
void MainWindow::write_transmit_entry (QString const& file_name)
{
QFile f {m_config.writeable_data_dir ().absoluteFilePath (file_name)};

View File

@ -238,6 +238,8 @@ private slots:
void on_cbSWL_toggled(bool b);
void on_cbTx6_toggled(bool b);
void on_cbMenus_toggled(bool b);
void on_cbFirst_toggled(bool b);
void on_cbWeak_toggled(bool b);
void networkError (QString const&);
void on_ClrAvgButton_clicked();
void on_actionWSPR_triggered();
@ -442,6 +444,7 @@ private:
bool m_bNoMoreFiles;
bool m_bQRAsyncWarned;
bool m_bDoubleClicked;
bool m_bCallingCQ;
int m_ihsym;
int m_nzap;

View File

@ -748,6 +748,29 @@ QLabel[oob=&quot;true&quot;] {
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbFirst">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Call the first decoded responder to my CQ.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Call 1st</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbWeak">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Call the weakest decoded responder to my CQ.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Weak</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbTx6">
<property name="enabled">
@ -807,6 +830,49 @@ QLabel[oob=&quot;true&quot;] {
</property>
</widget>
</item>
<item row="5" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="spacing">
<number>5</number>
</property>
<item>
<widget class="QCheckBox" name="cbTxLock">
<property name="toolTip">
<string>Tx frequency tracks Rx frequency</string>
</property>
<property name="text">
<string>Lock Tx=Rx</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pbTxMode">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Toggle Tx mode</string>
</property>
<property name="text">
<string>Tx JT9 @</string>
</property>
</widget>
</item>
<item row="16" column="0">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="9" column="1">
<widget class="QSpinBox" name="syncSpinBox">
<property name="toolTip">
@ -854,49 +920,6 @@ QLabel[oob=&quot;true&quot;] {
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pbTxMode">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Toggle Tx mode</string>
</property>
<property name="text">
<string>Tx JT9 @</string>
</property>
</widget>
</item>
<item row="5" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="spacing">
<number>5</number>
</property>
<item>
<widget class="QCheckBox" name="cbTxLock">
<property name="toolTip">
<string>Tx frequency tracks Rx frequency</string>
</property>
<property name="text">
<string>Lock Tx=Rx</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="16" column="0">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
@ -910,35 +933,6 @@ QLabel[oob=&quot;true&quot;] {
</property>
</spacer>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="txFirstCheckBox">
<property name="toolTip">
<string>Check to Tx in even minutes, uncheck for odd minutes</string>
</property>
<property name="text">
<string>Tx even/1st</string>
</property>
</widget>
</item>
<item row="7" 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="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="10" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_11">
<item>
@ -978,6 +972,35 @@ QLabel[oob=&quot;true&quot;] {
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="txFirstCheckBox">
<property name="toolTip">
<string>Check to Tx in even minutes, uncheck for odd minutes</string>
</property>
<property name="text">
<string>Tx even/1st</string>
</property>
</widget>
</item>
<item row="7" 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="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="15" column="0">
<widget class="QCheckBox" name="cbSWL">
<property name="enabled">