![]() |
Radium Engine
1.7.0
|
This class manage a collection of binding/callback associated with a context. More...
#include <Gui/Utils/KeyMappingManager.hpp>
Collaboration diagram for Ra::Gui::KeyMappingCallbackManager:Public Types | |
| using | Context = KeyMappingManager::Context |
| using | KeyMappingAction = KeyMappingManager::KeyMappingAction |
| using | Callback = std::function<void( QEvent* )> |
Public Member Functions | |
| KeyMappingCallbackManager (Context context) | |
| void | addEventCallback (KeyMappingAction action, Callback callback) |
| KeyMappingManager::KeyMappingAction | addActionAndCallback (const std::string &actionName, const KeyMappingManager::EventBinding &binding, Callback callback) |
| bool | triggerEventCallback (QEvent *event, int key, bool wheel=false) |
| bool | triggerEventCallback (KeyMappingAction action, QEvent *event) |
This class manage a collection of binding/callback associated with a context.
Typical usage is to have one instance of this class is a KeyMappingManageable class to ease callback triggering.
Definition at line 273 of file KeyMappingManager.hpp.
| using Ra::Gui::KeyMappingCallbackManager::Callback = std::function<void( QEvent* )> |
Definition at line 278 of file KeyMappingManager.hpp.
| using Ra::Gui::KeyMappingCallbackManager::Context = KeyMappingManager::Context |
Definition at line 276 of file KeyMappingManager.hpp.
| using Ra::Gui::KeyMappingCallbackManager::KeyMappingAction = KeyMappingManager::KeyMappingAction |
Definition at line 277 of file KeyMappingManager.hpp.
|
inlineexplicit |
Create a callback manager for a given context.
Definition at line 327 of file KeyMappingManager.hpp.
|
inline |
First add the action from its name to the KeyMappingManager, the set the callback for this new action.
Definition at line 336 of file KeyMappingManager.hpp.
Here is the call graph for this function:
|
inline |
Set the callback for a given action. Previously set callback, if any, is removed.
Definition at line 330 of file KeyMappingManager.hpp.
|
inline |
Triggers the callback, if any, corresponding to the action.
Definition at line 346 of file KeyMappingManager.hpp.
|
inline |
Triggers the callback, if any, corresponding to the binding.
Definition at line 354 of file KeyMappingManager.hpp.
Here is the call graph for this function: