mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 01:45:38 +08:00
Ref T609, encapsulate PTT action/key
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "blackcore/actionbind.h"
|
||||
#include "blackcore/network.h"
|
||||
#include "blackgui/blackguiexport.h"
|
||||
#include "blackmisc/input/actionhotkeydefs.h"
|
||||
|
||||
#include <QFrame>
|
||||
#include <QObject>
|
||||
@@ -58,7 +59,7 @@ namespace BlackGui
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CInfoBarStatusComponent> ui;
|
||||
BlackCore::CActionBind m_actionPtt { "/Voice/Activate push-to-talk", BlackMisc::CIcons::radio16(), this, &CInfoBarStatusComponent::onPttChanged };
|
||||
BlackCore::CActionBind m_actionPtt { BlackMisc::Input::pttHotkeyAction(), BlackMisc::Input::pttHotkeyIcon(), this, &CInfoBarStatusComponent::onPttChanged };
|
||||
BlackMisc::CDigestSignal m_dsResize { this, &CInfoBarStatusComponent::adjustTextSize, 1000, 50 };
|
||||
|
||||
//! Init the LEDs
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "blackcore/context/contextapplication.h"
|
||||
#include "blackcore/context/contextaudio.h"
|
||||
#include "blackcore/inputmanager.h"
|
||||
#include "blackmisc/input/actionhotkeydefs.h"
|
||||
#include "ui_settingshotkeycomponent.h"
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
@@ -67,7 +68,7 @@ namespace BlackGui
|
||||
void CSettingsHotkeyComponent::registerDummyPttEntry()
|
||||
{
|
||||
Q_ASSERT_X(sApp && sApp->getInputManager(), Q_FUNC_INFO, "Missing input manager");
|
||||
sApp->getInputManager()->registerAction(IContextAudio::pttHotkeyAction(), IContextAudio::pttHotkeyIcon());
|
||||
sApp->getInputManager()->registerAction(pttHotkeyAction(), pttHotkeyIcon());
|
||||
}
|
||||
|
||||
void CSettingsHotkeyComponent::addEntry()
|
||||
|
||||
Reference in New Issue
Block a user