mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-06-15 04:52:31 -04:00
Implement Q65 "wanted only". Still need to tie widget visibility to mode changes.
This commit is contained in:
parent
9dac5a2ef0
commit
8621b62b8b
@ -23,8 +23,8 @@ ActiveStations::ActiveStations(QSettings * settings, QFont const& font, QWidget
|
||||
changeFont (font);
|
||||
read_settings ();
|
||||
ui->header_label2->setText(" N Call Grid Az S/N Freq Tx Age Pts");
|
||||
ui->cbWanted->setVisible(false);
|
||||
connect(ui->cbReadyOnly, SIGNAL(toggled(bool)), this, SLOT(on_cbReadyOnly_toggled(bool)));
|
||||
connect(ui->cbWantedOnly, SIGNAL(toggled(bool)), this, SLOT(on_cbWantedOnly_toggled(bool)));
|
||||
connect(ui->RecentStationsPlainTextEdit, SIGNAL(cursorPositionChanged()), this, SLOT(on_textEdit_clicked()));
|
||||
}
|
||||
|
||||
@ -47,6 +47,7 @@ void ActiveStations::read_settings ()
|
||||
ui->sbMaxRecent->setValue(settings_->value("MaxRecent",10).toInt());
|
||||
ui->sbMaxAge->setValue(settings_->value("MaxAge",10).toInt());
|
||||
ui->cbReadyOnly->setChecked(settings_->value("ReadyOnly",false).toBool());
|
||||
ui->cbWantedOnly->setChecked(settings_->value("WantedOnly",false).toBool());
|
||||
}
|
||||
|
||||
void ActiveStations::write_settings ()
|
||||
@ -56,6 +57,7 @@ void ActiveStations::write_settings ()
|
||||
settings_->setValue("MaxRecent",ui->sbMaxRecent->value());
|
||||
settings_->setValue("MaxAge",ui->sbMaxAge->value());
|
||||
settings_->setValue("ReadyOnly",ui->cbReadyOnly->isChecked());
|
||||
settings_->setValue("WantedOnly",ui->cbWantedOnly->isChecked());
|
||||
}
|
||||
|
||||
void ActiveStations::displayRecentStations(QString mode, QString const& t)
|
||||
@ -74,7 +76,7 @@ void ActiveStations::displayRecentStations(QString mode, QString const& t)
|
||||
bool b=(m_mode.left(3)=="Q65");
|
||||
ui->bandChanges->setVisible(!b);
|
||||
ui->cbReadyOnly->setVisible(m_mode!="Q65-pileup");
|
||||
ui->cbWanted->setVisible(m_mode!="Q65-pileup");
|
||||
ui->cbWantedOnly->setVisible(m_mode!="Q65-pileup");
|
||||
ui->label_2->setVisible(!b);
|
||||
ui->label_3->setVisible(!b);
|
||||
ui->score->setVisible(!b);
|
||||
@ -137,6 +139,17 @@ void ActiveStations::on_cbReadyOnly_toggled(bool b)
|
||||
emit activeStationsDisplay();
|
||||
}
|
||||
|
||||
bool ActiveStations::wantedOnly()
|
||||
{
|
||||
return ui->cbWantedOnly->isChecked();
|
||||
}
|
||||
|
||||
void ActiveStations::on_cbWantedOnly_toggled(bool b)
|
||||
{
|
||||
m_bWantedOnly=b;
|
||||
emit activeStationsDisplay();
|
||||
}
|
||||
|
||||
void ActiveStations::setRate(int n)
|
||||
{
|
||||
ui->rate->setText(QString::number(n));
|
||||
|
@ -26,12 +26,14 @@ public:
|
||||
void setClickOK(bool b);
|
||||
void erase();
|
||||
bool readyOnly();
|
||||
bool wantedOnly();
|
||||
void setRate(int n);
|
||||
void setBandChanges(int n);
|
||||
void setScore(int n);
|
||||
|
||||
bool m_clickOK=false;
|
||||
bool m_bReadyOnly;
|
||||
bool m_bWantedOnly;
|
||||
|
||||
private:
|
||||
void read_settings ();
|
||||
@ -41,6 +43,7 @@ private:
|
||||
Q_SIGNAL void cursorPositionChanged();
|
||||
|
||||
Q_SLOT void on_cbReadyOnly_toggled(bool b);
|
||||
Q_SLOT void on_cbWantedOnly_toggled(bool b);
|
||||
Q_SLOT void on_textEdit_clicked();
|
||||
|
||||
// qint64 m_msec0=0;
|
||||
|
@ -178,7 +178,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="cbWanted">
|
||||
<widget class="QCheckBox" name="cbWantedOnly">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
|
@ -9478,8 +9478,12 @@ void MainWindow::readWidebandDecodes()
|
||||
|
||||
m_ActiveStationsWidget->setClickOK(false);
|
||||
int k=0;
|
||||
|
||||
for(i=m_EMECall.begin(); i!=m_EMECall.end(); i++) {
|
||||
if(i->ready2call or !m_ActiveStationsWidget->readyOnly()) {
|
||||
bool bSkip=false;
|
||||
if(m_ActiveStationsWidget->wantedOnly() and m_EMEworked[i.key()]) bSkip=true;
|
||||
if(m_ActiveStationsWidget->readyOnly() and !i->ready2call) bSkip=true;
|
||||
if(!bSkip) {
|
||||
int snr=i->nsnr;
|
||||
int odd=1 - (i->t)%2;
|
||||
int age=60*nhr + nmin - (i->t);
|
||||
|
Loading…
x
Reference in New Issue
Block a user