PluginShortcuts
This class is for documenting plugin shortcuts (used to display a shortcut map in the UI).
Note
This is merely for documenting shortcuts, it assumes the plugin developer has already established the shortcut handling in their own code.
Qualified name: mv::PluginShortcuts
-
class PluginShortcuts : public QObject
Plugin shortcuts class.
This class is a facade of mv::util::ShortcutMap
Public Functions
-
PluginShortcuts(plugin::Plugin *plugin)
Construct with pointer to
pluginandparentobject.- Parameters:
plugin – Pointer to plugin
-
util::ShortcutMap &getMap()
Get the shortcut map.
- Returns:
Shortcut map
-
const util::ShortcutMap &getMap() const
Get the shortcut map.
- Returns:
Shortcut map
-
void add(const util::ShortcutMap::Shortcut &shortcut)
Add
shortcutto the map.- Parameters:
shortcut – Shortcut to add
-
void remove(const util::ShortcutMap::Shortcut &shortcut)
Remove
shortcutfrom the map.- Parameters:
shortcut – Shortcut to remove
-
util::ShortcutMap::Shortcuts getShortcuts(const QStringList &categories = QStringList()) const
Get shortcuts for
categories.- Parameters:
categories – Categories to retrieve shortcuts for (all shortcuts if empty)
- Returns:
Vector of shortcuts
-
bool hasShortcuts(const QStringList &categories = QStringList()) const
Establish whether any shortcut exists for
categories.- Parameters:
categories – Categories to check (all categories if empty)
- Returns:
Boolean determining whether any shortcut exists
-
void view()
View shortcut map.
Protected Attributes
-
gui::TriggerAction _viewAction
Pointer to parent plugin.
-
PluginShortcuts(plugin::Plugin *plugin)