diff --git a/Configuration.cpp b/Configuration.cpp index 7b78abed0..386c1ee1d 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -920,6 +920,30 @@ void Configuration::set_location (QString const& grid_descriptor) m_->dynamic_grid_ = grid_descriptor.trimmed (); } +void Configuration::setSpecial_Hound() +{ + m_->bSpecialOp_=true; + m_->ui_->gbSpecialOpActivity->setChecked(m_->bSpecialOp_); + m_->ui_->rbHound->setChecked(true); + m_->SelectedActivity_ = static_cast (SpecialOperatingActivity::HOUND); + m_->write_settings(); +} + +void Configuration::setSpecial_Fox() +{ + m_->bSpecialOp_=true; + m_->ui_->gbSpecialOpActivity->setChecked(m_->bSpecialOp_); + m_->ui_->rbFox->setChecked(true); + m_->SelectedActivity_ = static_cast (SpecialOperatingActivity::FOX); + m_->write_settings(); +} + +void Configuration::setSpecial_None() +{ + m_->bSpecialOp_=false; + m_->ui_->gbSpecialOpActivity->setChecked(m_->bSpecialOp_); + m_->write_settings(); +} namespace { #if defined (Q_OS_MAC) diff --git a/Configuration.hpp b/Configuration.hpp index b0f6bf75b..5f9e30bbf 100644 --- a/Configuration.hpp +++ b/Configuration.hpp @@ -181,6 +181,9 @@ public: bool highlight_by_mode () const; bool highlight_only_fields () const; bool include_WAE_entities () const; + void setSpecial_Hound(); + void setSpecial_Fox(); + void setSpecial_None(); enum class SpecialOperatingActivity {NONE, NA_VHF, EU_VHF, FIELD_DAY, RTTY, WW_DIGI, FOX, HOUND}; SpecialOperatingActivity special_op_id () const; diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 769c3e1e4..5138b1253 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -6222,7 +6222,6 @@ void MainWindow::on_actionFT8_triggered() m_bFast9=false; m_bFastMode=false; WSPR_config(false); - switch_mode (Modes::FT8); m_nsps=6912; m_FFTSize = m_nsps / 2; Q_EMIT FFTSize (m_FFTSize); @@ -6273,6 +6272,8 @@ void MainWindow::on_actionFT8_triggered() on_fox_log_action_triggered(); } if(SpecOp::HOUND == m_config.special_op_id()) { + ui->houndButton->setChecked(true); + ui->houndButton->setStyleSheet("background-color: #ff0000;"); ui->txFirstCheckBox->setChecked(false); ui->txFirstCheckBox->setEnabled(false); ui->cbAutoSeq->setEnabled(false); @@ -6290,6 +6291,8 @@ void MainWindow::on_actionFT8_triggered() ui->txb4->setEnabled(false); ui->txb5->setEnabled(false); ui->txb6->setEnabled(false); + } else { + switch_mode (Modes::FT8); } if (SpecOp::NONE < m_config.special_op_id () && SpecOp::FOX > m_config.special_op_id ()) { @@ -9445,3 +9448,57 @@ QString MainWindow::WSPR_message() } return msg2; } + +void MainWindow::on_houndButton_clicked (bool checked) +{ + if (checked) { + ui->houndButton->setStyleSheet("background-color: #ff0000;"); + m_config.setSpecial_Hound(); + } else { + ui->houndButton->setStyleSheet(""); + m_config.setSpecial_None(); + } + on_actionFT8_triggered(); +} + +void MainWindow::on_ft8Button_clicked() +{ + ui->houndButton->setChecked(false); + ui->houndButton->setStyleSheet(""); + m_config.setSpecial_None(); + on_actionFT8_triggered(); +} + +void MainWindow::on_ft4Button_clicked() +{ + ui->houndButton->setChecked(false); + ui->houndButton->setStyleSheet(""); + m_config.setSpecial_None(); + on_actionFT4_triggered(); +} + +void MainWindow::on_msk144Button_clicked() +{ + ui->houndButton->setChecked(false); + ui->houndButton->setStyleSheet(""); + m_config.setSpecial_None(); + on_actionMSK144_triggered(); +} + +void MainWindow::on_q65Button_clicked() +{ + ui->houndButton->setChecked(false); + ui->houndButton->setStyleSheet(""); + m_config.setSpecial_None(); + on_actionQ65_triggered(); +// ui->sbTR->setValue (m_settings->value ("TRPeriod", 30).toInt()); // set default TRPeriod to 30s +} + +void MainWindow::on_fst4Button_clicked() +{ + ui->houndButton->setChecked(false); + ui->houndButton->setStyleSheet(""); + m_config.setSpecial_None(); + on_actionFST4_triggered(); +// ui->sbTR->setValue (m_settings->value ("TRPeriod", 60).toInt()); // set default TRPeriod to 60s +} diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 139c30c3b..553577fe2 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -141,6 +141,12 @@ private: private slots: void initialize_fonts (); + void on_houndButton_clicked(bool checked); + void on_ft8Button_clicked(); + void on_ft4Button_clicked(); + void on_msk144Button_clicked(); + void on_q65Button_clicked(); + void on_fst4Button_clicked(); void on_tx1_editingFinished(); void on_tx2_editingFinished(); void on_tx3_editingFinished(); diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index bb9b22b77..bd86233cb 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -2,6 +2,14 @@ MainWindow + + + 0 + 0 + 930 + 644 + + WSJT-X by K1JT @@ -552,362 +560,15 @@ - - - - - false - - - <html><head/><body><p>If orange or red there has been a rig control failure, click to reset and read the dial frequency. S implies split mode.</p></body></html> - - - If orange or red there has been a rig control failure, click to reset and read the dial frequency. S implies split mode. - - - QPushButton { - font-family: helvetica; - font-size: 9pt; - font-weight: bold; - background-color: white; - color: black; - border-style: solid; - border-width:1px; - border-radius:10px; - border-color: gray; - max-width:20px; - max-height:20px; - min-width:20px; - min-height:20px; -} -QPushButton[state="error"] { - background-color: red; -} -QPushButton[state="warning"] { - background-color: orange; -} -QPushButton[state="ok"] { - background-color: #00ff00; -} - - - ? - - - - + + Pwr - - - - Adjust Tx audio level - - - 450 - - - 0 - - - Qt::Vertical - - - true - - - true - - - QSlider::TicksBelow - - - 50 - - - - - - - - 0 - 0 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - - 252 - 252 - 252 - - - - - - - 159 - 175 - 213 - - - - - - - - - 252 - 252 - 252 - - - - - - - 159 - 175 - 213 - - - - - - - - - 159 - 175 - 213 - - - - - - - 159 - 175 - 213 - - - - - - - - true - - - DX Call - - - Qt::AlignCenter - - - 5 - - - 2 - - - dxCallEntry - - - - - - - - - - - - 252 - 252 - 252 - - - - - - - 159 - 175 - 213 - - - - - - - - - 252 - 252 - 252 - - - - - - - 159 - 175 - 213 - - - - - - - - - 159 - 175 - 213 - - - - - - - 159 - 175 - 213 - - - - - - - - true - - - DX Grid - - - Qt::AlignCenter - - - 5 - - - 2 - - - dxGridEntry - - - - - - - - 0 - 0 - - - - Callsign of station to be worked - - - 11 - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - Locator of station to be worked - - - ` - - - 6 - - - Qt::AlignCenter - - - - - - - - - Search for callsign in database - - - &Lookup - - - - - - - Add callsign and locator to database - - - Add - - - - - - - true - - - Az: 251 16553 km - - - Qt::AlignCenter - - - 4 - - - - - - - - - + @@ -946,40 +607,7 @@ QPushButton[state="ok"] { - - - - - 0 - 0 - - - - USB dial frequency - - - QLabel { - font-family: MS Shell Dlg 2; - font-size: 16pt; - color : yellow; - background-color : black; -} -QLabel[oob="true"] { - background-color: red; -} - - - 14.078 000 - - - Qt::AlignCenter - - - 5 - - - - + @@ -2761,10 +2389,44 @@ Double-click to reset to the standard 73 message + + + + + 100 + 16777215 + + + + <html><head/><body><p>Select operating band or enter frequency in MHz or enter kHz increment followed by k.</p></body></html> + + + Frequency entry + + + Select operating band or enter frequency in MHz or enter kHz increment followed by k. + + + true + + + QComboBox::NoInsert + + + QComboBox::AdjustToMinimumContentsLengthWithIcon + + + + + + 100 + 16777215 + + Qt::AlignCenter @@ -2818,28 +2480,489 @@ Yellow when too low - - + + + + + 0 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + 252 + 252 + 252 + + + + + + + 159 + 175 + 213 + + + + + + + + + 252 + 252 + 252 + + + + + + + 159 + 175 + 213 + + + + + + + + + 159 + 175 + 213 + + + + + + + 159 + 175 + 213 + + + + + + + + true + + + DX Call + + + Qt::AlignCenter + + + 5 + + + 2 + + + dxCallEntry + + + + + + + + + + + + 252 + 252 + 252 + + + + + + + 159 + 175 + 213 + + + + + + + + + 252 + 252 + 252 + + + + + + + 159 + 175 + 213 + + + + + + + + + 159 + 175 + 213 + + + + + + + 159 + 175 + 213 + + + + + + + + true + + + DX Grid + + + Qt::AlignCenter + + + 5 + + + 2 + + + dxGridEntry + + + + + + + + 0 + 0 + + + + Callsign of station to be worked + + + 11 + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + Locator of station to be worked + + + ` + + + 6 + + + Qt::AlignCenter + + + + + + + + + Search for callsign in database + + + &Lookup + + + + + + + Add callsign and locator to database + + + Add + + + + + + + true + + + Az: 251 16553 km + + + Qt::AlignCenter + + + 4 + + + + + + + + + + - <html><head/><body><p>Select operating band or enter frequency in MHz or enter kHz increment followed by k.</p></body></html> + Adjust Tx audio level - - Frequency entry + + 450 - - Select operating band or enter frequency in MHz or enter kHz increment followed by k. + + 0 - + + Qt::Vertical + + true - - QComboBox::NoInsert + + true - - QComboBox::AdjustToMinimumContentsLengthWithIcon + + QSlider::TicksBelow + + + 50 + + + + false + + + <html><head/><body><p>If orange or red there has been a rig control failure, click to reset and read the dial frequency. S implies split mode.</p></body></html> + + + If orange or red there has been a rig control failure, click to reset and read the dial frequency. S implies split mode. + + + QPushButton { + font-family: helvetica; + font-size: 9pt; + font-weight: bold; + background-color: white; + color: black; + border-style: solid; + border-width:1px; + border-radius:10px; + border-color: gray; + max-width:20px; + max-height:20px; + min-width:20px; + min-height:20px; +} +QPushButton[state="error"] { + background-color: red; +} +QPushButton[state="warning"] { + background-color: orange; +} +QPushButton[state="ok"] { + background-color: #00ff00; +} + + + ? + + + + + + + + 0 + 0 + + + + USB dial frequency + + + QLabel { + font-family: MS Shell Dlg 2; + font-size: 16pt; + color : yellow; + background-color : black; +} +QLabel[oob="true"] { + background-color: red; +} + + + 14.078 000 + + + Qt::AlignCenter + + + 5 + + + + + + + + + + 32 + 16777215 + + + + Toggle FT8 hound mode on/off + + + H + + + true + + + + + + + + 32 + 16777215 + + + + Switch to FT8 mode + + + FT8 + + + + + + + + 32 + 16777215 + + + + Switch to FT4 mode + + + FT4 + + + + + + + + 32 + 16777215 + + + + Switch to MSK144 mode + + + MSK + + + + + + + + 32 + 16777215 + + + + Switch to Q65 mode + + + Q65 + + + + + + + + 32 + 16777215 + + + + Switch to FST4 mode + + + FST4 + + + + + @@ -2852,7 +2975,7 @@ Yellow when too low 0 0 - 842 + 930 21 @@ -3521,7 +3644,6 @@ Yellow when too low tuneButton cbMenus bandComboBox - readFreq sbNB dxCallEntry dxGridEntry diff --git a/widgets/signalmeter.cpp b/widgets/signalmeter.cpp index 60e49b565..b9724d16a 100644 --- a/widgets/signalmeter.cpp +++ b/widgets/signalmeter.cpp @@ -77,7 +77,7 @@ SignalMeter::SignalMeter (QWidget * parent) outer_layout->setSpacing (0); auto inner_layout = new QHBoxLayout; - inner_layout->setContentsMargins (9, 0, 9, 0); + inner_layout->setContentsMargins (1, 0, 1, 0); inner_layout->setSpacing (0); m_meter = new MeterWidget;