28 #ifndef ACTIONMANAGERPRIVATE_H
29 #define ACTIONMANAGERPRIVATE_H
33 #include <QtCore/QMap>
34 #include <QtCore/QHash>
35 #include <QtCore/QMultiHash>
49 class UniqueIDManager;
53 class ActionContainerPrivate;
94 Command *registerOverridableAction(QAction *action,
const QString &
id,
bool checkUnique);
99 typedef QHash<int, CommandPrivate *> IdCmdMap;
102 typedef QHash<int, ActionContainerPrivate *> IdContainerMap;
103 IdContainerMap m_idContainerMap;
116 #endif // ACTIONMANAGERPRIVATE_H
Command * registerShortcut(QShortcut *shortcut, const QString &id, const QList< int > &context)
Makes a shortcut known to the system under the specified string id.
ActionContainer * createMenuBar(const QString &id)
Creates a new menu bar with the given string id.
bool hasContext(int context) const
Command * command(int uid) const
void readSettings(QSettings *settings)
static ActionManagerPrivate * instance()
QList< ActionContainerPrivate * > containers() const
void saveSettings(QSettings *settings)
Command * registerAction(QAction *action, const QString &id, const QList< int > &context)
Makes an action known to the system under the specified string id.
void setContext(const QList< int > &context)
ActionContainer * createMenu(const QString &id)
Creates a new menu with the given string id.
The action manager is responsible for registration of menus and menu items and keyboard shortcuts...
ActionContainer * actionContainer(int uid) const
ActionManagerPrivate(MainWindow *mainWnd)
QList< CommandPrivate * > commands() const
QList< int > defaultGroups() const
The class Command represents an action like a menu item, tool button, or shortcut. You don't create Command objects directly, instead use {ActionManager::registerAction()} to register an action and retrieve a Command. The Command object represents the user visible action and its properties. If multiple actions are registered with the same ID (but different contexts) the returned Command is the shared one between these actions.