#include <ShortcutManager.hpp>
|
| void | Register (const std::string &id, const QString &category, const QString &label, QAction *action) |
| | Registers action under id, applying any saved override.
|
| |
| std::vector< ShortcutInfo > | GetAll () const |
| | All currently registered shortcuts, in registration order.
|
| |
| ShortcutResult | SetShortcut (const std::string &id, const QKeySequence &sequence) |
| | Assigns sequence to the shortcut identified by id.
|
| |
| void | ResetToDefault (const std::string &id) |
| | Restores the shortcut identified by id to its default.
|
| |
| void | ResetAllToDefaults () |
| | Restores every registered shortcut to its default.
|
| |
| void | Clear () |
| | Clears the registry (not the persisted overrides file).
|
| |
◆ ShortcutManager()
| ui::qt::ShortcutManager::ShortcutManager |
( |
| ) |
|
|
private |
◆ ~ShortcutManager()
| ui::qt::ShortcutManager::~ShortcutManager |
( |
| ) |
|
|
privatedefault |
◆ Clear()
| void ui::qt::ShortcutManager::Clear |
( |
| ) |
|
Clears the registry (not the persisted overrides file).
Intended for tests: without this, QAction pointers from a previous test's destroyed widgets would dangle in the process-wide singleton.
◆ DefaultFilePath()
| std::string ui::qt::ShortcutManager::DefaultFilePath |
( |
| ) |
|
|
staticprivate |
◆ GetAll()
| std::vector< ShortcutInfo > ui::qt::ShortcutManager::GetAll |
( |
| ) |
const |
All currently registered shortcuts, in registration order.
◆ getInstance()
◆ LoadOverrides()
| void ui::qt::ShortcutManager::LoadOverrides |
( |
| ) |
|
|
private |
◆ Register()
| void ui::qt::ShortcutManager::Register |
( |
const std::string & |
id, |
|
|
const QString & |
category, |
|
|
const QString & |
label, |
|
|
QAction * |
action |
|
) |
| |
Registers action under id, applying any saved override.
action's current shortcut (set by the caller before this call) is treated as the default to reset back to. Calling this again with an id that's already registered updates the entry in place (the action pointer is refreshed and its shortcut is left as-is).
◆ ResetAllToDefaults()
| void ui::qt::ShortcutManager::ResetAllToDefaults |
( |
| ) |
|
Restores every registered shortcut to its default.
◆ ResetToDefault()
| void ui::qt::ShortcutManager::ResetToDefault |
( |
const std::string & |
id | ) |
|
Restores the shortcut identified by id to its default.
◆ SaveOverrides()
| void ui::qt::ShortcutManager::SaveOverrides |
( |
| ) |
const |
|
private |
◆ SetShortcut()
| ShortcutResult ui::qt::ShortcutManager::SetShortcut |
( |
const std::string & |
id, |
|
|
const QKeySequence & |
sequence |
|
) |
| |
Assigns sequence to the shortcut identified by id.
Rejected (Err) if sequence is already used by a different registered shortcut and sequence is non-empty. An empty sequence clears the shortcut (unbinds the action).
◆ m_entries
| std::vector<Entry> ui::qt::ShortcutManager::m_entries |
|
private |
◆ m_pendingOverrides
| std::vector<std::pair<std::string, QKeySequence> > ui::qt::ShortcutManager::m_pendingOverrides |
|
private |
The documentation for this class was generated from the following files: