mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Ref T731, display received callsigns
This commit is contained in:
committed by
Mat Sutcliffe
parent
7c89234f8c
commit
76fd0cfc91
@@ -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(); }
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
<property name="value">
|
||||
<number>24</number>
|
||||
</property>
|
||||
<property name="format">
|
||||
<string>%v</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
@@ -130,51 +133,14 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QFrame" name="fr_TxRec">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cb_1Tx">
|
||||
<property name="text">
|
||||
<string>Tx1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cb_1Rec">
|
||||
<property name="text">
|
||||
<string>Rec1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cb_2Tx">
|
||||
<property name="text">
|
||||
<string>Tx2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cb_2Rec">
|
||||
<property name="text">
|
||||
<string>Rec2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QProgressBar" name="pb_LevelIn">
|
||||
<property name="value">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="format">
|
||||
<string>%v</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
@@ -254,6 +220,40 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QFrame" name="fr_TxRec">
|
||||
<layout class="QHBoxLayout" name="hl_TxRec">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cb_1Tx">
|
||||
<property name="text">
|
||||
<string>Tx1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cb_1Rec">
|
||||
<property name="text">
|
||||
<string>Rec1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cb_2Tx">
|
||||
<property name="text">
|
||||
<string>Tx2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cb_2Rec">
|
||||
<property name="text">
|
||||
<string>Rec2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
|
||||
Reference in New Issue
Block a user