Add convenience feature: Right-click to toggle SuperFox mode On/Off. It works both for Fox mode and Hound mode.

This commit is contained in:
Uwe Risse 2024-05-16 21:08:24 +02:00
parent 895067929d
commit 6bac88d491
4 changed files with 31 additions and 5 deletions

View File

@ -1059,6 +1059,18 @@ void Configuration::setSpecial_None()
m_->SelectedActivity_ = static_cast<int> (SpecialOperatingActivity::HOUND); // brings backward compatibility to versions without Q65_PILEUP
m_->write_settings();
}
void Configuration::toggle_SF()
{
if (m_->bSuperFox_) {
m_->ui_->cbSuperFox->setChecked(false);
} else {
m_->ui_->cbSuperFox->setChecked(true);
}
m_->bSuperFox_ = m_->ui_->cbSuperFox->isChecked ();
m_->write_settings();
}
namespace
{
#if defined (Q_OS_MAC)

View File

@ -189,6 +189,7 @@ public:
void setSpecial_Hound();
void setSpecial_Fox();
void setSpecial_None();
void toggle_SF();
bool highlight_DXcall () const;
bool highlight_DXgrid () const;
bool Individual_Contest_Name() const;

View File

@ -6730,6 +6730,14 @@ void MainWindow::mousePressEvent(QMouseEvent *event)
on_actionJT9_triggered();
ui->jt65Button->clearFocus();
}
if(ui->ft8Button->hasFocus() && (event->button() & Qt::RightButton)) {
keep_frequency = true;
m_config.toggle_SF();
QTimer::singleShot (250, [=] {
keep_frequency = false;
});
on_actionFT8_triggered();
}
}
void MainWindow::on_dxCallEntry_textChanged (QString const& call)
@ -7265,7 +7273,7 @@ void MainWindow::on_actionFT8_triggered()
ui->txb5->setEnabled(false);
ui->txb6->setEnabled(false);
} else {
if (!(keep_frequency)) switch_mode (Modes::FT8);
switch_mode (Modes::FT8);
}
if(m_specOp != SpecOp::HOUND) {
ui->houndButton->setChecked(false);
@ -7768,9 +7776,11 @@ void MainWindow::switch_mode (Mode mode)
m_fastGraph->setMode(m_mode);
m_config.frequencies ()->filter (m_config.region (), mode, true); // filter on current time
auto const& row = m_config.frequencies ()->best_working_frequency (m_freqNominal);
ui->bandComboBox->setCurrentIndex (row);
if (row >= 0) {
on_bandComboBox_activated (row);
if (!keep_frequency) {
ui->bandComboBox->setCurrentIndex (row);
if (row >= 0 ) {
on_bandComboBox_activated (row);
}
}
ui->rptSpinBox->setSingleStep(1);
ui->rptSpinBox->setMinimum(-50);

View File

@ -2948,8 +2948,11 @@ QLabel[oob=&quot;true&quot;] {
<height>16777215</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="toolTip">
<string>Switch to FT8 mode</string>
<string>Switch to FT8 mode.&lt;br&gt; Right-click to toggle SuperFox mode On/Off.</string>
</property>
<property name="text">
<string>FT8</string>