mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-15 01:05:35 +08:00
Ref T645, minor style changes
This commit is contained in:
@@ -83,7 +83,7 @@ namespace BlackCore
|
|||||||
|
|
||||||
void CInputManager::processButtonCombinationChanged(const CHotkeyCombination &combination)
|
void CInputManager::processButtonCombinationChanged(const CHotkeyCombination &combination)
|
||||||
{
|
{
|
||||||
// Merge in the keyboard keys
|
// Merge in the keyboard dkeys
|
||||||
CHotkeyCombination copy(combination);
|
CHotkeyCombination copy(combination);
|
||||||
copy.setKeyboardKeys(m_lastCombination.getKeyboardKeys());
|
copy.setKeyboardKeys(m_lastCombination.getKeyboardKeys());
|
||||||
processCombination(copy);
|
processCombination(copy);
|
||||||
@@ -124,7 +124,7 @@ namespace BlackCore
|
|||||||
{
|
{
|
||||||
m_keyboard = IKeyboard::create(this);
|
m_keyboard = IKeyboard::create(this);
|
||||||
m_joystick = IJoystick::create(this);
|
m_joystick = IJoystick::create(this);
|
||||||
connect(m_keyboard.get(), &IKeyboard::keyCombinationChanged, this, &CInputManager::processKeyCombinationChanged, Qt::QueuedConnection);
|
connect(m_keyboard.get(), &IKeyboard::keyCombinationChanged, this, &CInputManager::processKeyCombinationChanged, Qt::QueuedConnection);
|
||||||
connect(m_joystick.get(), &IJoystick::buttonCombinationChanged, this, &CInputManager::processButtonCombinationChanged, Qt::QueuedConnection);
|
connect(m_joystick.get(), &IJoystick::buttonCombinationChanged, this, &CInputManager::processButtonCombinationChanged, Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -104,10 +104,10 @@ namespace BlackGui
|
|||||||
ui->cb_Identifier->setCurrentIndex(index);
|
ui->cb_Identifier->setCurrentIndex(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(ui->pb_AdvancedMode, &QPushButton::clicked, this, &CHotkeyDialog::advancedModeChanged);
|
connect(ui->pb_AdvancedMode, &QPushButton::clicked, this, &CHotkeyDialog::advancedModeChanged);
|
||||||
connect(ui->pb_SelectedHotkey, &QPushButton::clicked, this, &CHotkeyDialog::captureHotkey);
|
connect(ui->pb_SelectedHotkey, &QPushButton::clicked, this, &CHotkeyDialog::captureHotkey);
|
||||||
connect(ui->pb_Accept, &QPushButton::clicked, this, &CHotkeyDialog::accept);
|
connect(ui->pb_Accept, &QPushButton::clicked, this, &CHotkeyDialog::accept);
|
||||||
connect(ui->pb_Cancel, &QPushButton::clicked, this, &CHotkeyDialog::reject);
|
connect(ui->pb_Cancel, &QPushButton::clicked, this, &CHotkeyDialog::reject);
|
||||||
connect(ui->tv_Actions->selectionModel(), &QItemSelectionModel::selectionChanged, this, &CHotkeyDialog::changeSelectedAction);
|
connect(ui->tv_Actions->selectionModel(), &QItemSelectionModel::selectionChanged, this, &CHotkeyDialog::changeSelectedAction);
|
||||||
connect(ui->cb_Identifier, qOverload<int>(&QComboBox::currentIndexChanged), this, &CHotkeyDialog::changeApplicableMachine);
|
connect(ui->cb_Identifier, qOverload<int>(&QComboBox::currentIndexChanged), this, &CHotkeyDialog::changeApplicableMachine);
|
||||||
|
|
||||||
|
|||||||
@@ -117,16 +117,16 @@ namespace BlackInput
|
|||||||
|
|
||||||
void CKeyboardWindows::processKeyEvent(DWORD vkcode, WPARAM event)
|
void CKeyboardWindows::processKeyEvent(DWORD vkcode, WPARAM event)
|
||||||
{
|
{
|
||||||
BlackMisc::Input::CHotkeyCombination oldCombination(m_keyCombination);
|
CHotkeyCombination oldCombination(m_keyCombination);
|
||||||
if ((event == WM_KEYDOWN) || (event == WM_SYSKEYDOWN))
|
if ((event == WM_KEYDOWN) || (event == WM_SYSKEYDOWN))
|
||||||
{
|
{
|
||||||
auto key = keyMapping().value(vkcode);
|
auto key = keyMapping().value(static_cast<int>(vkcode));
|
||||||
if (key == Key_Unknown) { return; }
|
if (key == Key_Unknown) { return; }
|
||||||
m_keyCombination.addKeyboardKey(CKeyboardKey(key));
|
m_keyCombination.addKeyboardKey(CKeyboardKey(key));
|
||||||
}
|
}
|
||||||
else if ((event == WM_KEYUP) || (event == WM_SYSKEYUP))
|
else if ((event == WM_KEYUP) || (event == WM_SYSKEYUP))
|
||||||
{
|
{
|
||||||
auto key = keyMapping().value(vkcode);
|
auto key = keyMapping().value(static_cast<int>(vkcode));
|
||||||
if (key == Key_Unknown) { return; }
|
if (key == Key_Unknown) { return; }
|
||||||
m_keyCombination.removeKeyboardKey(CKeyboardKey(key));
|
m_keyCombination.removeKeyboardKey(CKeyboardKey(key));
|
||||||
}
|
}
|
||||||
@@ -139,7 +139,7 @@ namespace BlackInput
|
|||||||
|
|
||||||
void CKeyboardWindows::pollKeyboardState()
|
void CKeyboardWindows::pollKeyboardState()
|
||||||
{
|
{
|
||||||
BlackMisc::Input::CHotkeyCombination oldCombination(m_keyCombination);
|
CHotkeyCombination oldCombination(m_keyCombination);
|
||||||
QList<int> vkeys = keyMapping().keys();
|
QList<int> vkeys = keyMapping().keys();
|
||||||
for (int vkey : vkeys)
|
for (int vkey : vkeys)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user