mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-06 02:16:04 +08:00
Add the missing handling when user selects a different machine
So far, the case that a user selects a different machine, was not handled yet. refs #881
This commit is contained in:
committed by
Mathew Sutcliffe
parent
3a2618fadb
commit
9749bb5d31
@@ -100,6 +100,7 @@ namespace BlackGui
|
|||||||
connect(m_inputManager, &BlackCore::CInputManager::combinationSelectionChanged, this, &CHotkeyDialog::ps_combinationSelectionChanged);
|
connect(m_inputManager, &BlackCore::CInputManager::combinationSelectionChanged, this, &CHotkeyDialog::ps_combinationSelectionChanged);
|
||||||
connect(m_inputManager, &BlackCore::CInputManager::combinationSelectionFinished, this, &CHotkeyDialog::ps_combinationSelectionFinished);
|
connect(m_inputManager, &BlackCore::CInputManager::combinationSelectionFinished, this, &CHotkeyDialog::ps_combinationSelectionFinished);
|
||||||
connect(ui->tv_Actions->selectionModel(), &QItemSelectionModel::selectionChanged, this, &CHotkeyDialog::ps_changeSelectedAction);
|
connect(ui->tv_Actions->selectionModel(), &QItemSelectionModel::selectionChanged, this, &CHotkeyDialog::ps_changeSelectedAction);
|
||||||
|
connect(ui->cb_Identifier, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &CHotkeyDialog::changeApplicableMachine);
|
||||||
|
|
||||||
initStyleSheet();
|
initStyleSheet();
|
||||||
}
|
}
|
||||||
@@ -169,6 +170,14 @@ namespace BlackGui
|
|||||||
m_actionHotkey.setAction(index.data(Models::CActionModel::ActionRole).toString());
|
m_actionHotkey.setAction(index.data(Models::CActionModel::ActionRole).toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CHotkeyDialog::changeApplicableMachine(int index)
|
||||||
|
{
|
||||||
|
Q_UNUSED(index);
|
||||||
|
QVariant userData = ui->cb_Identifier->currentData(Qt::UserRole);
|
||||||
|
Q_ASSERT(userData.canConvert<CIdentifier>());
|
||||||
|
m_actionHotkey.setApplicableMachine(userData.value<CIdentifier>());
|
||||||
|
}
|
||||||
|
|
||||||
void CHotkeyDialog::ps_accept()
|
void CHotkeyDialog::ps_accept()
|
||||||
{
|
{
|
||||||
if (m_actionHotkey.getApplicableMachine().getMachineName().isEmpty())
|
if (m_actionHotkey.getApplicableMachine().getMachineName().isEmpty())
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ namespace BlackGui
|
|||||||
void ps_combinationSelectionChanged(const BlackMisc::Input::CHotkeyCombination &combination);
|
void ps_combinationSelectionChanged(const BlackMisc::Input::CHotkeyCombination &combination);
|
||||||
void ps_combinationSelectionFinished(const BlackMisc::Input::CHotkeyCombination &combination);
|
void ps_combinationSelectionFinished(const BlackMisc::Input::CHotkeyCombination &combination);
|
||||||
void ps_changeSelectedAction(const QItemSelection &selected, const QItemSelection &deselected);
|
void ps_changeSelectedAction(const QItemSelection &selected, const QItemSelection &deselected);
|
||||||
|
void changeApplicableMachine(int index);
|
||||||
void ps_accept();
|
void ps_accept();
|
||||||
|
|
||||||
void synchronize();
|
void synchronize();
|
||||||
|
|||||||
Reference in New Issue
Block a user