[PTT] Make sure the "other" PTT keys light the LEDs and play notification

Remark: Eventually it would be best to really hook up with audio to
display the PTT key really consumed (instead directly consuming the action)
This commit is contained in:
Klaus Basan
2019-11-03 17:01:17 +01:00
committed by Mat Sutcliffe
parent 516a7063e5
commit 076813e866
3 changed files with 34 additions and 3 deletions

View File

@@ -82,6 +82,10 @@ namespace BlackGui
{
ui->led_Audio->setOn(!sGui->getCContextAudioBase()->isMuted());
connect(sGui->getCContextAudioBase(), &CContextAudioBase::changedMute, this, &CInfoBarStatusComponent::onMuteChanged);
// PTT as received on audio
// that also would need to be reconnected if audio is disabled/enabled
// connect(sGui->getCContextAudioBase(), &CContextAudioBase::ptt, this, &CInfoBarStatusComponent::onPttChanged, Qt::QueuedConnection);
}
QPointer<CInfoBarStatusComponent> myself(this);
@@ -262,6 +266,23 @@ namespace BlackGui
ui->led_Ptt->setOn(enabled);
}
void CInfoBarStatusComponent::onAudioPtt(bool active, PTTCOM pttcom, const CIdentifier &identifier)
{
// those here come directly from AUDIO client,
// we display COM1/2 directly, but COM is directly hooked up with onPttChanged
Q_UNUSED(identifier)
Q_UNUSED(active)
Q_UNUSED(pttcom)
/**
if (pttcom == COM1 || pttcom == COM2)
{
this->onPttChanged(active);
}
**/
}
void CInfoBarStatusComponent::onInternetAccessibleChanged(bool access)
{
if (access)