Lomiri
|
The GlobalShortcut class. More...
#include <plugins/GlobalShortcut/globalshortcut.h>
Inherits QQuickItem.
Signals | |
void | shortcutChanged (const QVariant &shortcut) |
void | triggered (const QString &shortcut) |
void | released (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 | keyPressEvent (QKeyEvent *event) override |
void | keyReleaseEvent (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.
GlobalShortcut::GlobalShortcut | ( | QQuickItem * | parent = nullptr | ) |
Definition at line 25 of file globalshortcut.cpp.
bool GlobalShortcut::isActive | ( | ) | const |
Definition at line 45 of file globalshortcut.cpp.
|
overrideprotected |
Definition at line 59 of file globalshortcut.cpp.
|
overrideprotected |
Definition at line 70 of file globalshortcut.cpp.
|
signal |
Emitted when a global keypress of shortcut
is released
void GlobalShortcut::setActive | ( | bool | active | ) |
Definition at line 50 of file globalshortcut.cpp.
void GlobalShortcut::setShortcut | ( | const QVariant & | shortcut | ) |
Definition at line 35 of file globalshortcut.cpp.
QVariant GlobalShortcut::shortcut | ( | ) | const |
Definition at line 30 of file globalshortcut.cpp.
|
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.