diff --git a/src/blackgui/components/audiodevicevolumesetupcomponent.cpp b/src/blackgui/components/audiodevicevolumesetupcomponent.cpp new file mode 100644 index 000000000..5a7add54c --- /dev/null +++ b/src/blackgui/components/audiodevicevolumesetupcomponent.cpp @@ -0,0 +1,174 @@ +/* Copyright (C) 2019 + * swift project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution. No part of swift project, including this file, may be copied, modified, propagated, + * or distributed except according to the terms contained in the LICENSE file. + */ + +#include "blackcore/context/contextaudio.h" +#include "blackgui/components/audiodevicevolumesetupcomponent.h" +#include "blackgui/guiapplication.h" +#include "blackmisc/audio/audiodeviceinfo.h" +#include "blackmisc/audio/notificationsounds.h" +#include "blackmisc/audio/audiosettings.h" +#include "blackmisc/sequence.h" +#include "ui_audiodevicevolumesetupcomponent.h" + +#include +#include +#include +#include +#include +#include + +using namespace BlackCore; +using namespace BlackCore::Context; +using namespace BlackMisc; +using namespace BlackMisc::Aviation; +using namespace BlackMisc::Audio; +using namespace BlackMisc::PhysicalQuantities; + +namespace BlackGui +{ + namespace Components + { + CAudioDeviceVolumeSetupComponent::CAudioDeviceVolumeSetupComponent(QWidget *parent) : + QFrame(parent), + ui(new Ui::CAudioDeviceVolumeSetupComponent) + { + ui->setupUi(this); + + // deferred init, because in a distributed swift system + // it takes a moment until the settings are sychronized + // this is leading to undesired "save settings" messages and played sounds + QPointer myself(this); + QTimer::singleShot(2500, this, [ = ] + { + if (!myself || !sGui || sGui->isShuttingDown()) { return; } + this->init(); + }); + } + + void CAudioDeviceVolumeSetupComponent::init() + { + if (!sGui || sGui->isShuttingDown() || !sGui->getIContextAudio()) { return; } + + // audio is optional + const bool audio = this->hasAudio(); + this->setEnabled(audio); + this->reloadSettings(); + + bool c = connect(ui->cb_SetupAudioLoopback, &QCheckBox::toggled, this, &CAudioDeviceVolumeSetupComponent::onLoopbackToggled); + Q_ASSERT(c); + + if (audio) + { + ui->le_ExtraInfo->setText(audio ? sGui->getIContextAudio()->audioRunsWhereInfo() : "No audio, cannot change."); + + this->initAudioDeviceLists(); + + // default + ui->cb_SetupAudioLoopback->setChecked(sGui->getIContextAudio()->isAudioLoopbackEnabled()); + + // the connects depend on initAudioDeviceLists + c = connect(ui->cb_SetupAudioInputDevice, qOverload(&QComboBox::currentIndexChanged), this, &CAudioDeviceVolumeSetupComponent::onAudioDeviceSelected); + Q_ASSERT(c); + c = connect(ui->cb_SetupAudioOutputDevice, qOverload(&QComboBox::currentIndexChanged), this, &CAudioDeviceVolumeSetupComponent::onAudioDeviceSelected); + Q_ASSERT(c); + + // context + c = connect(sGui->getIContextAudio(), &IContextAudio::changedAudioDevices, this, &CAudioDeviceVolumeSetupComponent::onAudioDevicesChanged, Qt::QueuedConnection); + Q_ASSERT(c); + c = connect(sGui->getIContextAudio(), &IContextAudio::changedSelectedAudioDevices, this, &CAudioDeviceVolumeSetupComponent::onCurrentAudioDevicesChanged, Qt::QueuedConnection); + Q_ASSERT(c); + } + Q_UNUSED(c); + } + + CAudioDeviceVolumeSetupComponent::~CAudioDeviceVolumeSetupComponent() + { } + + void CAudioDeviceVolumeSetupComponent::reloadSettings() + { + const CSettings as(m_audioSettings.getThreadLocal()); + } + + void CAudioDeviceVolumeSetupComponent::initAudioDeviceLists() + { + if (!this->hasAudio()) { return; } + this->onAudioDevicesChanged(sGui->getIContextAudio()->getAudioDevices()); + this->onCurrentAudioDevicesChanged(sGui->getIContextAudio()->getCurrentAudioDevices()); + } + + bool CAudioDeviceVolumeSetupComponent::hasAudio() const + { + return sGui && sGui->getIContextAudio() && !sGui->getIContextAudio()->isEmptyObject(); + } + + void CAudioDeviceVolumeSetupComponent::onAudioDeviceSelected(int index) + { + if (!sGui || sGui->isShuttingDown() || !sGui->getIContextAudio()) { return; } + if (index < 0) { return; } + + CAudioDeviceInfoList devices = sGui->getIContextAudio()->getAudioDevices(); + if (devices.isEmpty()) { return; } + CAudioDeviceInfo selectedDevice; + const QObject *sender = QObject::sender(); + if (sender == ui->cb_SetupAudioInputDevice) + { + const CAudioDeviceInfoList inputDevices = devices.getInputDevices(); + if (index >= inputDevices.size()) { return; } + selectedDevice = inputDevices[index]; + sGui->getIContextAudio()->setCurrentAudioDevice(selectedDevice); + } + else if (sender == ui->cb_SetupAudioOutputDevice) + { + const CAudioDeviceInfoList outputDevices = devices.getOutputDevices(); + if (index >= outputDevices.size()) { return; } + selectedDevice = outputDevices[index]; + sGui->getIContextAudio()->setCurrentAudioDevice(selectedDevice); + } + } + + void CAudioDeviceVolumeSetupComponent::onCurrentAudioDevicesChanged(const CAudioDeviceInfoList &devices) + { + for (auto &device : devices) + { + if (device.getType() == CAudioDeviceInfo::InputDevice) + { + ui->cb_SetupAudioInputDevice->setCurrentText(device.toQString(true)); + } + else if (device.getType() == CAudioDeviceInfo::OutputDevice) + { + ui->cb_SetupAudioOutputDevice->setCurrentText(device.toQString(true)); + } + } + } + + void CAudioDeviceVolumeSetupComponent::onAudioDevicesChanged(const CAudioDeviceInfoList &devices) + { + ui->cb_SetupAudioOutputDevice->clear(); + ui->cb_SetupAudioInputDevice->clear(); + + for (const CAudioDeviceInfo &device : devices) + { + if (device.getType() == CAudioDeviceInfo::InputDevice) + { + ui->cb_SetupAudioInputDevice->addItem(device.toQString(true)); + } + else if (device.getType() == CAudioDeviceInfo::OutputDevice) + { + ui->cb_SetupAudioOutputDevice->addItem(device.toQString(true)); + } + } + } + + void CAudioDeviceVolumeSetupComponent::onLoopbackToggled(bool loopback) + { + if (!sGui || sGui->isShuttingDown() || !sGui->getIContextAudio()) { return; } + if (sGui->getIContextAudio()->isAudioLoopbackEnabled() == loopback) { return; } + sGui->getIContextAudio()->enableAudioLoopback(loopback); + } + } // namespace +} // namespace diff --git a/src/blackgui/components/audiodevicevolumesetupcomponent.h b/src/blackgui/components/audiodevicevolumesetupcomponent.h new file mode 100644 index 000000000..0e57ff6ab --- /dev/null +++ b/src/blackgui/components/audiodevicevolumesetupcomponent.h @@ -0,0 +1,76 @@ +/* Copyright (C) 2019 + * swift project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution. No part of swift project, including this file, may be copied, modified, propagated, + * or distributed except according to the terms contained in the LICENSE file. + */ + +//! \file + +#ifndef BLACKGUI_COMPONENTS_AUDIODEVICEVOLUMESETUPCOMPONENT_H +#define BLACKGUI_COMPONENTS_AUDIODEVICEVOLUMESETUPCOMPONENT_H + +#include "blackgui/blackguiexport.h" +#include "blackmisc/audio/audiosettings.h" +#include "blackmisc/audio/audiodeviceinfolist.h" +#include "blackmisc/settingscache.h" + +#include +#include +#include +#include + +namespace Ui { class CAudioDeviceVolumeSetupComponent; } +namespace BlackGui +{ + namespace Components + { + //! Audio setup such as input / output devices + class BLACKGUI_EXPORT CAudioDeviceVolumeSetupComponent : public QFrame + { + Q_OBJECT + + public: + //! Constructor + explicit CAudioDeviceVolumeSetupComponent(QWidget *parent = nullptr); + + //! Destructor + virtual ~CAudioDeviceVolumeSetupComponent() override; + + private: + //! Init + void init(); + + //! Reload settings + void reloadSettings(); + + //! Audio device selected + //! \param index audio device index (COM1, COM2) + void onAudioDeviceSelected(int index); + + //! Current audio devices changed + void onCurrentAudioDevicesChanged(const BlackMisc::Audio::CAudioDeviceInfoList &devices); + + //! Audio devices changed + void onAudioDevicesChanged(const BlackMisc::Audio::CAudioDeviceInfoList &devices); + + //! Loopback toggled + void onLoopbackToggled(bool loopback); + + //! Notification flags toggled + void onNotificationsToggled(bool checked); + + //! Audio device lists from settings + void initAudioDeviceLists(); + + //! Audio is optional, check if available + bool hasAudio() const; + + QScopedPointer ui; + BlackMisc::CSetting m_audioSettings { this, &CAudioDeviceVolumeSetupComponent::reloadSettings }; + }; + } // namespace +} // namespace + +#endif // guard diff --git a/src/blackgui/components/audiodevicevolumesetupcomponent.ui b/src/blackgui/components/audiodevicevolumesetupcomponent.ui new file mode 100644 index 000000000..87d246ffb --- /dev/null +++ b/src/blackgui/components/audiodevicevolumesetupcomponent.ui @@ -0,0 +1,147 @@ + + + CAudioDeviceVolumeSetupComponent + + + + 0 + 0 + 194 + 216 + + + + Audio setup + + + + + + true + + + extra info goes here + + + + + + + 24 + + + + + + + QComboBox::AdjustToMinimumContentsLength + + + + + + + Out + + + + + + + In + + + + + + + Out + + + + + + + 50 + + + Qt::Horizontal + + + + + + + Loopback, test sound in- to output + + + + + + + QComboBox::AdjustToMinimumContentsLength + + + true + + + + + + + 24 + + + + + + + In + + + + + + + 50 + + + Qt::Horizontal + + + + + + + Info + + + + + + + Test + + + + + + + Disable realistic audio simulation + + + + + + + le_ExtraInfo + cb_SetupAudioInputDevice + cb_SetupAudioOutputDevice + checkBox + cb_SetupAudioLoopback + hs_VolumeIn + hs_VolumeOut + + + + diff --git a/src/blackgui/components/audionotificationcomponent.cpp b/src/blackgui/components/audionotificationcomponent.cpp new file mode 100644 index 000000000..571a64d29 --- /dev/null +++ b/src/blackgui/components/audionotificationcomponent.cpp @@ -0,0 +1,189 @@ +/* Copyright (C) 2019 + * swift project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution. No part of swift project, including this file, may be copied, modified, propagated, + * or distributed except according to the terms contained in the LICENSE file. + */ + +#include "blackgui/components/audionotificationcomponent.h" +#include "blackgui/guiapplication.h" +#include "blackcore/context/contextaudio.h" +#include "blackmisc/audio/audiodeviceinfo.h" +#include "blackmisc/audio/notificationsounds.h" +#include "blackmisc/audio/audiosettings.h" +#include "blackmisc/sequence.h" +#include "ui_audionotificationcomponent.h" + +#include +#include +#include +#include +#include +#include + +using namespace BlackCore; +using namespace BlackCore::Context; +using namespace BlackMisc; +using namespace BlackMisc::Aviation; +using namespace BlackMisc::Audio; +using namespace BlackMisc::PhysicalQuantities; + +namespace BlackGui +{ + namespace Components + { + CAudioNotificationComponent::CAudioNotificationComponent(QWidget *parent) : + QFrame(parent), + ui(new Ui::CAudioNotificationComponent) + { + ui->setupUi(this); + + // deferred init, because in a distributed swift system + // it takes a moment until the settings are sychronized + // this is leading to undesired "save settings" messages and played sounds + QPointer myself(this); + QTimer::singleShot(2500, this, [ = ] + { + if (!myself || !sGui || sGui->isShuttingDown()) { return; } + this->init(); + }); + } + + void CAudioNotificationComponent::init() + { + if (!sGui || sGui->isShuttingDown()) { return; } + this->reloadSettings(); + + // checkboxes for notifications + bool c = connect(ui->cb_SetupAudioPTTClickDown, &QCheckBox::toggled, this, &CAudioNotificationComponent::onNotificationsToggled, Qt::QueuedConnection); + Q_ASSERT(c); + c = connect(ui->cb_SetupAudioPTTClickUp, &QCheckBox::toggled, this, &CAudioNotificationComponent::onNotificationsToggled, Qt::QueuedConnection); + Q_ASSERT(c); + c = connect(ui->cb_SetupAudioNotificationVoiceRoomLeft, &QCheckBox::toggled, this, &CAudioNotificationComponent::onNotificationsToggled, Qt::QueuedConnection); + Q_ASSERT(c); + c = connect(ui->cb_SetupAudioNotificationVoiceRoomJoined, &QCheckBox::toggled, this, &CAudioNotificationComponent::onNotificationsToggled, Qt::QueuedConnection); + Q_ASSERT(c); + c = connect(ui->cb_SetupAudioNotificationTextMessagePrivate, &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_SetupAudioNotificationTextCallsignMentioned, &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->pb_SoundReset, &QPushButton::released, this, &CAudioNotificationComponent::resetNotificationSoundsDir, Qt::QueuedConnection); + Q_ASSERT(c); + c = connect(ui->pb_SoundDir, &QPushButton::released, this, &CAudioNotificationComponent::selectNotificationSoundsDir, Qt::QueuedConnection); + Q_ASSERT(c); + + // volumes + c = connect(ui->sb_NotificationValueVolume, qOverload(&QSpinBox::valueChanged), this, &CAudioNotificationComponent::onNotificationVolumeChanged); + Q_ASSERT(c); + } + + CAudioNotificationComponent::~CAudioNotificationComponent() + { } + + bool CAudioNotificationComponent::playNotificationSounds() const + { + return ui->cb_SetupAudioPTTClickDown->isChecked() || ui->cb_SetupAudioPTTClickUp->isChecked() || + ui->cb_SetupAudioNotificationTextMessagePrivate->isChecked() || ui->cb_SetupAudioNotificationTextMessageSupervisor->isChecked() || + ui->cb_SetupAudioNotificationVoiceRoomLeft->isChecked() || ui->cb_SetupAudioNotificationVoiceRoomJoined->isChecked() || + ui->cb_SetupAudioNotificationTextCallsignMentioned->isChecked() || ui->cb_SetupAudioNoTransmission->isChecked(); + } + + void CAudioNotificationComponent::reloadSettings() + { + const CSettings as(m_audioSettings.getThreadLocal()); + + ui->cb_SetupAudioPTTClickDown->setChecked(as.isNotificationFlagSet(CNotificationSounds::PTTClickKeyDown)); + ui->cb_SetupAudioPTTClickUp->setChecked(as.isNotificationFlagSet(CNotificationSounds::PTTClickKeyUp)); + + ui->cb_SetupAudioNotificationVoiceRoomLeft->setChecked(as.isNotificationFlagSet(CNotificationSounds::NotificationVoiceRoomLeft)); + ui->cb_SetupAudioNotificationVoiceRoomJoined->setChecked(as.isNotificationFlagSet(CNotificationSounds::NotificationVoiceRoomJoined)); + 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_SetupAudioNoTransmission->setChecked(as.isNotificationFlagSet(CNotificationSounds::NotificationNoAudioTransmission)); + + ui->le_SoundDir->setText(as.getNotificationSoundDirectory()); + ui->sb_NotificationValueVolume->setValue(as.getNotificationVolume()); + } + + void CAudioNotificationComponent::onNotificationVolumeChanged(int volume) + { + volume = qMax(25, qMin(100, volume)); + CSettings as(m_audioSettings.getThreadLocal()); + if (as.getNotificationVolume() == volume) { return; } + as.setNotificationVolume(volume); + m_audioSettings.set(as); + } + + CNotificationSounds::NotificationFlag CAudioNotificationComponent::checkBoxToFlag(const QCheckBox *cb) const + { + if (!cb) { return CNotificationSounds::NoNotifications; } + + if (cb == ui->cb_SetupAudioPTTClickDown) { return CNotificationSounds::PTTClickKeyDown; } + if (cb == ui->cb_SetupAudioPTTClickUp) { return CNotificationSounds::PTTClickKeyUp; } + + if (cb == ui->cb_SetupAudioNotificationVoiceRoomJoined) { return CNotificationSounds::NotificationVoiceRoomJoined; } + if (cb == ui->cb_SetupAudioNotificationVoiceRoomLeft) { return CNotificationSounds::NotificationVoiceRoomLeft; } + 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_SetupAudioNoTransmission) { return CNotificationSounds::NotificationNoAudioTransmission; } + return CNotificationSounds::NoNotifications; + } + + void CAudioNotificationComponent::onNotificationsToggled(bool checked) + { + if (!sGui || sGui->isShuttingDown() || !sGui->getIContextAudio()) { return; } + CSettings as(m_audioSettings.getThreadLocal()); + + as.setNotificationFlag(CNotificationSounds::PTTClickKeyDown, ui->cb_SetupAudioPTTClickDown->isChecked()); + as.setNotificationFlag(CNotificationSounds::PTTClickKeyUp, ui->cb_SetupAudioPTTClickUp->isChecked()); + + as.setNotificationFlag(CNotificationSounds::NotificationVoiceRoomLeft, ui->cb_SetupAudioNotificationVoiceRoomLeft->isChecked()); + as.setNotificationFlag(CNotificationSounds::NotificationVoiceRoomJoined, ui->cb_SetupAudioNotificationVoiceRoomJoined->isChecked()); + as.setNotificationFlag(CNotificationSounds::NotificationTextMessagePrivate, ui->cb_SetupAudioNotificationTextMessagePrivate->isChecked()); + as.setNotificationFlag(CNotificationSounds::NotificationTextMessageSupervisor, ui->cb_SetupAudioNotificationTextMessageSupervisor->isChecked()); + as.setNotificationFlag(CNotificationSounds::NotificationTextCallsignMentioned, ui->cb_SetupAudioNotificationTextCallsignMentioned->isChecked()); + as.setNotificationFlag(CNotificationSounds::NotificationNoAudioTransmission, ui->cb_SetupAudioNoTransmission->isChecked()); + + const CStatusMessage msg = m_audioSettings.set(as); + CLogMessage(this).preformatted(msg); + + const QCheckBox *sender = qobject_cast(QObject::sender()); + if (checked && sGui && sGui->getIContextAudio() && sender) + { + const CNotificationSounds::NotificationFlag f = this->checkBoxToFlag(sender); + sGui->getIContextAudio()->playNotification(f, false, as.getNotificationVolume()); + } + } + + void CAudioNotificationComponent::selectNotificationSoundsDir() + { + CSettings s = m_audioSettings.get(); + const QString dir = QFileDialog::getExistingDirectory(this, QStringLiteral("Open directory"), s.getNotificationSoundDirectory(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); + const QDir d(dir); + if (d.exists()) + { + s.setNotificationSoundDirectory(dir); + ui->le_SoundDir->setText(s.getNotificationSoundDirectory()); + const CStatusMessage m = m_audioSettings.setAndSave(s); + CLogMessage::preformatted(m); + } + } + + void CAudioNotificationComponent::resetNotificationSoundsDir() + { + CSettings s = m_audioSettings.get(); + s.setNotificationSoundDirectory(""); + const CStatusMessage m = m_audioSettings.setAndSave(s); + CLogMessage::preformatted(m); + ui->le_SoundDir->clear(); + } + + } // namespace +} // namespace diff --git a/src/blackgui/components/audionotificationcomponent.h b/src/blackgui/components/audionotificationcomponent.h new file mode 100644 index 000000000..1add59161 --- /dev/null +++ b/src/blackgui/components/audionotificationcomponent.h @@ -0,0 +1,72 @@ +/* Copyright (C) 2019 + * swift project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution. No part of swift project, including this file, may be copied, modified, propagated, + * or distributed except according to the terms contained in the LICENSE file. + */ + +//! \file + +#ifndef BLACKGUI_AUDIONOTIFICATION_COMPONENT_H +#define BLACKGUI_AUDIONOTIFICATION_COMPONENT_H + +#include "blackgui/blackguiexport.h" +#include "blackmisc/audio/audiosettings.h" +#include "blackmisc/audio/audiodeviceinfolist.h" +#include "blackmisc/settingscache.h" + +#include +#include +#include +#include + +namespace Ui { class CAudioNotificationComponent; } +namespace BlackGui +{ + namespace Components + { + //! Audio component, volume, ... + class BLACKGUI_EXPORT CAudioNotificationComponent : public QFrame + { + Q_OBJECT + + public: + //! Constructor + explicit CAudioNotificationComponent(QWidget *parent = nullptr); + + //! Destructor + virtual ~CAudioNotificationComponent() override; + + //! Play any sounds? + bool playNotificationSounds() const; + + private: + //! Init + void init(); + + //! Reload settings + void reloadSettings(); + + //! Notification flags toggled + void onNotificationsToggled(bool checked); + + //! Notification sounds dir + void selectNotificationSoundsDir(); + + //! Notification sounds dir + void resetNotificationSoundsDir(); + + //! Volume has been changed + void onNotificationVolumeChanged(int volume); + + //! CheckBox to flag + BlackMisc::Audio::CNotificationSounds::NotificationFlag checkBoxToFlag(const QCheckBox *cb) const; + + QScopedPointer ui; + BlackMisc::CSetting m_audioSettings { this, &CAudioNotificationComponent::reloadSettings }; + }; + } // namespace +} // namespace + +#endif // guard diff --git a/src/blackgui/components/audionotificationcomponent.ui b/src/blackgui/components/audionotificationcomponent.ui new file mode 100644 index 000000000..450014036 --- /dev/null +++ b/src/blackgui/components/audionotificationcomponent.ui @@ -0,0 +1,196 @@ + + + CAudioNotificationComponent + + + + 200 + 200 + + + + Notification + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + true + + + + + 0 + 0 + 241 + 238 + + + + + + + PTT click (key up) + + + + + + + Dir.: + + + + + + + No audio transmission warning + + + + + + + notfication for text msg. with my callsign + + + + + + + PTT click (key down) + + + + + + + supervisor messages + + + + + + + volume 25-100 (notifications) + + + 25 + + + 100 + + + 90 + + + + + + + notification leaving a voice room + + + + + + + Notifications + + + Volume: + + + + + + + notification joining a voice room + + + + + + + notification for private text messages + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + your private sound directory + + + + + + + reset + + + + + + + [...] + + + + + + + + + + + + + + sa_AudioComponent + le_SoundDir + pb_SoundReset + pb_SoundDir + sb_NotificationValueVolume + cb_SetupAudioNotificationTextMessagePrivate + cb_SetupAudioNotificationTextMessageSupervisor + cb_SetupAudioNotificationTextCallsignMentioned + cb_SetupAudioNotificationVoiceRoomJoined + cb_SetupAudioNotificationVoiceRoomLeft + cb_SetupAudioNoTransmission + cb_SetupAudioPTTClickDown + cb_SetupAudioPTTClickUp + + + + diff --git a/src/blackgui/components/cockpitinfoareacomponent.ui b/src/blackgui/components/cockpitinfoareacomponent.ui index fc45f7a12..d9500f819 100644 --- a/src/blackgui/components/cockpitinfoareacomponent.ui +++ b/src/blackgui/components/cockpitinfoareacomponent.ui @@ -6,7 +6,7 @@ 0 0 - 161 + 357 55 @@ -42,13 +42,7 @@ - - - - 0 - 0 - - + false @@ -59,12 +53,12 @@ Qt::BottomDockWidgetArea - Voice rooms + Devices and volumes 8 - + 0 @@ -82,7 +76,7 @@ 0 - + QFrame::NoFrame @@ -109,14 +103,7 @@ 0 - - - QFrame::StyledPanel - - - QFrame::Raised - - + @@ -124,13 +111,7 @@ - - - - 0 - 0 - - + false @@ -141,12 +122,12 @@ Qt::BottomDockWidgetArea - Audio + Notifications 8 - + 0 @@ -164,7 +145,7 @@ 0 - + QFrame::NoFrame @@ -191,12 +172,9 @@ 0 - - - QFrame::StyledPanel - + - QFrame::Raised + QFrame::Sunken @@ -215,15 +193,15 @@ 1 - BlackGui::Components::CVoiceRoomsComponent + BlackGui::Components::CAudioDeviceVolumeSetupComponent QFrame -
blackgui/components/voiceroomscomponent.h
+
blackgui/components/audiodevicevolumesetupcomponent.h
1
- BlackGui::Components::CAudioComponent + BlackGui::Components::CAudioNotificationComponent QFrame -
blackgui/components/audiocomponent.h
+
blackgui/components/audionotificationcomponent.h
1