Added directed message and alert message notification sound configuration options
This commit is contained in:
@@ -460,6 +460,10 @@ private:
|
||||
void delete_selected_macros (QModelIndexList);
|
||||
Q_SLOT void on_save_path_select_push_button_clicked (bool);
|
||||
Q_SLOT void on_azel_path_select_push_button_clicked (bool);
|
||||
Q_SLOT void on_sound_dm_path_select_push_button_clicked();
|
||||
Q_SLOT void on_sound_dm_path_reset_push_button_clicked();
|
||||
Q_SLOT void on_sound_am_path_select_push_button_clicked();
|
||||
Q_SLOT void on_sound_am_path_reset_push_button_clicked();
|
||||
Q_SLOT void on_calibration_intercept_spin_box_valueChanged (double);
|
||||
Q_SLOT void on_calibration_slope_ppm_spin_box_valueChanged (double);
|
||||
Q_SLOT void handle_transceiver_update (TransceiverState const&, unsigned sequence_number);
|
||||
@@ -503,6 +507,9 @@ private:
|
||||
QDir default_azel_directory_;
|
||||
QDir azel_directory_;
|
||||
|
||||
QString sound_dm_path_; // directed message sound file
|
||||
QString sound_am_path_; // alert message sound file
|
||||
|
||||
QFont font_;
|
||||
QFont next_font_;
|
||||
|
||||
@@ -766,6 +773,8 @@ QStringListModel * Configuration::macros () {return &m_->macros_;}
|
||||
QStringListModel const * Configuration::macros () const {return &m_->macros_;}
|
||||
QDir Configuration::save_directory () const {return m_->save_directory_;}
|
||||
QDir Configuration::azel_directory () const {return m_->azel_directory_;}
|
||||
QString Configuration::sound_dm_path() const {return m_->sound_dm_path_;}
|
||||
QString Configuration::sound_am_path() const {return m_->sound_am_path_;}
|
||||
QString Configuration::rig_name () const {return m_->rig_params_.rig_name;}
|
||||
bool Configuration::pwrBandTxMemory () const {return m_->pwrBandTxMemory_;}
|
||||
bool Configuration::pwrBandTuneMemory () const {return m_->pwrBandTuneMemory_;}
|
||||
@@ -1277,6 +1286,8 @@ void Configuration::impl::initialize_models ()
|
||||
ui_->PTT_method_button_group->button (rig_params_.ptt_type)->setChecked (true);
|
||||
ui_->save_path_display_label->setText (save_directory_.absolutePath ());
|
||||
ui_->azel_path_display_label->setText (azel_directory_.absolutePath ());
|
||||
ui_->sound_dm_path_display_label->setText(sound_dm_path_);
|
||||
ui_->sound_am_path_display_label->setText(sound_am_path_);
|
||||
ui_->CW_id_after_73_check_box->setChecked (id_after_73_);
|
||||
ui_->tx_QSY_check_box->setChecked (tx_QSY_allowed_);
|
||||
ui_->psk_reporter_check_box->setChecked (spot_to_reporting_networks_);
|
||||
@@ -1448,6 +1459,8 @@ void Configuration::impl::read_settings ()
|
||||
RxBandwidth_ = settings_->value ("RxBandwidth", 2500).toInt ();
|
||||
save_directory_ = settings_->value ("SaveDir", default_save_directory_.absolutePath ()).toString ();
|
||||
azel_directory_ = settings_->value ("AzElDir", default_azel_directory_.absolutePath ()).toString ();
|
||||
sound_dm_path_ = settings_->value ("SoundDMPath", "").toString ();
|
||||
sound_am_path_ = settings_->value ("SoundAMPath", "").toString ();
|
||||
|
||||
{
|
||||
//
|
||||
@@ -1633,6 +1646,8 @@ void Configuration::impl::write_settings ()
|
||||
settings_->setValue ("PTTport", rig_params_.ptt_port);
|
||||
settings_->setValue ("SaveDir", save_directory_.absolutePath ());
|
||||
settings_->setValue ("AzElDir", azel_directory_.absolutePath ());
|
||||
settings_->setValue ("SoundDMPath", sound_dm_path_);
|
||||
settings_->setValue ("SoundAMPath", sound_am_path_);
|
||||
|
||||
if (default_audio_input_device_selected_)
|
||||
{
|
||||
@@ -2122,6 +2137,8 @@ void Configuration::impl::accept ()
|
||||
data_mode_ = static_cast<DataMode> (ui_->TX_mode_button_group->checkedId ());
|
||||
save_directory_ = ui_->save_path_display_label->text ();
|
||||
azel_directory_ = ui_->azel_path_display_label->text ();
|
||||
sound_dm_path_ = ui_->sound_dm_path_display_label->text();
|
||||
sound_am_path_ = ui_->sound_am_path_display_label->text();
|
||||
enable_VHF_features_ = ui_->enable_VHF_features_check_box->isChecked ();
|
||||
decode_at_52s_ = ui_->decode_at_52s_check_box->isChecked ();
|
||||
single_decode_ = ui_->single_decode_check_box->isChecked ();
|
||||
@@ -2709,6 +2726,50 @@ void Configuration::impl::on_azel_path_select_push_button_clicked (bool /* check
|
||||
}
|
||||
}
|
||||
|
||||
void Configuration::impl::on_sound_dm_path_select_push_button_clicked(){
|
||||
QStringList filters;
|
||||
filters << "Audio files (*.wav)"
|
||||
<< "Any files (*)";
|
||||
|
||||
QFileDialog fd {this, tr ("Sound File"), ui_->sound_dm_path_display_label->text ()};
|
||||
fd.setNameFilters(filters);
|
||||
|
||||
if (fd.exec ()) {
|
||||
if (fd.selectedFiles ().size ()) {
|
||||
if(rig_params_.ptt_type == TransceiverFactory::PTT_method_VOX){
|
||||
QMessageBox::warning(this, "Notifications Sounds Warning", "You have enabled notification sounds while using VOX. To avoid transmitting these notification sounds, please make sure your rig is using a different sound card than your system.");
|
||||
}
|
||||
ui_->sound_dm_path_display_label->setText(fd.selectedFiles().at(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Configuration::impl::on_sound_dm_path_reset_push_button_clicked(){
|
||||
ui_->sound_dm_path_display_label->clear();
|
||||
}
|
||||
|
||||
void Configuration::impl::on_sound_am_path_select_push_button_clicked(){
|
||||
QStringList filters;
|
||||
filters << "Audio files (*.wav)"
|
||||
<< "Any files (*)";
|
||||
|
||||
QFileDialog fd {this, tr ("Sound File"), ui_->sound_am_path_display_label->text ()};
|
||||
fd.setNameFilters(filters);
|
||||
|
||||
if (fd.exec ()) {
|
||||
if (fd.selectedFiles ().size ()) {
|
||||
if(rig_params_.ptt_type == TransceiverFactory::PTT_method_VOX){
|
||||
QMessageBox::warning(this, "Notifications Sounds Warning", "You have enabled notification sounds while using VOX. To avoid transmitting these notification sounds, please make sure your rig is using a different sound card than your system.");
|
||||
}
|
||||
ui_->sound_am_path_display_label->setText(fd.selectedFiles().at(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Configuration::impl::on_sound_am_path_reset_push_button_clicked(){
|
||||
ui_->sound_am_path_display_label->clear();
|
||||
}
|
||||
|
||||
void Configuration::impl::on_calibration_intercept_spin_box_valueChanged (double)
|
||||
{
|
||||
rig_active_ = false; // force reset
|
||||
|
||||
Reference in New Issue
Block a user