when changing bands as Fox, clear the hound queues

This commit is contained in:
Brian Moran 2023-02-21 08:58:05 -08:00
parent ce622487ca
commit 969411cd39
2 changed files with 21 additions and 11 deletions

View File

@ -7572,6 +7572,9 @@ void MainWindow::band_changed (Frequency f)
}
setRig (f);
setXIT (ui->TxFreqSpinBox->value ());
// when changing bands, don't preserve the Fox queues
FoxReset("BandChange");
}
}
@ -9207,6 +9210,20 @@ void MainWindow::on_sbMax_dB_valueChanged(int n)
t = t.asprintf(" Max_dB %d",m_max_dB);
writeFoxQSO(t);
}
void MainWindow::FoxReset(QString reason="")
{
QFile f(m_config.temp_dir().absoluteFilePath("houndcallers.txt"));
f.remove();
ui->decodedTextBrowser->setText("");
ui->houndQueueTextBrowser->setText("");
ui->foxTxListTextBrowser->setText("");
m_houndQueue.clear();
m_foxQSO.clear();
m_foxQSOinProgress.clear();
if (reason != "") writeFoxQSO(" " + reason);
writeFoxQSO(" Reset");
}
void MainWindow::on_pbFoxReset_clicked()
{
@ -9214,16 +9231,7 @@ void MainWindow::on_pbFoxReset_clicked()
auto button = MessageBox::query_message (this, tr ("Confirm Reset"),
tr ("Are you sure you want to clear the QSO queues?"));
if(button == MessageBox::Yes) {
QFile f(m_config.temp_dir().absoluteFilePath("houndcallers.txt"));
f.remove();
ui->decodedTextBrowser->setText("");
ui->houndQueueTextBrowser->setText("");
ui->foxTxListTextBrowser->setText("");
m_houndQueue.clear();
m_foxQSO.clear();
m_foxQSOinProgress.clear();
writeFoxQSO(" Reset");
FoxReset();
}
}
@ -9347,6 +9355,7 @@ void MainWindow::selectHound(QString line, bool bTopQueue)
* <Enter> is equivalent to double-clicking on the top-most line.
*/
if(line.length()==0) return;
if(line.length() < 6) return;
QString houndCall=line.split(" ",SkipEmptyParts).at(0);
// Don't add a call already enqueued or in QSO

View File

@ -326,12 +326,13 @@ private slots:
void on_sbF_High_valueChanged(int n);
void chk_FST4_freq_range();
void on_pbFoxReset_clicked();
void FoxReset(QString reason);
void on_comboBoxHoundSort_activated (int index);
void not_GA_warning_message ();
void checkMSK144ContestType();
void on_pbBestSP_clicked();
void on_RoundRobin_currentTextChanged(QString text);
void setTxMsg(int n);
void setTxMsg(int n);
bool stdCall(QString const& w);
void remote_configure (QString const& mode, quint32 frequency_tolerance, QString const& submode
, bool fast_mode, quint32 tr_period, quint32 rx_df, QString const& dx_call