![]() |
VR-Forces 4.8 Class Documentation
|
This class will traverse the created actions in the menu system and add a potential key mapping for them. More...

Public Member Functions | |
| DtVrfMenuKeyMapManager (makVrv::DtDe &) | |
| virtual | ~DtVrfMenuKeyMapManager () |
| virtual void | setup () |
| Will setup the key mappings by iterating over the menu configuration and then calling addKeyboardMenuMapping with that path. More... | |
| virtual void | addKeyboardMenuMapping (const makVrv::DtMenuPath &path) |
| Adds a new keyboard mapping for the particular path. More... | |
| virtual void | removeKeyboardMenuMapping (const makVrv::DtMenuPath &path) |
| Removes a keyboard menu map with a particular path. More... | |
| virtual void | setApplyChangesToAllKeymaps (bool) |
| Sets whether or not to apply changes made here to all keymaps. Default is true. More... | |
| virtual bool | applyChangesToAllKeymaps () const |
| virtual bool | isMenuFunction (const std::string &func) const |
| Returns true if this keyboard function is a menu function. More... | |
| virtual QString | reverseTranslate (const QString &) const |
| Reverse the translation to the original english text. More... | |
| virtual void | copyKeyFunction (const makVrv::DtMenuPath &from, const makVrv::DtMenuPath &to) |
| Copied the keyboard functions from the specied to the specified path. More... | |
| virtual bool | setSaveManagersOnChange (bool) |
| If there are any changes to the key map manager, save them or not. Default is true. More... | |
| virtual bool | saveManagersOnChange () const |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. More... | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. More... | |
Static Public Member Functions | |
| static DtVrfMenuKeyMapManager & | instance (makVrv::DtDe &de) |
| Returns instance of the manager. More... | |
| static void | registerInstance (makVrv::DtDe &, DtVrfMenuKeyMapManager *) |
Protected Types | |
| typedef std::map< std::string, std::string > | FunctionToPathMap |
| typedef std::map< std::string, std::string > | PathToFunctionMap |
| typedef std::map< std::string, int > | FunctionCategoryMap |
Protected Member Functions | |
| virtual bool | eventFilter (QObject *, QEvent *) |
| This event filter will accept all shortcut events to prevent the Qt system from handling them. More... | |
| virtual std::string | menuPathToFunctionName (const makVrv::DtMenuPath &) const |
| Given a menu path returns a function name for that path. More... | |
| virtual void | slot_triggerShortcut (makVrv::DtMenuPath) |
| Called when a shortcut is triggered, finds the associated action and triggers it. More... | |
| virtual void | setKeyMap (makVrv::DtKeyMapManager *, std::string currentMap) |
| Sets the current key map and looks for function name mappings to map from function to actions to set shortcuts. More... | |
| virtual void | manageChangeableMenu (const std::string &menuId) |
| Will add a new menu to manage keyboard mappings for. More... | |
| virtual void | setupChangeableMenus () |
| The following menu items are different in that they are created/destroyed via the changing or loading of th scenario, so, they need to be handled differently. More... | |
| virtual void | preAssembleConfigurableMenu (DtAssembledMenu *) |
| Sent before a configurable menu is assembled. This will remove all old key mapping functions. More... | |
| virtual void | postAssembleConfigurableMenu (DtAssembledMenu *) |
| Sent after a configurable menu is assembled. This will add all key mapping functions. More... | |
| virtual int | mapPathToKeymapFunctionCategory (const std::string &path) |
| Maps a path by finding the root menu to a function category. More... | |
| virtual void | keyMappingRemoved (makVrv::DtKeyMap *, std::string, makVrv::DtKeyState::KeyType, makVrv::DtKeyEvent::KeyEventType, makVrv::DtKeyState::KeyModifier) |
| Received when a key mapping is removed. More... | |
| virtual void | keyMappingModified (makVrv::DtKeyMap *, std::string, makVrv::DtKeyState::KeyType, makVrv::DtKeyEvent::KeyEventType, makVrv::DtKeyState::KeyModifier) |
| Received when a key mapping is modified. More... | |
| virtual void | setupKeyMappingFor (const std::string &path, QAction *action, makVrv::DtKeyMap *map) |
| Sets up a shortcut for the given action, key map and menu path. More... | |
| virtual void | resetShortcut (makVrv::DtKeyMap *, std::string) |
| Resets the shortcut for the particular function string changed in the supplied keymap. More... | |
| void | parseTSFile (const QString &file) |
Protected Attributes | |
| makVrv::DtDe & | myDe |
| makVrv::DtSignalConnectionManager | myConnectionManager |
| FunctionToPathMap | myFunctionToPathMap |
| PathToFunctionMap | myPathToFunctionMap |
| FunctionCategoryMap | myFunctionCategories |
| bool | myApplyChangesToAllKeymaps |
| std::map< QString, QString > | myReverseMap |
| bool | mySaveManagersOnChange |
| std::string | myCurrentKeyMap |
This class will traverse the created actions in the menu system and add a potential key mapping for them.
The mechanism will replace the Qt shortcut mechanism in that it will handle the triggering of the actions
|
protected |
|
protected |
|
protected |
| makVrf::DtVrfMenuKeyMapManager::DtVrfMenuKeyMapManager | ( | makVrv::DtDe & | ) |
|
virtual |
|
static |
Returns instance of the manager.
|
static |
|
virtual |
Will setup the key mappings by iterating over the menu configuration and then calling addKeyboardMenuMapping with that path.
|
virtual |
Adds a new keyboard mapping for the particular path.
|
virtual |
Removes a keyboard menu map with a particular path.
|
virtual |
Sets whether or not to apply changes made here to all keymaps. Default is true.
|
virtual |
|
virtual |
Returns true if this keyboard function is a menu function.
|
virtual |
Reverse the translation to the original english text.
|
virtual |
Copied the keyboard functions from the specied to the specified path.
If there are any changes to the key map manager, save them or not. Default is true.
|
virtual |
This event filter will accept all shortcut events to prevent the Qt system from handling them.
|
protectedvirtual |
Given a menu path returns a function name for that path.
If the path is not an item or not found returns empty string
|
protectedvirtual |
Called when a shortcut is triggered, finds the associated action and triggers it.
|
protectedvirtual |
Sets the current key map and looks for function name mappings to map from function to actions to set shortcuts.
|
protectedvirtual |
Will add a new menu to manage keyboard mappings for.
This menu is a menu that is of type DtConfigurableMenu and is expected to change it's menu contents over the lifetime of the application. Once managed it cannot be unmanaged
|
protectedvirtual |
The following menu items are different in that they are created/destroyed via the changing or loading of th scenario, so, they need to be handled differently.
|
protectedvirtual |
Sent before a configurable menu is assembled. This will remove all old key mapping functions.
|
protectedvirtual |
Sent after a configurable menu is assembled. This will add all key mapping functions.
|
protectedvirtual |
Maps a path by finding the root menu to a function category.
If category does not exist a new map is created
|
protectedvirtual |
Received when a key mapping is removed.
If action that represents the keymap has a shortcut for that, then set that shortcut to empty
|
protectedvirtual |
Received when a key mapping is modified.
If action that represents that function does not have a shortcut already assigned to it, set it to be the shortcut
|
protectedvirtual |
Sets up a shortcut for the given action, key map and menu path.
|
protectedvirtual |
Resets the shortcut for the particular function string changed in the supplied keymap.
Will only reset if the key map supplied is the current selected one
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |