diff --git a/src/blackgui/components/audiodevicevolumesetupcomponent.cpp b/src/blackgui/components/audiodevicevolumesetupcomponent.cpp index cd53b502f..af787ed43 100644 --- a/src/blackgui/components/audiodevicevolumesetupcomponent.cpp +++ b/src/blackgui/components/audiodevicevolumesetupcomponent.cpp @@ -27,6 +27,7 @@ using namespace BlackCore; using namespace BlackCore::Afv::Clients; +using namespace BlackCore::Afv::Audio; using namespace BlackCore::Context; using namespace BlackMisc; using namespace BlackMisc::Aviation; @@ -114,6 +115,7 @@ namespace BlackGui { connect(afvClient, &CAfvClient::outputVolumePeakVU, this, &CAudioDeviceVolumeSetupComponent::onOutputVU); connect(afvClient, &CAfvClient::inputVolumePeakVU, this, &CAudioDeviceVolumeSetupComponent::onInputVU); + connect(afvClient, &CAfvClient::receivingCallsignsChanged, this, &CAudioDeviceVolumeSetupComponent::onReceivingCallsignsChanged); } } @@ -253,6 +255,11 @@ namespace BlackGui ui->hs_VolumeOut->setValue((ui->hs_VolumeOut->maximum() - ui->hs_VolumeOut->minimum()) / 2); } + void CAudioDeviceVolumeSetupComponent::onReceivingCallsignsChanged(const TransceiverReceivingCallsignsChangedArgs &args) + { + this->setInfo(args.receivingCallsigns.join(", ")); + } + CAudioDeviceInfo CAudioDeviceVolumeSetupComponent::getSelectedInputDevice() const { if (!hasAudio()) { return CAudioDeviceInfo(); } diff --git a/src/blackgui/components/audiodevicevolumesetupcomponent.h b/src/blackgui/components/audiodevicevolumesetupcomponent.h index 648734c64..f0e0d6d9c 100644 --- a/src/blackgui/components/audiodevicevolumesetupcomponent.h +++ b/src/blackgui/components/audiodevicevolumesetupcomponent.h @@ -12,6 +12,7 @@ #define BLACKGUI_COMPONENTS_AUDIODEVICEVOLUMESETUPCOMPONENT_H #include "blackgui/blackguiexport.h" +#include "blackcore/afv/audio/receiversampleprovider.h" #include "blackmisc/audio/audiosettings.h" #include "blackmisc/audio/audiodeviceinfolist.h" #include "blackmisc/settingscache.h" @@ -100,9 +101,9 @@ namespace BlackGui void onInputVU(double vu); void onReloadDevices(); - void onResetVolumeIn(); void onResetVolumeOut(); + void onReceivingCallsignsChanged(const BlackCore::Afv::Audio::TransceiverReceivingCallsignsChangedArgs &args); BlackMisc::Audio::CAudioDeviceInfo getSelectedInputDevice() const; BlackMisc::Audio::CAudioDeviceInfo getSelectedOutputDevice() const; diff --git a/src/blackgui/components/audiodevicevolumesetupcomponent.ui b/src/blackgui/components/audiodevicevolumesetupcomponent.ui index 24bdc5e69..d79b43a58 100644 --- a/src/blackgui/components/audiodevicevolumesetupcomponent.ui +++ b/src/blackgui/components/audiodevicevolumesetupcomponent.ui @@ -19,6 +19,9 @@ 24 + + %v + @@ -130,51 +133,14 @@ - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - Tx1 - - - - - - - Rec1 - - - - - - - Tx2 - - - - - - - Rec2 - - - - - - 50 + + %v + @@ -254,6 +220,40 @@ + + + + + + + Tx1 + + + + + + + Rec1 + + + + + + + Tx2 + + + + + + + Rec2 + + + + + +