refs #453 Simplify hotkey action registration and relaying

This commit is contained in:
Roland Winklmeier
2015-08-14 20:24:08 +02:00
committed by Mathew Sutcliffe
parent 199a1e5fcb
commit 6644c73703
7 changed files with 157 additions and 23 deletions

View File

@@ -49,6 +49,8 @@ namespace BlackCore
s = connection.connect(serviceName, IContextApplication::ObjectPath(), IContextApplication::InterfaceName(),
"fakedSetComVoiceRoom", this, SIGNAL(fakedSetComVoiceRoom(BlackMisc::Audio::CVoiceRoomList)));
Q_ASSERT(s);
s = connection.connect(serviceName, IContextApplication::ObjectPath(), IContextApplication::InterfaceName(),
"hotkeyActionsRegistered", this, SIGNAL(hotkeyActionsRegistered(QStringList, BlackMisc::CIdentifier)));
Q_UNUSED(s);
}
@@ -62,6 +64,16 @@ namespace BlackCore
this->m_dBusInterface->callDBus(QLatin1Literal("changeSettings"), settings, origin);
}
void CContextApplicationProxy::registerHotkeyActions(const QStringList &actions, const CIdentifier &origin)
{
this->m_dBusInterface->callDBus(QLatin1Literal("registerHotkeyActions"), actions, origin);
}
void CContextApplicationProxy::callHotkeyAction(const QString &action, bool argument, const CIdentifier &origin)
{
this->m_dBusInterface->callDBus(QLatin1Literal("callHotkeyAction"), action, argument, origin);
}
BlackMisc::CIdentifier CContextApplicationProxy::registerApplication(const CIdentifier &application)
{
return this->m_dBusInterface->callDBusRet<BlackMisc::CIdentifier>(QLatin1Literal("registerApplication"), application);
@@ -101,9 +113,4 @@ namespace BlackCore
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("existsFile"), fileName);
}
void CContextApplicationProxy::processHotkeyFuncEvent(const BlackMisc::Event::CEventHotkeyFunction &event)
{
this->m_dBusInterface->callDBus(QLatin1Literal("processHotkeyFuncEvent"), event);
}
} // namespace