|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
Functions | |
| QHash< QString, QKeySequence > | shortcutKeyMap () |
| Named global shortcuts: action id -> key sequence. | |
| QKeySequence | recentFileShortcutKey (int i) |
Recent-file shortcut i (0..MAX_RECENT_FILES-1) == Ctrl+Shift+(0+i), i.e. | |
| QHash< QString, std::function< void()> > | shortcutActions (FileManagement *file, std::function< void()> onExit) |
| What each named shortcut DOES, action id -> callable, over a live FileManagement. | |
|
inline |
Recent-file shortcut i (0..MAX_RECENT_FILES-1) == Ctrl+Shift+(0+i), i.e.
Ctrl+Shift+0 .. Ctrl+Shift+4. (Key_0 == 0x30, so 0x30 + i.)
Definition at line 64 of file shortcutdefs.h.
|
inline |
What each named shortcut DOES, action id -> callable, over a live FileManagement.
The single source of truth for the shortcut→verb wiring: MainWindow connects each QShortcut's activated to the matching callable here, and tst_shortcuts fires the side-effect-free / non-dialog verbs directly to prove the mapping is correct. The action ids match shortcutKeyMap()'s keys (every key has exactly one action).
| onExit | invoked for the exit/exit2 shortcuts (MainWindow passes window close). |
Definition at line 75 of file shortcutdefs.h.
References FileManagement::clearRecentFiles(), FileManagement::data, FileManagement::newFile(), FileManagement::openFile(), SaveFile::randomizeExpansion(), FileManagement::reopenFile(), FileManagement::saveFile(), FileManagement::saveFileAs(), FileManagement::saveFileCopy(), and FileManagement::wipeUnusedSpace().
|
inline |
Named global shortcuts: action id -> key sequence.
The action ids match the names MainWindow::setupShortcuts() connects to FileManagement verbs.
Definition at line 45 of file shortcutdefs.h.