diff --git a/Configuration.cpp b/Configuration.cpp index 65a42d0..9f82637 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -650,6 +650,14 @@ bool Configuration::spot_to_psk_reporter () const // rig must be open and working to spot externally return is_transceiver_online () && m_->spot_to_psk_reporter_; } +void Configuration::set_spot_to_psk_reporter (bool spot) +{ + if(m_->spot_to_psk_reporter_ != spot){ + m_->spot_to_psk_reporter_ = spot; + m_->write_settings(); + } +} + bool Configuration::monitor_off_at_startup () const {return m_->monitor_off_at_startup_;} bool Configuration::monitor_last_used () const {return m_->rig_is_dummy_ || m_->monitor_last_used_;} bool Configuration::log_as_RTTY () const {return m_->log_as_RTTY_;} @@ -1390,7 +1398,7 @@ void Configuration::impl::read_settings () quick_call_ = settings_->value ("QuickCall", false).toBool (); disable_TX_on_73_ = settings_->value ("73TxDisable", false).toBool (); beacon_ = settings_->value ("TxBeacon", 5).toInt (); - watchdog_ = settings_->value ("TxWatchdog", 6).toInt (); + watchdog_ = settings_->value ("TxWatchdog", 0).toInt (); TX_messages_ = settings_->value ("Tx2QSO", true).toBool (); enable_VHF_features_ = settings_->value("VHFUHF",false).toBool (); decode_at_52s_ = settings_->value("Decode52",false).toBool (); diff --git a/Configuration.hpp b/Configuration.hpp index 696604c..50c40b1 100644 --- a/Configuration.hpp +++ b/Configuration.hpp @@ -107,6 +107,7 @@ public: bool id_after_73 () const; bool tx_QSY_allowed () const; bool spot_to_psk_reporter () const; + void set_spot_to_psk_reporter (bool); bool monitor_off_at_startup () const; bool monitor_last_used () const; bool log_as_RTTY () const; diff --git a/Configuration.ui b/Configuration.ui index 265729c..e5c7d52 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -389,7 +389,7 @@ - 6 + 0 @@ -1777,6 +1777,9 @@ QListView::item:hover { + + false + Some logging programs will not accept the type of reports saved by this program. @@ -1790,6 +1793,9 @@ comments field. + + false + Check this option to force the clearing of the DX Call and DX Grid fields when a 73 or free text message is sent. @@ -2863,12 +2869,12 @@ soundcard changes + - + - diff --git a/mainwindow.cpp b/mainwindow.cpp index fee223b..1164eab 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1010,7 +1010,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, ui->TxFreqSpinBox->setValue(1500); ui->RxFreqSpinBox->setValue(1500); - //connect(ui->tableWidgetRXAll->horizontalHeader(), &QHeaderView::sectionResized, this, [this](){ }); + ui->spotButton->setChecked(m_config.spot_to_psk_reporter()); // setup tablewidget context menus auto clearAction1 = new QAction(QIcon::fromTheme("edit-clear"), QString("Clear"), ui->textEditRX); @@ -1746,7 +1746,7 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog on_dxGridEntry_textChanged (m_hisGrid); // recalculate distances in case of units change enable_DXCC_entity (m_config.DXCC ()); // sets text window proportions and (re)inits the logbook - if(m_config.spot_to_psk_reporter ()) pskSetLocal (); + preparePSKReporter(); if(m_config.restart_audio_input ()) { Q_EMIT startAudioInputStream (m_config.audio_input_device (), @@ -1806,6 +1806,23 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog } } +void MainWindow::preparePSKReporter(){ + if(m_config.spot_to_psk_reporter ()){ + pskSetLocal (); + ui->spotButton->setChecked(true); + } else { + ui->spotButton->setChecked(false); + } +} + +void MainWindow::on_spotButton_clicked(bool checked){ + // 1. save setting + m_config.set_spot_to_psk_reporter(checked); + + // 2. prepare + preparePSKReporter(); +} + void MainWindow::on_monitorButton_clicked (bool checked) { if (!m_transmitting) { @@ -1882,8 +1899,8 @@ void MainWindow::on_autoButton_clicked (bool checked) void MainWindow::auto_tx_mode (bool state) { - ui->autoButton->setChecked (state); - on_autoButton_clicked (state); + ui->autoButton->setChecked (state); + on_autoButton_clicked (state); } void MainWindow::keyPressEvent (QKeyEvent * e) @@ -6796,6 +6813,10 @@ void MainWindow::stopTuneATU() m_bTxTime=false; } +void MainWindow::on_monitorTxButton_clicked(){ + on_stopTxButton_clicked(); +} + void MainWindow::on_stopTxButton_clicked() //Stop Tx { if (m_tune) stop_tuning (); @@ -7302,6 +7323,10 @@ void MainWindow::transmitDisplay (bool transmitting) ui->pbTxMode->setEnabled (false); } } + + // TODO: jsherer - encapsulate this in a function? + ui->monitorButton->setVisible(!transmitting); + ui->monitorTxButton->setVisible(transmitting); } void MainWindow::on_sbFtol_valueChanged(int value) diff --git a/mainwindow.h b/mainwindow.h index 39c3c6f..9c94dff 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -143,10 +143,13 @@ private slots: void on_tx5_currentTextChanged (QString const&); void on_tx6_editingFinished(); void on_actionSettings_triggered(); + void preparePSKReporter(); + void on_spotButton_clicked(bool checked); void on_monitorButton_clicked (bool); void on_actionAbout_triggered(); void on_autoButton_clicked (bool); void on_labDialFreq_clicked(); + void on_monitorTxButton_clicked(); void on_stopTxButton_clicked(); void on_stopButton_clicked(); void on_actionRelease_Notes_triggered (); diff --git a/mainwindow.ui b/mainwindow.ui index a00e48c..ddfe446 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -532,9 +532,9 @@ background-color: #6699ff; - + - false + true @@ -583,7 +583,7 @@ background-color: #00ff00; } - TX + SPOT true @@ -591,6 +591,7 @@ background-color: #00ff00; + true @@ -632,7 +633,7 @@ QPushButton[state="error"] { background-color: red; } QPushButton[state="warning"] { -background-color: orange; +background-color: yellow; } QPushButton[state="ok"] { background-color: #00ff00; @@ -648,6 +649,56 @@ background-color: #00ff00; true + + + false + + + true + + + + 0 + 0 + + + + + 40 + 30 + + + + + 40 + 30 + + + + QPushButton { +font-family: helvetica; +font-size: 9pt; +font-weight: bold; +color: black; +border-style: solid; +border-width:0px; +border-color: gray; +max-height:30px; +min-width:40px; +min-height:30px; +max-width:40px;; +background-color: yellow; +} + + + + TX + + + false + + + @@ -3747,7 +3798,7 @@ list. The list can be maintained in Settings (F2). - + 50