Add option for returning to last monitored frequency on monitor enable

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4995 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2015-02-27 18:59:08 +00:00
parent a37e07bdd0
commit a249ce4c29
4 changed files with 62 additions and 31 deletions

View File

@ -536,6 +536,7 @@ private:
bool tx_QSY_allowed_; bool tx_QSY_allowed_;
bool spot_to_psk_reporter_; bool spot_to_psk_reporter_;
bool monitor_off_at_startup_; bool monitor_off_at_startup_;
bool monitor_last_used_;
bool log_as_RTTY_; bool log_as_RTTY_;
bool report_in_comments_; bool report_in_comments_;
bool prompt_to_log_; bool prompt_to_log_;
@ -599,6 +600,7 @@ bool Configuration::id_after_73 () const {return m_->id_after_73_;}
bool Configuration::tx_QSY_allowed () const {return m_->tx_QSY_allowed_;} bool Configuration::tx_QSY_allowed () const {return m_->tx_QSY_allowed_;}
bool Configuration::spot_to_psk_reporter () const {return m_->spot_to_psk_reporter_;} bool Configuration::spot_to_psk_reporter () const {return m_->spot_to_psk_reporter_;}
bool Configuration::monitor_off_at_startup () const {return m_->monitor_off_at_startup_;} bool Configuration::monitor_off_at_startup () const {return m_->monitor_off_at_startup_;}
bool Configuration::monitor_last_used () const {return m_->monitor_last_used_;}
bool Configuration::log_as_RTTY () const {return m_->log_as_RTTY_;} bool Configuration::log_as_RTTY () const {return m_->log_as_RTTY_;}
bool Configuration::report_in_comments () const {return m_->report_in_comments_;} bool Configuration::report_in_comments () const {return m_->report_in_comments_;}
bool Configuration::prompt_to_log () const {return m_->prompt_to_log_;} bool Configuration::prompt_to_log () const {return m_->prompt_to_log_;}
@ -1008,6 +1010,7 @@ void Configuration::impl::initialise_models ()
ui_->tx_QSY_check_box->setChecked (tx_QSY_allowed_); ui_->tx_QSY_check_box->setChecked (tx_QSY_allowed_);
ui_->psk_reporter_check_box->setChecked (spot_to_psk_reporter_); ui_->psk_reporter_check_box->setChecked (spot_to_psk_reporter_);
ui_->monitor_off_check_box->setChecked (monitor_off_at_startup_); ui_->monitor_off_check_box->setChecked (monitor_off_at_startup_);
ui_->monitor_last_used_check_box->setChecked (monitor_last_used_);
ui_->log_as_RTTY_check_box->setChecked (log_as_RTTY_); ui_->log_as_RTTY_check_box->setChecked (log_as_RTTY_);
ui_->report_in_comments_check_box->setChecked (report_in_comments_); ui_->report_in_comments_check_box->setChecked (report_in_comments_);
ui_->prompt_to_log_check_box->setChecked (prompt_to_log_); ui_->prompt_to_log_check_box->setChecked (prompt_to_log_);
@ -1165,6 +1168,7 @@ void Configuration::impl::read_settings ()
jt9w_max_dt_ = settings_->value ("DTmax", 5.).toFloat (); jt9w_max_dt_ = settings_->value ("DTmax", 5.).toFloat ();
monitor_off_at_startup_ = settings_->value ("MonitorOFF", false).toBool (); monitor_off_at_startup_ = settings_->value ("MonitorOFF", false).toBool ();
monitor_last_used_ = settings_->value ("MonitorLastUsed", false).toBool ();
spot_to_psk_reporter_ = settings_->value ("PSKReporter", false).toBool (); spot_to_psk_reporter_ = settings_->value ("PSKReporter", false).toBool ();
id_after_73_ = settings_->value ("After73", false).toBool (); id_after_73_ = settings_->value ("After73", false).toBool ();
tx_QSY_allowed_ = settings_->value ("TxQSYAllowed", false).toBool (); tx_QSY_allowed_ = settings_->value ("TxQSYAllowed", false).toBool ();
@ -1249,6 +1253,7 @@ void Configuration::impl::write_settings ()
settings_->setValue ("DTmin", jt9w_min_dt_); settings_->setValue ("DTmin", jt9w_min_dt_);
settings_->setValue ("DTmax", jt9w_max_dt_); settings_->setValue ("DTmax", jt9w_max_dt_);
settings_->setValue ("MonitorOFF", monitor_off_at_startup_); settings_->setValue ("MonitorOFF", monitor_off_at_startup_);
settings_->setValue ("MonitorLastUsed", monitor_last_used_);
settings_->setValue ("PSKReporter", spot_to_psk_reporter_); settings_->setValue ("PSKReporter", spot_to_psk_reporter_);
settings_->setValue ("After73", id_after_73_); settings_->setValue ("After73", id_after_73_);
settings_->setValue ("TxQSYAllowed", tx_QSY_allowed_); settings_->setValue ("TxQSYAllowed", tx_QSY_allowed_);
@ -1596,6 +1601,7 @@ void Configuration::impl::accept ()
id_after_73_ = ui_->CW_id_after_73_check_box->isChecked (); id_after_73_ = ui_->CW_id_after_73_check_box->isChecked ();
tx_QSY_allowed_ = ui_->tx_QSY_check_box->isChecked (); tx_QSY_allowed_ = ui_->tx_QSY_check_box->isChecked ();
monitor_off_at_startup_ = ui_->monitor_off_check_box->isChecked (); monitor_off_at_startup_ = ui_->monitor_off_check_box->isChecked ();
monitor_last_used_ = ui_->monitor_last_used_check_box->isChecked ();
jt9w_bw_mult_ = ui_->jt9w_bandwidth_mult_combo_box->currentText ().toUInt (); jt9w_bw_mult_ = ui_->jt9w_bandwidth_mult_combo_box->currentText ().toUInt ();
jt9w_min_dt_ = static_cast<float> (ui_->jt9w_min_dt_double_spin_box->value ()); jt9w_min_dt_ = static_cast<float> (ui_->jt9w_min_dt_double_spin_box->value ());
jt9w_max_dt_ = static_cast<float> (ui_->jt9w_max_dt_double_spin_box->value ()); jt9w_max_dt_ = static_cast<float> (ui_->jt9w_max_dt_double_spin_box->value ());

