|
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. More... | |
QHash< QString, QKeySequence > | getAllRegisteredShortcuts () |
Returns a Hashtable with all registered Shortcuts. More... | |
QHash< QString, QKeySequence > | getAllShortcuts () |
Returns a Hashtable with all existing Shortcuts. More... | |
void | registerAction (const QString &name, const QPointer< QAction > &action) |
Registers a QAction, so this action can be given a shortcut. More... | |
ShortcutController () | |
A constructor. More... | |
ShortcutController (const QHash< QString, QKeySequence > &initialShortcuts) | |
A constructor. More... | |
void | updateShortcut (const QString &name, const QKeySequence &keysequence) |
Sets the given QKeySequence as Shortcut for the QAction specified by name. More... | |
~ShortcutController () | |
A destructor. More... | |
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!
Definition at line 50 of file ShortcutController.h.
A constructor.
Creates a new Instance of this class.
Definition at line 34 of file ShortcutController.cpp.
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 |
Definition at line 40 of file ShortcutController.cpp.
~ShortcutController | ( | ) |
A destructor.
Definition at line 46 of file ShortcutController.cpp.
QHash< QString, QPointer< QAction > > getAllActions | ( | ) |
Returns a Hashtable with all Actions saved.
Definition at line 115 of file ShortcutController.cpp.
QHash< QString, QKeySequence > getAllRegisteredShortcuts | ( | ) |
Returns a Hashtable with all registered Shortcuts.
Definition at line 99 of file ShortcutController.cpp.
QHash< QString, QKeySequence > getAllShortcuts | ( | ) |
Returns a Hashtable with all existing Shortcuts.
Definition at line 94 of file ShortcutController.cpp.
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 |
Definition at line 50 of file ShortcutController.cpp.
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 |
Definition at line 67 of file ShortcutController.cpp.