diff --git a/Configuration.cpp b/Configuration.cpp index 6dc7dc3..e88e516 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -463,15 +463,6 @@ 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_cq_path_select_push_button_clicked(); - Q_SLOT void on_sound_cq_path_test_push_button_clicked(); - Q_SLOT void on_sound_cq_path_reset_push_button_clicked(); - Q_SLOT void on_sound_dm_path_select_push_button_clicked(); - Q_SLOT void on_sound_dm_path_test_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_test_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); @@ -520,10 +511,6 @@ private: QDir default_azel_directory_; QDir azel_directory_; - QString sound_cq_path_; // cq message sound file - QString sound_dm_path_; // directed message sound file - QString sound_am_path_; // alert message sound file - QFont font_; QFont next_font_; @@ -846,9 +833,6 @@ 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_cq_path() const {return m_->sound_cq_path_;} -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_;} @@ -1437,9 +1421,6 @@ 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_cq_path_display_label->setText(sound_cq_path_); - ui_->sound_dm_path_display_label->setText(sound_dm_path_); - ui_->sound_am_path_display_label->setText(sound_am_path_); ui_->reset_activity_check_box->setChecked (reset_activity_); ui_->checkForUpdates_checkBox->setChecked (check_for_updates_); ui_->CW_id_after_73_check_box->setChecked (id_after_73_); @@ -1656,9 +1637,6 @@ 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_cq_path_ = settings_->value ("SoundCQPath", "").toString (); - sound_dm_path_ = settings_->value ("SoundDMPath", "").toString (); - sound_am_path_ = settings_->value ("SoundAMPath", "").toString (); { // @@ -1874,9 +1852,6 @@ 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 ("SoundCQPath", sound_cq_path_); - settings_->setValue ("SoundDMPath", sound_dm_path_); - settings_->setValue ("SoundAMPath", sound_am_path_); if (default_audio_input_device_selected_) { @@ -2481,9 +2456,6 @@ void Configuration::impl::accept () data_mode_ = static_cast (ui_->TX_mode_button_group->checkedId ()); save_directory_ = ui_->save_path_display_label->text (); azel_directory_ = ui_->azel_path_display_label->text (); - sound_cq_path_ = ui_->sound_cq_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 (); @@ -3131,99 +3103,6 @@ void Configuration::impl::on_azel_path_select_push_button_clicked (bool /* check } } -void Configuration::impl::on_sound_cq_path_select_push_button_clicked(){ - QStringList filters; - filters << "Audio files (*.wav)" - << "Any files (*)"; - - QFileDialog fd {this, tr ("Sound File"), ui_->sound_cq_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_cq_path_display_label->setText(fd.selectedFiles().at(0)); - } - } -} - -void Configuration::impl::on_sound_cq_path_test_push_button_clicked(){ - auto path = ui_->sound_cq_path_display_label->text(); - if(path.isEmpty()){ - return; - } - - QSound::play(path); -} - -void Configuration::impl::on_sound_cq_path_reset_push_button_clicked(){ - ui_->sound_cq_path_display_label->clear(); -} - -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_test_push_button_clicked(){ - auto path = ui_->sound_dm_path_display_label->text(); - if(path.isEmpty()){ - return; - } - - QSound::play(path); -} - -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_test_push_button_clicked(){ - auto path = ui_->sound_am_path_display_label->text(); - if(path.isEmpty()){ - return; - } - - QSound::play(path); -} - -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 diff --git a/Configuration.hpp b/Configuration.hpp index a0d6b81..ae528f9 100644 --- a/Configuration.hpp +++ b/Configuration.hpp @@ -198,9 +198,6 @@ public: QStringListModel const * macros () const; QDir save_directory () const; QDir azel_directory () const; - QString sound_cq_path() const; - QString sound_dm_path() const; - QString sound_am_path() const; QString rig_name () const; Type2MsgGen type_2_msg_gen () const; QColor color_table_background() const; diff --git a/Configuration.ui b/Configuration.ui index 9cb3a22..97b991a 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -2972,203 +2972,6 @@ QListView::item:hover { - - - &Notifications - - - - - - Notification Sounds - - - - - - - 0 - - - 0 - - - - - Test - - - - - - - Clear - - - - - - - Clear - - - - - - - CQ Message Received: - - - azel_path_select_push_button - - - - - - - - 1 - 0 - - - - background-color: rgb(255, 255, 255); - - - TextLabel - - - - - - - Relay/Alert Message Received: - - - azel_path_select_push_button - - - - - - - Select - - - - - - - - 1 - 0 - - - - background-color: rgb(255, 255, 255); - - - TextLabel - - - - - - - Select - - - - - - - Directed Message Received: - - - azel_path_select_push_button - - - - - - - Test - - - - - - - - 1 - 0 - - - - background-color: rgb(255, 255, 255); - - - TextLabel - - - - - - - Select - - - - - - - Test - - - - - - - Clear - - - - - - - - - - - true - - - - Notification sounds are played over the default system soundcard. Special care must be taken while using VOX to ensure notification sounds are not transmitted. - - - true - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - &UI @@ -4254,15 +4057,6 @@ soundcard changes add_macro_line_edit delete_macro_push_button macros_list_view - sound_am_path_test_push_button - sound_dm_path_reset_push_button - sound_am_path_reset_push_button - sound_dm_path_select_push_button - sound_am_path_select_push_button - sound_dm_path_test_push_button - sound_cq_path_select_push_button - sound_cq_path_test_push_button - sound_cq_path_reset_push_button font_push_button tabWidget scrollArea_8 diff --git a/mainwindow.cpp b/mainwindow.cpp index 91bb4d7..fbcda97 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -4367,8 +4367,7 @@ void MainWindow::readFromStdout() //readFromStdout // it is not processed elsewhere, so we need to just log it here. logCallActivity(cd, true); - // play cq notification - playSoundNotification(m_config.sound_cq_path()); + // TODO: jsherer - notification for cq? } else { // convert HEARTBEAT to a directed command and process... @@ -4595,7 +4594,7 @@ void MainWindow::readFromStdout() //readFromStdout // See MainWindow::postDecode for displaying the latest decodes } -void MainWindow::playSoundNotification(const QString &path){ +void MainWindow::playSoundFile(const QString &path){ if(path.isEmpty()){ return; } @@ -10485,8 +10484,7 @@ void MainWindow::processCommandActivity() { // if we've received a message to be displayed, we should bump the repeat buttons... resetAutomaticIntervalTransmissions(true, false); - // and we should play the sound notification if there is one... - playSoundNotification(m_config.sound_dm_path()); + // TODO: jsherer - notification for direct message? } } @@ -11212,7 +11210,7 @@ void MainWindow::processAlertReplyForCommand(CommandDetail d, QString from, QStr } }); - playSoundNotification(m_config.sound_am_path()); + // TODO: jsherer - notification for alert? msgBox->setModal(false); msgBox->show(); diff --git a/mainwindow.h b/mainwindow.h index 5981af2..79295b7 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -134,7 +134,7 @@ public slots: void msgAvgDecode2(); void fastPick(int x0, int x1, int y); - void playSoundNotification(const QString &path); + void playSoundFile(const QString &path); bool hasExistingMessageBufferToMe(int *pOffset); bool hasExistingMessageBuffer(int offset, bool drift, int *pPrevOffset); void logCallActivity(CallDetail d, bool spot=true);