This class describes a key event. More...
#include <Radiant/KeyEvent.hpp>
Public Member Functions | |
| bool | isAutoRepeat () const |
| Returns boolean indicating a repeating event. More... | |
| int | key () const |
| Key code of the event (from Qt::Key) More... | |
| KeyEvent (const QKeyEvent &event) | |
| Constructs a new key event from a QKeyEvent. More... | |
| KeyEvent (int key, QEvent::Type type=QEvent::KeyPress, Qt::KeyboardModifiers modifiers=Qt::NoModifier, const QString &text="", bool autoRepeat=false) | |
| Constructs a new key event. More... | |
| KeyEvent (KeyEvent &&)=default | |
| Qt::KeyboardModifiers | modifiers () const |
| Active keyboard modifiers. More... | |
| KeyEvent & | operator= (KeyEvent &&)=default |
| const QKeyEvent & | qKeyEvent () const |
| Returns this event as QKeyEvent. | |
| QString | text () const |
| Returns the unicode text representation of the key event. More... | |
| QEvent::Type | type () const |
| Returns the type of the keyboard event. More... | |
| virtual | ~KeyEvent () |
| Destructor. | |
Static Public Member Functions | |
| static KeyEvent | createKeyPress (int key, bool isautorepeat=false) |
| Creates a key press KeyEvent object with the specified key code. More... | |
| static KeyEvent | createKeyRelease (int key) |
| Creates a key release KeyEvent object with the specified key code. More... | |
This class describes a key event.
Key events are sent from virtual keyboard or actual keyboard.
| Radiant::KeyEvent::KeyEvent | ( | const QKeyEvent & | event | ) |
Constructs a new key event from a QKeyEvent.
| event | Qt key event |
| Radiant::KeyEvent::KeyEvent | ( | int | key, |
| QEvent::Type | type = QEvent::KeyPress, |
||
| Qt::KeyboardModifiers | modifiers = Qt::NoModifier, |
||
| const QString & | text = "", |
||
| bool | autoRepeat = false |
||
| ) |
Constructs a new key event.
| key | key code of the event (from Qt::Key) |
| type | type of the event. Must be KeyPress or KeyRelease. |
| modifiers | active keyboard modifiers for the event |
| text | Unicode representation of the text generated by the event |
| autoRepeat | is the event generated by keyboard auto-repeat |
|
static |
Creates a key press KeyEvent object with the specified key code.
| key | key code of the event |
| isautorepeat | is the event generated by keyboard auto-repeat |
|
static |
Creates a key release KeyEvent object with the specified key code.
| key | key code of the event |
| bool Radiant::KeyEvent::isAutoRepeat | ( | ) | const |
Returns boolean indicating a repeating event.
| int Radiant::KeyEvent::key | ( | ) | const |
Key code of the event (from Qt::Key)
| Qt::KeyboardModifiers Radiant::KeyEvent::modifiers | ( | ) | const |
Active keyboard modifiers.
| QString Radiant::KeyEvent::text | ( | ) | const |
Returns the unicode text representation of the key event.
| QEvent::Type Radiant::KeyEvent::type | ( | ) | const |
Returns the type of the keyboard event.