diff --git a/src/blackgui/components/audionotificationcomponent.cpp b/src/blackgui/components/audionotificationcomponent.cpp index e634c1632..96ec034c8 100644 --- a/src/blackgui/components/audionotificationcomponent.cpp +++ b/src/blackgui/components/audionotificationcomponent.cpp @@ -68,6 +68,14 @@ namespace BlackGui Q_ASSERT(c); c = connect(ui->cb_SetupAudioNotificationTextCallsignMentioned, &QCheckBox::toggled, this, &CAudioNotificationComponent::onNotificationsToggled, Qt::QueuedConnection); Q_ASSERT(c); + c = connect(ui->cb_SetupAudioNotificationTextMessageSupervisor, &QCheckBox::toggled, this, &CAudioNotificationComponent::onNotificationsToggled, Qt::QueuedConnection); + Q_ASSERT(c); + c = connect(ui->cb_SetupAudioNotificationTextMessageSupervisor, &QCheckBox::toggled, this, &CAudioNotificationComponent::onNotificationsToggled, Qt::QueuedConnection); + Q_ASSERT(c); + c = connect(ui->cb_SetupAudioNotificationAtcTunedOut, &QCheckBox::toggled, this, &CAudioNotificationComponent::onNotificationsToggled, Qt::QueuedConnection); + Q_ASSERT(c); + c = connect(ui->cb_SetupAudioNotificationAtcTunedIn, &QCheckBox::toggled, this, &CAudioNotificationComponent::onNotificationsToggled, Qt::QueuedConnection); + Q_ASSERT(c); c = connect(ui->cb_SetupAudioNoTransmission, &QCheckBox::toggled, this, &CAudioNotificationComponent::onNotificationsToggled, Qt::QueuedConnection); Q_ASSERT(c); c = connect(ui->cb_SetupAfvBlocked, &QCheckBox::toggled, this, &CAudioNotificationComponent::onNotificationsToggled, Qt::QueuedConnection); @@ -93,7 +101,8 @@ namespace BlackGui ui->cb_SetupAudioPTTBlocked->isChecked() || ui->cb_SetupAudioNotificationTextMessagePrivate->isChecked() || ui->cb_SetupAudioNotificationTextMessageSupervisor->isChecked() || ui->cb_SetupAudioNotificationTextCallsignMentioned->isChecked() || ui->cb_SetupAudioNoTransmission->isChecked() || - ui->cb_SetupAfvBlocked->isChecked() || ui->cb_SetupAfvClicked->isChecked(); + ui->cb_SetupAfvBlocked->isChecked() || ui->cb_SetupAfvClicked->isChecked() || + ui->cb_SetupAudioNotificationAtcTunedIn->isChecked() || ui->cb_SetupAudioNotificationAtcTunedOut->isChecked(); } void CAudioNotificationComponent::reloadSettings() @@ -107,6 +116,8 @@ namespace BlackGui ui->cb_SetupAudioNotificationTextMessagePrivate->setChecked(as.isNotificationFlagSet(CNotificationSounds::NotificationTextMessagePrivate)); ui->cb_SetupAudioNotificationTextMessageSupervisor->setChecked(as.isNotificationFlagSet(CNotificationSounds::NotificationTextMessageSupervisor)); ui->cb_SetupAudioNotificationTextCallsignMentioned->setChecked(as.isNotificationFlagSet(CNotificationSounds::NotificationTextCallsignMentioned)); + ui->cb_SetupAudioNotificationAtcTunedIn->setChecked(as.isNotificationFlagSet(CNotificationSounds::NotificationAtcTunedIn)); + ui->cb_SetupAudioNotificationAtcTunedOut->setChecked(as.isNotificationFlagSet(CNotificationSounds::NotificationAtcTunedOut)); ui->cb_SetupAudioNoTransmission->setChecked(as.isNotificationFlagSet(CNotificationSounds::NotificationNoAudioTransmission)); ui->cb_SetupAfvBlocked->setChecked(as.isNotificationFlagSet(CNotificationSounds::AFVBlocked)); @@ -136,6 +147,9 @@ namespace BlackGui if (cb == ui->cb_SetupAudioNotificationTextCallsignMentioned) { return CNotificationSounds::NotificationTextCallsignMentioned; } if (cb == ui->cb_SetupAudioNotificationTextMessagePrivate) { return CNotificationSounds::NotificationTextMessagePrivate; } if (cb == ui->cb_SetupAudioNotificationTextMessageSupervisor) { return CNotificationSounds::NotificationTextMessageSupervisor; } + if (cb == ui->cb_SetupAudioNotificationAtcTunedIn) { return CNotificationSounds::NotificationAtcTunedIn; } + if (cb == ui->cb_SetupAudioNotificationAtcTunedOut) { return CNotificationSounds::NotificationAtcTunedOut; } + if (cb == ui->cb_SetupAudioNoTransmission) { return CNotificationSounds::NotificationNoAudioTransmission; } if (cb == ui->cb_SetupAfvBlocked) { return CNotificationSounds::AFVBlocked; } @@ -161,6 +175,9 @@ namespace BlackGui as.setNotificationFlag(CNotificationSounds::AFVBlocked, ui->cb_SetupAfvBlocked->isChecked()); as.setNotificationFlag(CNotificationSounds::AFVClicked, ui->cb_SetupAfvClicked->isChecked()); + as.setNotificationFlag(CNotificationSounds::NotificationAtcTunedOut, ui->cb_SetupAudioNotificationAtcTunedOut->isChecked()); + as.setNotificationFlag(CNotificationSounds::NotificationAtcTunedIn, ui->cb_SetupAudioNotificationAtcTunedIn->isChecked()); + const CStatusMessage msg = m_audioSettings.set(as); CLogMessage(this).preformatted(msg); diff --git a/src/blackgui/components/audionotificationcomponent.ui b/src/blackgui/components/audionotificationcomponent.ui index 287f30d7a..28db7c1b3 100644 --- a/src/blackgui/components/audionotificationcomponent.ui +++ b/src/blackgui/components/audionotificationcomponent.ui @@ -45,8 +45,8 @@ 0 0 - 296 - 295 + 285 + 304 @@ -57,6 +57,39 @@ + + + + AFV click + + + + + + + Notifications + + + Volume: + + + + + + + volume 25-100 (notifications) + + + 25 + + + 100 + + + 90 + + + @@ -96,81 +129,6 @@ - - - - notification for private text messages - - - - - - - AFV click - - - - - - - PTT click (key down) - - - - - - - volume 25-100 (notifications) - - - 25 - - - 100 - - - 90 - - - - - - - Dir.: - - - - - - - supervisor messages - - - - - - - PTT click (key up) - - - - - - - No audio transmission warning - - - - - - - Notifications - - - Volume: - - - @@ -185,6 +143,62 @@ + + + + notification for private text messages + + + + + + + Dir.: + + + + + + + ATC frequency selected + + + + + + + PTT click (key down) + + + + + + + supervisor messages + + + + + + + No audio transmission warning + + + + + + + PTT click (key up) + + + + + + + ATC frequency deselected + + + diff --git a/src/blacksound/notificationplayer.cpp b/src/blacksound/notificationplayer.cpp index bc5297c1b..c4cdbbfc9 100644 --- a/src/blacksound/notificationplayer.cpp +++ b/src/blacksound/notificationplayer.cpp @@ -62,14 +62,16 @@ namespace BlackSound const QStringList types = QSoundEffect::supportedMimeTypes(); CLogMessage(this).info(u"Notification mime types: %1") << types.join(", "); - this->updateEffect(CNotificationSounds::NotificationError, directory, "error.wav"); - this->updateEffect(CNotificationSounds::NotificationLogin, directory, "login.wav"); + this->updateEffect(CNotificationSounds::NotificationError, directory, "error.wav"); + this->updateEffect(CNotificationSounds::NotificationLogin, directory, "login.wav"); this->updateEffect(CNotificationSounds::NotificationLogoff, directory, "logoff.wav"); this->updateEffect(CNotificationSounds::NotificationTextMessagePrivate, directory, "privatemessage.wav"); this->updateEffect(CNotificationSounds::NotificationTextMessageSupervisor, directory, "supervisormessage.wav"); this->updateEffect(CNotificationSounds::NotificationTextCallsignMentioned, directory, "callsignmentioned.wav"); - this->updateEffect(CNotificationSounds::NotificationNoAudioTransmission, directory, "noaudiotransmission.wav"); - this->updateEffect(CNotificationSounds::PTTBlocked, directory, "pttblocked.wav"); + this->updateEffect(CNotificationSounds::NotificationNoAudioTransmission, directory, "noaudiotransmission.wav"); + this->updateEffect(CNotificationSounds::NotificationAtcTunedIn, directory, "atctunedin.wav"); + this->updateEffect(CNotificationSounds::NotificationAtcTunedOut, directory, "atctunedout.wav"); + this->updateEffect(CNotificationSounds::PTTBlocked, directory, "pttblocked.wav"); this->updateEffect(CNotificationSounds::PTTClickKeyDown, directory, "pttclick.wav"); this->updateEffect(CNotificationSounds::PTTClickKeyUp, directory, "pttclick.wav");