dRonin
adbada4
dRonin GCS
|
The action manager is responsible for registration of menus and menu items and keyboard shortcuts. More...
#include <actionmanager.h>
Public Member Functions | |
ActionManager (QObject *parent=nullptr) | |
virtual | ~ActionManager () |
virtual ActionContainer * | createMenu (const QString &id)=0 |
Creates a new menu with the given string id. More... | |
virtual ActionContainer * | createMenuBar (const QString &id)=0 |
Creates a new menu bar with the given string id. More... | |
virtual Command * | registerAction (QAction *action, const QString &id, const QList< int > &context)=0 |
Makes an action known to the system under the specified string id. More... | |
virtual Command * | registerShortcut (QShortcut *shortcut, const QString &id, const QList< int > &context)=0 |
Makes a shortcut known to the system under the specified string id. More... | |
virtual Command * | command (const QString &id) const =0 |
Returns the Command object that is known to the system under the given string id. More... | |
virtual ActionContainer * | actionContainer (const QString &id) const =0 |
Returns the IActionContainter object that is know to the system under the given string id. More... | |
The action manager is responsible for registration of menus and menu items and keyboard shortcuts.
The ActionManager is the central bookkeeper of actions and their shortcuts and layout. You get the only implementation of this class from the core interface ICore::actionManager() method, e.g.
The main reasons for the need of this class is to provide a central place where the user can specify all his keyboard shortcuts, and to provide a solution for actions that should behave differently in different contexts (like the copy/replace/undo/redo actions).
Definition at line 47 of file actionmanager.h.