mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 13:48:42 -05:00
Code cleanup.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8276 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
c4de80607c
commit
6eeece9a4b
@ -991,7 +991,7 @@ void MainWindow::writeSettings()
|
||||
m_settings->setValue ("FreeText", ui->freeTextMsg->currentText ());
|
||||
m_settings->setValue("ShowMenus",ui->cbMenus->isChecked());
|
||||
m_settings->setValue("CallFirst",ui->cbFirst->isChecked());
|
||||
m_settings->setValue("FoxSort",ui->comboBoxFoxSort->currentIndex());
|
||||
m_settings->setValue("HoundSort",ui->comboBoxHoundSort->currentIndex());
|
||||
m_settings->setValue("FoxNsig",ui->sbNsig->value());
|
||||
m_settings->setValue("FoxNslots",ui->sbNslots->value());
|
||||
m_settings->setValue("FoxMaxDB",ui->sbMax_dB->value());
|
||||
@ -1062,7 +1062,7 @@ void MainWindow::readSettings()
|
||||
m_settings->value ("FreeText").toString ());
|
||||
ui->cbMenus->setChecked(m_settings->value("ShowMenus",true).toBool());
|
||||
ui->cbFirst->setChecked(m_settings->value("CallFirst",true).toBool());
|
||||
ui->comboBoxFoxSort->setCurrentIndex(m_settings->value("FoxSort",3).toInt());
|
||||
ui->comboBoxHoundSort->setCurrentIndex(m_settings->value("HoundSort",3).toInt());
|
||||
ui->sbNsig->setValue(m_settings->value("FoxNsig",12).toInt());
|
||||
ui->sbNslots->setValue(m_settings->value("FoxNslots",5).toInt());
|
||||
ui->sbMax_dB->setValue(m_settings->value("FoxMaxDB",30).toInt());
|
||||
@ -2758,11 +2758,13 @@ void MainWindow::decodeDone ()
|
||||
b=false;
|
||||
if(ui->textBrowser3->toPlainText().indexOf(c2) >= 0) b=true;
|
||||
if(ui->textBrowser4->toPlainText().indexOf(c2) >= 0) b=true;
|
||||
if(!b) t += (t0 + "\n"); //Don't list calls already in QSO or in the stack
|
||||
if(!b) {
|
||||
t += (t0 + "\n"); //Don't list calls already in QSO or in the stack
|
||||
}
|
||||
}
|
||||
if(t.length()>30) {
|
||||
m_isort=ui->comboBoxFoxSort->currentIndex();
|
||||
QString t1=sortFoxCalls(t,m_isort,m_min_dB,m_max_dB);
|
||||
m_isort=ui->comboBoxHoundSort->currentIndex();
|
||||
QString t1=sortHoundCalls(t,m_isort,m_min_dB,m_max_dB);
|
||||
ui->decodedTextBrowser->setText(t1);
|
||||
}
|
||||
}
|
||||
@ -7068,7 +7070,7 @@ void MainWindow::write_transmit_entry (QString const& file_name)
|
||||
}
|
||||
}
|
||||
|
||||
QString MainWindow::sortFoxCalls(QString t, int isort, int min_dB, int max_dB)
|
||||
QString MainWindow::sortHoundCalls(QString t, int isort, int min_dB, int max_dB)
|
||||
{
|
||||
QMap<QString,QString> map;
|
||||
QStringList lines,lines2;
|
||||
@ -7155,6 +7157,11 @@ QString MainWindow::sortFoxCalls(QString t, int isort, int min_dB, int max_dB)
|
||||
m_nFoxCallers=0;
|
||||
if(i0 > 0) m_nFoxCallers=qMin(t.length(),m_Nsig*i0)/i0;
|
||||
m_FoxCallers=t.mid(0,m_Nsig*i0);
|
||||
if(m_nFoxCallers>0) {
|
||||
for(int i=0; i<m_nFoxCallers; i++) {
|
||||
m_HoundsCalling[i]=m_FoxCallers.split("\n").at(i);
|
||||
}
|
||||
}
|
||||
return m_FoxCallers;
|
||||
}
|
||||
|
||||
|
@ -419,6 +419,7 @@ private:
|
||||
qint32 m_nToBeCalled=0;
|
||||
qint32 m_Nsig=12;
|
||||
qint32 m_Nslots=5;
|
||||
qint32 m_nHoundsCalling=0;
|
||||
|
||||
bool m_btxok; //True if OK to transmit
|
||||
bool m_diskData;
|
||||
@ -562,6 +563,7 @@ private:
|
||||
QString m_houndGrid[5];
|
||||
QString m_houndRptSent[5];
|
||||
QString m_houndRptRcvd[5];
|
||||
QString m_HoundsCalling[100];
|
||||
|
||||
QSet<QString> m_pfx;
|
||||
QSet<QString> m_sfx;
|
||||
@ -646,7 +648,7 @@ private:
|
||||
, Frequency frequency
|
||||
, QString const& his_call
|
||||
, QString const& his_grid) const;
|
||||
QString sortFoxCalls(QString t, int isort, int min_dB, int max_dB);
|
||||
QString sortHoundCalls(QString t, int isort, int min_dB, int max_dB);
|
||||
void read_wav_file (QString const& fname);
|
||||
void decodeDone ();
|
||||
void subProcessFailed (QProcess *, int exit_code, QProcess::ExitStatus);
|
||||
|
@ -1723,7 +1723,7 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QComboBox" name="comboBoxFoxSort">
|
||||
<widget class="QComboBox" name="comboBoxHoundSort">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
|
Loading…
Reference in New Issue
Block a user