Added directed message and alert message notification sound configuration options
This commit is contained in:
parent
293781079a
commit
b4c95e4313
@ -460,6 +460,10 @@ private:
|
|||||||
void delete_selected_macros (QModelIndexList);
|
void delete_selected_macros (QModelIndexList);
|
||||||
Q_SLOT void on_save_path_select_push_button_clicked (bool);
|
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_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_intercept_spin_box_valueChanged (double);
|
||||||
Q_SLOT void on_calibration_slope_ppm_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);
|
Q_SLOT void handle_transceiver_update (TransceiverState const&, unsigned sequence_number);
|
||||||
@ -503,6 +507,9 @@ private:
|
|||||||
QDir default_azel_directory_;
|
QDir default_azel_directory_;
|
||||||
QDir azel_directory_;
|
QDir azel_directory_;
|
||||||
|
|
||||||
|
QString sound_dm_path_; // directed message sound file
|
||||||
|
QString sound_am_path_; // alert message sound file
|
||||||
|
|
||||||
QFont font_;
|
QFont font_;
|
||||||
QFont next_font_;
|
QFont next_font_;
|
||||||
|
|
||||||
@ -766,6 +773,8 @@ QStringListModel * Configuration::macros () {return &m_->macros_;}
|
|||||||
QStringListModel const * Configuration::macros () const {return &m_->macros_;}
|
QStringListModel const * Configuration::macros () const {return &m_->macros_;}
|
||||||
QDir Configuration::save_directory () const {return m_->save_directory_;}
|
QDir Configuration::save_directory () const {return m_->save_directory_;}
|
||||||
QDir Configuration::azel_directory () const {return m_->azel_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;}
|
QString Configuration::rig_name () const {return m_->rig_params_.rig_name;}
|
||||||
bool Configuration::pwrBandTxMemory () const {return m_->pwrBandTxMemory_;}
|
bool Configuration::pwrBandTxMemory () const {return m_->pwrBandTxMemory_;}
|
||||||
bool Configuration::pwrBandTuneMemory () const {return m_->pwrBandTuneMemory_;}
|
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_->PTT_method_button_group->button (rig_params_.ptt_type)->setChecked (true);
|
||||||
ui_->save_path_display_label->setText (save_directory_.absolutePath ());
|
ui_->save_path_display_label->setText (save_directory_.absolutePath ());
|
||||||
ui_->azel_path_display_label->setText (azel_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_->CW_id_after_73_check_box->setChecked (id_after_73_);
|
||||||
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_reporting_networks_);
|
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 ();
|
RxBandwidth_ = settings_->value ("RxBandwidth", 2500).toInt ();
|
||||||
save_directory_ = settings_->value ("SaveDir", default_save_directory_.absolutePath ()).toString ();
|
save_directory_ = settings_->value ("SaveDir", default_save_directory_.absolutePath ()).toString ();
|
||||||
azel_directory_ = settings_->value ("AzElDir", default_azel_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 ("PTTport", rig_params_.ptt_port);
|
||||||
settings_->setValue ("SaveDir", save_directory_.absolutePath ());
|
settings_->setValue ("SaveDir", save_directory_.absolutePath ());
|
||||||
settings_->setValue ("AzElDir", azel_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_)
|
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 ());
|
data_mode_ = static_cast<DataMode> (ui_->TX_mode_button_group->checkedId ());
|
||||||
save_directory_ = ui_->save_path_display_label->text ();
|
save_directory_ = ui_->save_path_display_label->text ();
|
||||||
azel_directory_ = ui_->azel_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 ();
|
enable_VHF_features_ = ui_->enable_VHF_features_check_box->isChecked ();
|
||||||
decode_at_52s_ = ui_->decode_at_52s_check_box->isChecked ();
|
decode_at_52s_ = ui_->decode_at_52s_check_box->isChecked ();
|
||||||
single_decode_ = ui_->single_decode_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)
|
void Configuration::impl::on_calibration_intercept_spin_box_valueChanged (double)
|
||||||
{
|
{
|
||||||
rig_active_ = false; // force reset
|
rig_active_ = false; // force reset
|
||||||
|
@ -175,6 +175,8 @@ public:
|
|||||||
QStringListModel const * macros () const;
|
QStringListModel const * macros () const;
|
||||||
QDir save_directory () const;
|
QDir save_directory () const;
|
||||||
QDir azel_directory () const;
|
QDir azel_directory () const;
|
||||||
|
QString sound_dm_path() const;
|
||||||
|
QString sound_am_path() const;
|
||||||
QString rig_name () const;
|
QString rig_name () const;
|
||||||
Type2MsgGen type_2_msg_gen () const;
|
Type2MsgGen type_2_msg_gen () const;
|
||||||
QColor color_CQ () const;
|
QColor color_CQ () const;
|
||||||
|
@ -1790,6 +1790,95 @@ both here.</string>
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_13">
|
||||||
|
<property name="title">
|
||||||
|
<string>Notification Sounds</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_18">
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="sound_dm_path_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Directed Message Received:</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>azel_path_select_push_button</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLabel" name="sound_dm_path_display_label">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>1</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: rgb(255, 255, 255);</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QPushButton" name="sound_dm_path_select_push_button">
|
||||||
|
<property name="text">
|
||||||
|
<string>Select</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="3">
|
||||||
|
<widget class="QPushButton" name="sound_dm_path_reset_push_button">
|
||||||
|
<property name="text">
|
||||||
|
<string>Clear</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="sound_am_path_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Alert Message Received:</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>azel_path_select_push_button</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="QPushButton" name="sound_am_path_select_push_button">
|
||||||
|
<property name="text">
|
||||||
|
<string>Select</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="3">
|
||||||
|
<widget class="QPushButton" name="sound_am_path_reset_push_button">
|
||||||
|
<property name="text">
|
||||||
|
<string>Clear</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLabel" name="sound_am_path_display_label">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>1</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: rgb(255, 255, 255);</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="split_operation_group_box_2">
|
<widget class="QGroupBox" name="split_operation_group_box_2">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QActionGroup>
|
#include <QActionGroup>
|
||||||
#include <QSplashScreen>
|
#include <QSplashScreen>
|
||||||
|
#include <QSound>
|
||||||
|
|
||||||
#include "APRSISClient.h"
|
#include "APRSISClient.h"
|
||||||
#include "revision_utils.hpp"
|
#include "revision_utils.hpp"
|
||||||
@ -9318,6 +9319,11 @@ void MainWindow::processCommandActivity() {
|
|||||||
{"SNR", QVariant(ad.snr)},
|
{"SNR", QVariant(ad.snr)},
|
||||||
{"UTC", QVariant(ad.utcTimestamp.toMSecsSinceEpoch())}
|
{"UTC", QVariant(ad.utcTimestamp.toMSecsSinceEpoch())}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
auto wav = m_config.sound_dm_path();
|
||||||
|
if(!wav.isEmpty()){
|
||||||
|
QSound::play(wav);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// and mark the offset as a directed offset so future free text is displayed
|
// and mark the offset as a directed offset so future free text is displayed
|
||||||
@ -9489,6 +9495,11 @@ void MainWindow::processCommandActivity() {
|
|||||||
enqueueMessage(PriorityHigh, QString("%1 ACK").arg(d.from), d.freq, nullptr);
|
enqueueMessage(PriorityHigh, QString("%1 ACK").arg(d.from), d.freq, nullptr);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
auto wav = m_config.sound_am_path();
|
||||||
|
if(!wav.isEmpty()){
|
||||||
|
QSound::play(wav);
|
||||||
|
}
|
||||||
|
|
||||||
msgBox->show();
|
msgBox->show();
|
||||||
|
|
||||||
// make sure this is explicit
|
// make sure this is explicit
|
||||||
|
Loading…
Reference in New Issue
Block a user