Class which manages shortcuts customization.
#include <SUIT_ShortcutMgr.h>

Public Member Functions | |
| void | setSectionEnabled (const QString &, const bool=true) |
| Enable/disable a shortcuts section. More... | |
| void | updateShortcuts () |
| Update shortcuts from preferences. More... | |
Static Public Member Functions | |
| static void | Init () |
| Create new instance of shortcut manager. More... | |
| static SUIT_ShortcutMgr * | getShortcutMgr () |
| Return shortcut manager. More... | |
Protected Member Functions | |
| SUIT_ShortcutMgr () | |
| Constructor. More... | |
| virtual | ~SUIT_ShortcutMgr () |
| Destructor. More... | |
Private Slots | |
| void | onActionDestroyed (QObject *) |
| Called when the corresponding action is destroyed. More... | |
Private Member Functions | |
| virtual bool | eventFilter (QObject *o, QEvent *e) |
| Custom event filter for qapplication . More... | |
| void | processAction (QtxAction *) |
| Set shortcut to the given action if the shortcut is defined. More... | |
| QKeySequence | getShortcutByActionName (const QString &) const |
| Return key sequence for shortcut action name. More... | |
Private Attributes | |
| QMultiMap< QString, QtxAction * > | myShortcutActions |
Static Private Attributes | |
| static SUIT_ShortcutMgr * | myShortcutMgr = NULL |
|
protected |
|
protectedvirtual |
Redefined from QObject::eventFilter();
References processAction().
|
private |
| actionName | name of shortcut action in preferences |
References SUIT_Session::resourceMgr(), QtxResourceMgr::sectionsToken(), SUIT_Session::session(), and QtxResourceMgr::value().
|
static |
References Init(), and myShortcutMgr.
|
static |
References myShortcutMgr, and SUIT_ShortcutMgr().
|
privateslot |
Removes destroyed action from the actions list.
| obj | action being destroyed |
References myShortcutActions, and QtxAction::shortcutActionName().
|
private |
| action | action to process |
References getShortcutByActionName(), myShortcutActions, onActionDestroyed(), and QtxAction::shortcutActionName().
Enables or disables actions which belong to the given shortcuts section. Only actions which have an active desktop as a parent widget are taken into account.
| section | shorcuts section |
| on | if true - action will be enabled, otherwise - disabled |
References SUIT_Session::activeApplication(), app, SUIT_Application::desktop(), myShortcutActions, SUIT_Session::session(), and QtxAction::shortcutActionName().
| void SUIT_ShortcutMgr::updateShortcuts | ( | ) |
References getShortcutByActionName(), myShortcutActions, and QtxAction::shortcutActionName().
|
private |
|
staticprivate |