Unity 8
|
The GlobalShortcut class. More...
#include <plugins/GlobalShortcut/globalshortcut.h>
Inherits QQuickItem.
Signals | |
void | shortcutChanged (const QVariant &shortcut) |
void | triggered (const QString &shortcut) |
void | activeChanged (bool active) |
Public Member Functions | |
GlobalShortcut (QQuickItem *parent=nullptr) | |
QVariant | shortcut () const |
void | setShortcut (const QVariant &shortcut) |
bool | isActive () const |
void | setActive (bool active) |
Protected Member Functions | |
void | componentComplete () override |
void | keyPressEvent (QKeyEvent *event) override |
Properties | |
QVariant | shortcut |
bool | active |
The GlobalShortcut class.
QML component for registering a shortcut; the shortcut itself can be specified either as a string ("Ctrl+Alt+L") or as an enum value (Qt.ControlModifier|Qt.AltModifier|Qt.Key_L).
When the shortcut is detected, the signal triggered() gets emitted.
Definition at line 33 of file globalshortcut.h.
|
signal |
Emitted when a global keypress of shortcut
is detected
|
readwrite |
Whether the shortcut is active (true by default)
Definition at line 43 of file globalshortcut.h.
|
readwrite |
The shortcut itself
Definition at line 39 of file globalshortcut.h.