![]() |
Miam-Player
0.8.0
A nice music player
|
QxtWidgets More...
#include <qxtglobalshortcut.h>
Public Slots | |
void | setEnabled (bool enabled=true) |
void | setDisabled (bool disabled=true) |
Sets the shortcut disabled. More... | |
Signals | |
void | activated () |
This signal is emitted when the user types the shortcut's key sequence. More... | |
Public Member Functions | |
QxtGlobalShortcut (QObject *parent=0) | |
Constructs a new QxtGlobalShortcut with parent. More... | |
QxtGlobalShortcut (const QKeySequence &shortcut, QObject *parent=0) | |
Constructs a new QxtGlobalShortcut with shortcut and parent. More... | |
virtual | ~QxtGlobalShortcut () |
Destructs the QxtGlobalShortcut. More... | |
QKeySequence | shortcut () const |
bool | setShortcut (const QKeySequence &shortcut) |
bool | isEnabled () const |
Properties | |
bool | enabled |
whether the shortcut is enabled More... | |
QKeySequence | shortcut |
the shortcut key sequence More... | |
QxtWidgets
The QxtGlobalShortcut class provides a global shortcut aka "hotkey".
A global shortcut triggers even if the application is not active. This makes it easy to implement applications that react to certain shortcuts still if some other application is active or if the application is for example minimized to the system tray.
Example usage:
{Note:} Since Qxt 0.6 QxtGlobalShortcut no more requires QxtApplication.
|
explicit |
Constructs a new QxtGlobalShortcut with parent.
|
explicit |
Constructs a new QxtGlobalShortcut with shortcut and parent.
|
virtual |
Destructs the QxtGlobalShortcut.
|
signal |
This signal is emitted when the user types the shortcut's key sequence.
bool QxtGlobalShortcut::isEnabled | ( | ) | const |
|
slot |
Sets the shortcut disabled.
|
slot |
bool QxtGlobalShortcut::setShortcut | ( | const QKeySequence & | shortcut | ) |
QKeySequence QxtGlobalShortcut::shortcut | ( | ) | const |
|
readwrite |
whether the shortcut is enabled
A disabled shortcut does not get activated.
The default value is true
.
|
readwrite |
the shortcut key sequence
{Note:} Notice that corresponding key press and release events are not delivered for registered global shortcuts even if they are disabled. Also, comma separated key sequences are not supported. Only the first part is used: