Add icons, menu locations, key search and copy to the Shortcuts page

The Shortcuts page now shows:
- each command's icon, and a Menu column saying where it is
  ("Projet › Scripts"); the text filter matches that too
- a category filter beside the existing Bound/Unbound/Conflicts one
- "Rechercher par touche": press a key combination and only the
  commands using it are listed, however the key is spelled in the
  user's language. A key also finds the two-key shortcuts it starts.
- "Copier la liste": the shown rows go on the clipboard as
  tab-separated text with a header, so they paste into a spreadsheet
  one cell per column

ShortcutManager::ShortcutInfo carries the icon and the first live
QAction so the page needs no second registry.

New test tst_shortcutspage covers the menu path, the columns, both
filters and the copied text.

Second stage of discussion #1319.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ispyisail
2026-10-06 08:17:16 +13:00
parent 85342f4b56
commit 896c38435d
6 changed files with 331 additions and 14 deletions
+7
View File
@@ -137,6 +137,13 @@ QList<ShortcutManager::ShortcutInfo> ShortcutManager::allShortcuts() const
info.description = entry.description;
info.default_sequence = entry.default_sequence;
info.current_sequence = savedSequence(id, entry.default_sequence);
for (const QPointer<QObject> &target : entry.targets) {
if (target) {
info.icon = target->property("icon").value<QIcon>();
info.action = qobject_cast<QAction *>(target.data());
break;
}
}
list << info;
}
return list;