mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
PTT click sound as a follow up of Ref T494
This commit is contained in:
committed by
Mat Sutcliffe
parent
427c23c5e4
commit
d28b09141b
@@ -461,6 +461,12 @@ void SwiftGuiStd::displayLog()
|
||||
ui->comp_MainInfoArea->displayLog();
|
||||
}
|
||||
|
||||
void SwiftGuiStd::onPttChanged(bool enabled)
|
||||
{
|
||||
if (!enabled) { return; }
|
||||
sGui->getIContextAudio()->playNotification(CNotificationSounds::PTTClick, true);
|
||||
}
|
||||
|
||||
void SwiftGuiStd::displayDBusReconnectDialog()
|
||||
{
|
||||
if (m_displayingDBusReconnect) { return; }
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "blackcore/network.h"
|
||||
#include "blackmisc/simulation/simulatedaircraft.h"
|
||||
#include "blackmisc/audio/notificationsounds.h"
|
||||
#include "blackmisc/icons.h"
|
||||
#include "blackmisc/identifiable.h"
|
||||
#include "blackmisc/loghandler.h"
|
||||
#include "blackmisc/statusmessage.h"
|
||||
@@ -100,6 +101,7 @@ private:
|
||||
QScopedPointer<Ui::SwiftGuiStd> ui;
|
||||
QScopedPointer<BlackGui::Components::CNavigatorDialog> m_navigator{ new BlackGui::Components::CNavigatorDialog() }; //!< navigator dialog bar, if I pass the parent, the dialog is always centered over the parent
|
||||
QScopedPointer<BlackGui::Components::CDbLoadDataDialog> m_dbLoadDialog; //!< load DB data, lazy init UI component
|
||||
BlackCore::CActionBind m_actionPtt { "/Voice/Activate push-to-talk", BlackMisc::CIcons::radio16(), this, &SwiftGuiStd::onPttChanged };
|
||||
BlackCore::CActionBindings m_menuHotkeyHandlers;
|
||||
BlackGui::CManagedStatusBar m_statusBar;
|
||||
BlackMisc::CLogSubscriber m_logSubscriber { this, &SwiftGuiStd::displayStatusMessageInGui };
|
||||
@@ -169,6 +171,9 @@ private:
|
||||
//! Display a reconnect dialog
|
||||
void displayDBusReconnectDialog();
|
||||
|
||||
//! PTT changed
|
||||
void onPttChanged(bool enabled);
|
||||
|
||||
//
|
||||
// Data receiving related funtions
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user