mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
refs #912, icon and identifier for PTT hotkey as static functions
This commit is contained in:
committed by
Mathew Sutcliffe
parent
422e6626c8
commit
08f6f3f81c
@@ -14,11 +14,37 @@
|
||||
#include "blackcore/context/contextaudioimpl.h"
|
||||
#include "blackcore/context/contextaudioproxy.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#include "blackmisc/icons.h"
|
||||
|
||||
using namespace BlackMisc;
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
namespace Context
|
||||
{
|
||||
const QString &IContextAudio::InterfaceName()
|
||||
{
|
||||
static const QString s(BLACKCORE_CONTEXTAUDIO_INTERFACENAME);
|
||||
return s;
|
||||
}
|
||||
|
||||
const QString &IContextAudio::ObjectPath()
|
||||
{
|
||||
static const QString s(BLACKCORE_CONTEXTAUDIO_OBJECTPATH);
|
||||
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, BlackMisc::CDBusServer *server, QDBusConnection &conn)
|
||||
{
|
||||
switch (mode)
|
||||
|
||||
@@ -65,18 +65,16 @@ namespace BlackCore
|
||||
|
||||
public:
|
||||
//! Interface name
|
||||
static const QString &InterfaceName()
|
||||
{
|
||||
static QString s(BLACKCORE_CONTEXTAUDIO_INTERFACENAME);
|
||||
return s;
|
||||
}
|
||||
static const QString &InterfaceName();
|
||||
|
||||
//! Object path
|
||||
static const QString &ObjectPath()
|
||||
{
|
||||
static QString s(BLACKCORE_CONTEXTAUDIO_OBJECTPATH);
|
||||
return s;
|
||||
}
|
||||
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 { return this->buildPathAndContextId(ObjectPath()); }
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace BlackCore
|
||||
//! Voice channel by room
|
||||
QSharedPointer<IVoiceChannel> getVoiceChannelBy(const BlackMisc::Audio::CVoiceRoom &voiceRoom);
|
||||
|
||||
CActionBind m_actionPtt { pttHotkeyIdentifier(), pttHotkeyIcon(), this, &CContextAudio::ps_setVoiceTransmission };
|
||||
CActionBind m_actionPtt { pttHotkeyAction(), pttHotkeyIcon(), this, &CContextAudio::ps_setVoiceTransmission };
|
||||
|
||||
std::unique_ptr<IVoice> m_voice; //!< underlying voice lib
|
||||
std::unique_ptr<IAudioMixer> m_audioMixer;
|
||||
|
||||
Reference in New Issue
Block a user