View File

@ -91,6 +91,7 @@ public:
bool tx_QSY_allowed () const; bool tx_QSY_allowed () const;
bool spot_to_psk_reporter () const; bool spot_to_psk_reporter () const;
bool monitor_off_at_startup () const; bool monitor_off_at_startup () const;
bool monitor_last_used () const;
bool log_as_RTTY () const; bool log_as_RTTY () const;
bool report_in_comments () const; bool report_in_comments () const;
bool prompt_to_log () const; bool prompt_to_log () const;

View File

@ -226,17 +226,6 @@
<string>Behavior</string> <string>Behavior</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_8"> <layout class="QGridLayout" name="gridLayout_8">
<item row="2" column="0">
<widget class="QCheckBox" name="disable_TX_on_73_check_box">
<property name="toolTip">
<string>Turns off automatic transmissions after sending a 73 or any other free
text message.</string>
</property>
<property name="text">
<string>Di&amp;sable Tx after sending 73</string>
</property>
</widget>
</item>
<item row="3" column="0"> <item row="3" column="0">
<widget class="QCheckBox" name="watchdog_check_box"> <widget class="QCheckBox" name="watchdog_check_box">
<property name="toolTip"> <property name="toolTip">
@ -247,16 +236,14 @@ text message.</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item row="2" column="0">
<widget class="QCheckBox" name="monitor_off_check_box"> <widget class="QCheckBox" name="disable_TX_on_73_check_box">
<property name="toolTip"> <property name="toolTip">
<string>Don't start decoding until the monitor button is clicked.</string> <string>Turns off automatic transmissions after sending a 73 or any other free
text message.</string>
</property> </property>
<property name="text"> <property name="text">
<string>Mon&amp;itor off at startup</string> <string>Di&amp;sable Tx after sending 73</string>
</property>
<property name="checked">
<bool>false</bool>
</property> </property>
</widget> </widget>
</item> </item>
@ -270,13 +257,16 @@ text message.</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="0">
<widget class="QCheckBox" name="tx_QSY_check_box"> <widget class="QCheckBox" name="monitor_off_check_box">
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Some rigs are not able to process CAT commands while transmitting. This means that if you are operating in split mode you may have to uncheck this option.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>Don't start decoding until the monitor button is clicked.</string>
</property> </property>
<property name="text"> <property name="text">
<string>Allow Tx frequency changes while transmitting</string> <string>Mon&amp;itor off at startup</string>
</property>
<property name="checked">
<bool>false</bool>
</property> </property>
</widget> </widget>
</item> </item>
@ -339,6 +329,26 @@ quiet period when decoding is done.</string>
</item> </item>
</layout> </layout>
</item> </item>
<item row="1" column="1">
<widget class="QCheckBox" name="tx_QSY_check_box">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Some rigs are not able to process CAT commands while transmitting. This means that if you are operating in split mode you may have to uncheck this option.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Allow Tx frequency changes while transmitting</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="monitor_last_used_check_box">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Check this if you wish to automatically return to the last monitored frequency when monitor is enabled, leave it unchecked if you wish to have the current rig frequency maintained.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Monitor returns to last used frequency</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@ -1950,7 +1960,9 @@ soundcard changes</string>
<tabstop>font_push_button</tabstop> <tabstop>font_push_button</tabstop>
<tabstop>decoded_text_font_push_button</tabstop> <tabstop>decoded_text_font_push_button</tabstop>
<tabstop>monitor_off_check_box</tabstop> <tabstop>monitor_off_check_box</tabstop>
<tabstop>monitor_last_used_check_box</tabstop>
<tabstop>quick_call_check_box</tabstop> <tabstop>quick_call_check_box</tabstop>
<tabstop>tx_QSY_check_box</tabstop>
<tabstop>disable_TX_on_73_check_box</tabstop> <tabstop>disable_TX_on_73_check_box</tabstop>
<tabstop>watchdog_check_box</tabstop> <tabstop>watchdog_check_box</tabstop>
<tabstop>CW_id_after_73_check_box</tabstop> <tabstop>CW_id_after_73_check_box</tabstop>
@ -2002,7 +2014,11 @@ soundcard changes</string>
<tabstop>psk_reporter_check_box</tabstop> <tabstop>psk_reporter_check_box</tabstop>
<tabstop>frequencies_table_view</tabstop> <tabstop>frequencies_table_view</tabstop>
<tabstop>stations_table_view</tabstop> <tabstop>stations_table_view</tabstop>
<tabstop>configuration_dialog_button_box</tabstop> <tabstop>pbCQmsg</tabstop>
<tabstop>pbMyCall</tabstop>
<tabstop>pbTxMsg</tabstop>
<tabstop>pbNewDXCC</tabstop>
<tabstop>pbNewCall</tabstop>
</tabstops> </tabstops>
<resources/> <resources/>
<connections> <connections>
@ -2072,12 +2088,12 @@ soundcard changes</string>
</connection> </connection>
</connections> </connections>
<buttongroups> <buttongroups>
<buttongroup name="TX_mode_button_group"/>
<buttongroup name="split_mode_button_group"/>
<buttongroup name="CAT_stop_bits_button_group"/>
<buttongroup name="CAT_data_bits_button_group"/>
<buttongroup name="CAT_handshake_button_group"/> <buttongroup name="CAT_handshake_button_group"/>
<buttongroup name="PTT_method_button_group"/> <buttongroup name="PTT_method_button_group"/>
<buttongroup name="TX_audio_source_button_group"/> <buttongroup name="TX_audio_source_button_group"/>
<buttongroup name="CAT_data_bits_button_group"/>
<buttongroup name="split_mode_button_group"/>
<buttongroup name="TX_mode_button_group"/>
<buttongroup name="CAT_stop_bits_button_group"/>
</buttongroups> </buttongroups>
</ui> </ui>

View File

@ -700,10 +700,18 @@ void MainWindow::on_monitorButton_clicked (bool checked)
{ {
m_diskData = false; // no longer reading WAV files m_diskData = false; // no longer reading WAV files
// put rig back where it was when last in control Frequency operating_frequency {m_dialFreq};
Q_EMIT m_config.transceiver_frequency (m_lastMonitoredFrequency); if (m_config.monitor_last_used ())
qsy (m_lastMonitoredFrequency); {
setXIT (ui->TxFreqSpinBox->value ()); // put rig back where it was when last in control
operating_frequency = m_lastMonitoredFrequency;
Q_EMIT m_config.transceiver_frequency (operating_frequency);
}
qsy (operating_frequency);
if (m_config.monitor_last_used ())
{
setXIT (ui->TxFreqSpinBox->value ());
}
} }
Q_EMIT m_config.sync_transceiver (true, checked); // gets Q_EMIT m_config.sync_transceiver (true, checked); // gets