mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
refs #313 Change GUI classes to use new hotkey settings wrapper classes
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
#include "blackcore/context.h"
|
||||
#include "blackcore/dbus_server.h"
|
||||
#include "blackinput/keyboard.h"
|
||||
#include "blackmisc/hwkeyboardkeylist.h"
|
||||
#include "blackmisc/setkeyboardhotkeylist.h"
|
||||
#include "blackmisc/statusmessagelist.h"
|
||||
#include "blackmisc/dbus.h"
|
||||
#include "blackmisc/variant.h"
|
||||
@@ -143,7 +143,7 @@ namespace BlackCore
|
||||
virtual BlackSim::Settings::CSettingsSimulator getSimulatorSettings() const = 0;
|
||||
|
||||
//! Hotkeys
|
||||
virtual BlackMisc::Hardware::CKeyboardKeyList getHotkeys() const = 0;
|
||||
virtual BlackMisc::Settings::CSettingKeyboardHotkeyList getHotkeys() const = 0;
|
||||
|
||||
//! Save settings
|
||||
virtual BlackMisc::CStatusMessage write() const = 0;
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace BlackCore
|
||||
/*
|
||||
* Hotkeys
|
||||
*/
|
||||
CKeyboardKeyList CContextSettings::getHotkeys() const
|
||||
CSettingKeyboardHotkeyList CContextSettings::getHotkeys() const
|
||||
{
|
||||
return this->m_hotkeys;
|
||||
}
|
||||
@@ -230,7 +230,7 @@ namespace BlackCore
|
||||
{
|
||||
if (command == CSettingUtilities::CmdUpdate())
|
||||
{
|
||||
BlackMisc::Hardware::CKeyboardKeyList hotkeys = value.value<BlackMisc::Hardware::CKeyboardKeyList>();
|
||||
BlackMisc::Settings::CSettingKeyboardHotkeyList hotkeys = value.value<BlackMisc::Settings::CSettingKeyboardHotkeyList>();
|
||||
this->m_hotkeys = hotkeys;
|
||||
msgs.push_back(this->write()); // write settings
|
||||
emit this->changedSettings(static_cast<uint>(SettingsHotKeys));
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace BlackCore
|
||||
virtual BlackSim::Settings::CSettingsSimulator getSimulatorSettings() const override;
|
||||
|
||||
//! \copydoc IContextSettings::getHotkeys()
|
||||
virtual BlackMisc::Hardware::CKeyboardKeyList getHotkeys() const override;
|
||||
virtual BlackMisc::Settings::CSettingKeyboardHotkeyList getHotkeys() const override;
|
||||
|
||||
//! read settings
|
||||
virtual BlackMisc::CStatusMessage read() override;
|
||||
@@ -81,7 +81,7 @@ namespace BlackCore
|
||||
BlackMisc::Settings::CSettingsNetwork m_settingsNetwork;
|
||||
BlackMisc::Settings::CSettingsAudio m_settingsAudio;
|
||||
BlackSim::Settings::CSettingsSimulator m_settingsSimulator;
|
||||
BlackMisc::Hardware::CKeyboardKeyList m_hotkeys;
|
||||
BlackMisc::Settings::CSettingKeyboardHotkeyList m_hotkeys;
|
||||
QJsonDocument toJsonDocument() const;
|
||||
void emitCompletelyChanged();
|
||||
};
|
||||
|
||||
@@ -69,9 +69,9 @@ namespace BlackCore
|
||||
/*
|
||||
* Relay to DBus
|
||||
*/
|
||||
CKeyboardKeyList CContextSettingsProxy::getHotkeys() const
|
||||
CSettingKeyboardHotkeyList CContextSettingsProxy::getHotkeys() const
|
||||
{
|
||||
return this->m_dBusInterface->callDBusRet<CKeyboardKeyList>(QLatin1Literal("getHotkeys"));
|
||||
return this->m_dBusInterface->callDBusRet<CSettingKeyboardHotkeyList>(QLatin1Literal("getHotkeys"));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace BlackCore
|
||||
virtual BlackSim::Settings::CSettingsSimulator getSimulatorSettings() const override;
|
||||
|
||||
//! \copydoc IContextSettings::getHotkeys()
|
||||
virtual BlackMisc::Hardware::CKeyboardKeyList getHotkeys() const override;
|
||||
virtual Settings::CSettingKeyboardHotkeyList getHotkeys() const override;
|
||||
|
||||
//! \copydoc IContextSettings::value
|
||||
virtual BlackMisc::CStatusMessageList value(const QString &path, const QString &command, const BlackMisc::CVariant &value) override;
|
||||
|
||||
Reference in New Issue
Block a user