|
|
The class ShortcutController manages all shortcuts that can be set in the widget. More...
#include <MemoryX/gui-plugins/SceneEditor/gui/ShortcutController.h>
Public Member Functions | |
| QHash< QString, QPointer< QAction > > | getAllActions () |
| Returns a Hashtable with all Actions saved. | |
| QHash< QString, QKeySequence > | getAllRegisteredShortcuts () |
| Returns a Hashtable with all registered Shortcuts. | |
| QHash< QString, QKeySequence > | getAllShortcuts () |
| Returns a Hashtable with all existing Shortcuts. | |
| void | registerAction (const QString &name, const QPointer< QAction > &action) |
| Registers a QAction, so this action can be given a shortcut. | |
| ShortcutController () | |
| A constructor. | |
| ShortcutController (const QHash< QString, QKeySequence > &initialShortcuts) | |
| A constructor. | |
| void | updateShortcut (const QString &name, const QKeySequence &keysequence) |
| Sets the given QKeySequence as Shortcut for the QAction specified by name. | |
| ~ShortcutController () | |
| A destructor. | |
The class ShortcutController manages all shortcuts that can be set in the widget.
Each QAction registers its shortcut (if desired) over the ShortcutController.
QApplication must be initialized for this class to work!
A constructor.
Creates a new Instance of this class.
| ShortcutController | ( | const QHash< QString, QKeySequence > & | initialShortcuts | ) |
A constructor.
Creates a new Instance of this class with already defined initial Shortcuts.
| initialShortcuts | List of already defined Shortcuts |
| ~ShortcutController | ( | ) |
A destructor.
| QHash< QString, QPointer< QAction > > getAllActions | ( | ) |
Returns a Hashtable with all Actions saved.
| QHash< QString, QKeySequence > getAllRegisteredShortcuts | ( | ) |
Returns a Hashtable with all registered Shortcuts.
| QHash< QString, QKeySequence > getAllShortcuts | ( | ) |
Returns a Hashtable with all existing Shortcuts.
| void registerAction | ( | const QString & | name, |
| const QPointer< QAction > & | action ) |
Registers a QAction, so this action can be given a shortcut.
| name | Name of the registered QAction |
| action | QAction to be registered |
| void updateShortcut | ( | const QString & | name, |
| const QKeySequence & | keysequence ) |
Sets the given QKeySequence as Shortcut for the QAction specified by name.
| name | Specifies the QAction edited |
| keysequence | The QKeySequence that is added to the QAction |