MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / setBinding

Method setBinding

src/core/ShortcutManager.cpp:30–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void ShortcutManager::setBinding(const QString& actionId, const QKeySequence& key)
31{
32 auto* a = action(actionId);
33 if (!a) return;
34
35 // Clear any existing binding on this key (prevent conflicts)
36 if (!key.isEmpty()) {
37 for (auto& other : m_actions) {
38 if (other.id != actionId && other.currentKey == key)
39 other.currentKey = QKeySequence();
40 }
41 }
42
43 a->currentKey = key;
44 saveBindings();
45 emit bindingsChanged();
46}
47
48void ShortcutManager::clearBinding(const QString& actionId)
49{

Callers 3

assignActionMethod · 0.80
resetSelectedMethod · 0.80
mainFunction · 0.80

Calls 1

isEmptyMethod · 0.45

Tested by 1

mainFunction · 0.64