Added deselect callsign after logging as an option instead of forced

This commit is contained in:
Jordan Sherer 2018-11-20 09:50:53 -05:00
parent f018a622ce
commit a3e004375e
4 changed files with 38 additions and 20 deletions

View File

@ -642,7 +642,7 @@ private:
bool insert_blank_;
bool DXCC_;
bool ppfx_;
bool clear_DX_;
bool clear_callsign_;
bool miles_;
bool quick_call_;
bool disable_TX_on_73_;
@ -773,7 +773,7 @@ bool Configuration::prompt_to_log () const {return m_->prompt_to_log_;}
bool Configuration::insert_blank () const {return m_->insert_blank_;}
bool Configuration::DXCC () const {return m_->DXCC_;}
bool Configuration::ppfx() const {return m_->ppfx_;}
bool Configuration::clear_DX () const {return m_->clear_DX_;}
bool Configuration::clear_callsign () const {return m_->clear_callsign_;}
bool Configuration::miles () const {return m_->miles_;}
bool Configuration::quick_call () const {return m_->quick_call_;}
bool Configuration::disable_TX_on_73 () const {return m_->disable_TX_on_73_;}
@ -1367,7 +1367,7 @@ void Configuration::impl::initialize_models ()
ui_->stations_table_view->setEnabled(ui_->auto_switch_bands_check_box->isChecked());
ui_->report_in_comments_check_box->setChecked (report_in_comments_);
ui_->prompt_to_log_check_box->setChecked (prompt_to_log_);
ui_->clear_DX_check_box->setChecked (clear_DX_);
ui_->clear_callsign_check_box->setChecked (clear_callsign_);
ui_->miles_check_box->setChecked (miles_);
ui_->quick_call_check_box->setChecked (quick_call_);
ui_->disable_TX_on_73_check_box->setChecked (disable_TX_on_73_);
@ -1677,7 +1677,7 @@ void Configuration::impl::read_settings ()
insert_blank_ = settings_->value ("InsertBlank", false).toBool ();
DXCC_ = settings_->value ("DXCCEntity", false).toBool ();
ppfx_ = settings_->value ("PrincipalPrefix", false).toBool ();
clear_DX_ = settings_->value ("ClearCallGrid", false).toBool ();
clear_callsign_ = settings_->value ("ClearCallGrid", false).toBool ();
miles_ = settings_->value ("Miles", false).toBool ();
quick_call_ = settings_->value ("QuickCall", false).toBool ();
disable_TX_on_73_ = settings_->value ("73TxDisable", false).toBool ();
@ -1812,7 +1812,7 @@ void Configuration::impl::write_settings ()
settings_->setValue ("InsertBlank", insert_blank_);
settings_->setValue ("DXCCEntity", DXCC_);
settings_->setValue ("PrincipalPrefix", ppfx_);
settings_->setValue ("ClearCallGrid", clear_DX_);
settings_->setValue ("ClearCallGrid", clear_callsign_);
settings_->setValue ("Miles", miles_);
settings_->setValue ("QuickCall", quick_call_);
settings_->setValue ("73TxDisable", disable_TX_on_73_);
@ -2297,7 +2297,7 @@ void Configuration::impl::accept ()
log_as_DATA_ = ui_->log_as_RTTY_check_box->isChecked ();
report_in_comments_ = ui_->report_in_comments_check_box->isChecked ();
prompt_to_log_ = ui_->prompt_to_log_check_box->isChecked ();
clear_DX_ = ui_->clear_DX_check_box->isChecked ();
clear_callsign_ = ui_->clear_callsign_check_box->isChecked ();
miles_ = ui_->miles_check_box->isChecked ();
quick_call_ = ui_->quick_call_check_box->isChecked ();
disable_TX_on_73_ = ui_->disable_TX_on_73_check_box->isChecked ();

View File

@ -133,7 +133,7 @@ public:
bool insert_blank () const;
bool DXCC () const;
bool ppfx() const;
bool clear_DX () const;
bool clear_callsign () const;
bool miles () const;
bool quick_call () const;
bool disable_TX_on_73 () const;

View File

@ -278,9 +278,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<y>-26</y>
<width>724</width>
<height>473</height>
<height>479</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_26">
@ -725,6 +725,19 @@ text message.</string>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
@ -1975,7 +1988,7 @@ both here.</string>
<x>0</x>
<y>0</y>
<width>746</width>
<height>519</height>
<height>548</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_30">
@ -2023,19 +2036,18 @@ both here.</string>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="clear_DX_check_box">
<widget class="QCheckBox" name="clear_callsign_check_box">
<property name="enabled">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="visible">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Check this option to force the clearing of the DX Call
and DX Grid fields when a 73 or free text message is sent.</string>
<string>Check this option to force deselect callsign after logging.</string>
</property>
<property name="text">
<string>Clear &amp;DX call and grid after logging</string>
<string>Deselect callsign after logging</string>
</property>
</widget>
</item>
@ -3999,12 +4011,12 @@ soundcard changes</string>
</connection>
</connections>
<buttongroups>
<buttongroup name="TX_audio_source_button_group"/>
<buttongroup name="CAT_handshake_button_group"/>
<buttongroup name="PTT_method_button_group"/>
<buttongroup name="CAT_data_bits_button_group"/>
<buttongroup name="PTT_method_button_group"/>
<buttongroup name="CAT_stop_bits_button_group"/>
<buttongroup name="split_mode_button_group"/>
<buttongroup name="TX_audio_source_button_group"/>
<buttongroup name="TX_mode_button_group"/>
</buttongroups>
</ui>

View File

@ -5952,11 +5952,14 @@ void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call,
{"STATION.GRID", QVariant(my_grid)}
});
clearCallsignSelected();
m_logBook.init();
if (m_config.clear_DX () and !m_config.bHound()) clearDX ();
if (m_config.clear_callsign ()){
clearDX ();
clearCallsignSelected();
}
displayCallActivity();
m_dateTimeQSOOn = QDateTime {};
}
@ -8521,6 +8524,9 @@ void MainWindow::processActivity(bool force) {
}
void MainWindow::observeTimeDeltaForAverage(float delta){
// delta can only be +/- 15 seconds
delta = qMax(-15.0F, qMin(delta, 15.0F));
// compute average drift
if(m_timeDeltaMsMMA_N == 0){
m_timeDeltaMsMMA_N++;