Interface class for plugins which have to react on keyboard events. More...
#include <KeyInterface.hh>

Public Slots | |
| virtual void | slotKeyEvent (QKeyEvent *) |
| Key Event from Main App. | |
| virtual void | slotKeyReleaseEvent (QKeyEvent *) |
| Key Release Event from Main App. | |
Signals | |
| virtual void | registerKey (int, Qt::KeyboardModifiers, QString, bool=false) |
| Register a key-combination for your plugin. | |
Public Member Functions | |
| virtual | ~KeyInterface () |
| Destructor. | |
Interface class for plugins which have to react on keyboard events.
Using this interface you can react on key events. You first have to register a key (or key combination). For each registered key you will receive a keyEvent when the key was pressed and a keyReleaseEvent when the key was released.
See our tutorial Implementing mouse and keyboard interaction for an example of how to use mouse and keyboard events within a plugin.
Definition at line 71 of file KeyInterface.hh.
| virtual void KeyInterface::registerKey | ( | int | , | |
| Qt::KeyboardModifiers | , | |||
| QString | , | |||
| bool | = false | |||
| ) | [inline, virtual, signal] |
Register a key-combination for your plugin.
To obtain key events from the viewer for a certain key-combination, you have to register that combination first
| _key | the key that should be registered | |
| _modifiers | the keyboard modifiers | |
| _description | a short description about the functionality | |
| _multiUse | can the key additionally be registered by another plugin |
Reimplemented in MouseAndKeyPlugin.
Definition at line 83 of file KeyInterface.hh.
| virtual void KeyInterface::slotKeyEvent | ( | QKeyEvent * | ) | [inline, virtual, slot] |
Key Event from Main App.
This slot is called if a key event occured in the Viewer
| _event | Keyevent |
Reimplemented in MouseAndKeyPlugin.
Definition at line 92 of file KeyInterface.hh.
Referenced by CoreWidget::keyPressEvent().
| virtual void KeyInterface::slotKeyReleaseEvent | ( | QKeyEvent * | ) | [inline, virtual, slot] |
Key Release Event from Main App.
This slot is called if a key release event occured in the Viewer
| _event | Keyevent |
Definition at line 99 of file KeyInterface.hh.
Referenced by CoreWidget::keyReleaseEvent().