mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
Ref T609, encapsulate PTT action/key
This commit is contained in:
@@ -33,17 +33,6 @@ namespace BlackCore
|
||||
return s;
|
||||
}
|
||||
|
||||
const QString &IContextAudio::pttHotkeyAction()
|
||||
{
|
||||
static const QString s("/Voice/Activate push-to-talk");
|
||||
return s;
|
||||
}
|
||||
|
||||
const QPixmap &IContextAudio::pttHotkeyIcon()
|
||||
{
|
||||
return CIcons::radio16();
|
||||
}
|
||||
|
||||
IContextAudio *IContextAudio::create(CCoreFacade *runtime, CCoreFacadeConfig::ContextMode mode, CDBusServer *server, QDBusConnection &connection)
|
||||
{
|
||||
switch (mode)
|
||||
|
||||
@@ -72,12 +72,6 @@ namespace BlackCore
|
||||
//! Object path
|
||||
static const QString &ObjectPath();
|
||||
|
||||
//! Hotkey identifier for PTT (push to talk)
|
||||
static const QString &pttHotkeyAction();
|
||||
|
||||
//! Hotkey icon for PTT (push to talk)
|
||||
static const QPixmap &pttHotkeyIcon();
|
||||
|
||||
//! \copydoc CContext::getPathAndContextId()
|
||||
virtual QString getPathAndContextId() const override { return this->buildPathAndContextId(ObjectPath()); }
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "blackmisc/audio/audiodeviceinfolist.h"
|
||||
#include "blackmisc/audio/notificationsounds.h"
|
||||
#include "blackmisc/audio/voiceroomlist.h"
|
||||
#include "blackmisc/input/actionhotkeydefs.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include "blackmisc/aviation/comsystem.h"
|
||||
#include "blackmisc/aviation/selcal.h"
|
||||
@@ -140,7 +141,7 @@ namespace BlackCore
|
||||
//! Voice channel by room
|
||||
QSharedPointer<IVoiceChannel> getVoiceChannelBy(const BlackMisc::Audio::CVoiceRoom &voiceRoom);
|
||||
|
||||
CActionBind m_actionPtt { pttHotkeyAction(), pttHotkeyIcon(), this, &CContextAudio::setVoiceTransmission };
|
||||
CActionBind m_actionPtt { BlackMisc::Input::pttHotkeyAction(), BlackMisc::Input::pttHotkeyIcon(), this, &CContextAudio::setVoiceTransmission };
|
||||
|
||||
std::unique_ptr<IVoice> m_voice; //!< underlying voice lib
|
||||
std::unique_ptr<IAudioMixer> m_audioMixer;
|
||||
|
||||
Reference in New Issue
Block a user