/*!
@class QHotkey
Each instance of QHotkey represents one shortcut, i.e. one key + modifiers. These shortcuts, once registered, will be activated if the
user presses that combination - no matter in which application he currently is.
For more details and an example, check the main page.
@sa @ref index "Mainpage"
*/
/*!
@property QHotkey::registered
@default{`false`}
If a hotkey is registered, this means that it is set active in the OS and hotkey events will be send to the application.
If it is registered and the keys are pressed, the activated() signal will be emitted.
@warning Registering/Unregistering hotkeys on other threads but the main thread is allowed, but will block the calling
thread until the applications eventloop has the time to handle it. If the loop is not running, the function will block until
it does. This does not happen if used from the main thread.
@accessors{
@readAc{isRegistered()}
@writeAc{setRegistered()}
@notifyAc{registeredChanged()}
}
In addition to the normal accessors, a modification of the QHotkey::shortcut property can change this property, too.
@sa QHotkey::shortcut, QHotkey::activated, QHotkey::isKeyCaptured
*/
/*!
@property QHotkey::shortcut
@default{`QKeySequence()` (`Qt::Key_unknown` + `Qt::NoModifier`)}
Holds the shortcut this hotkey will be registered on. It can be used as QKeySequence or as a combination of
a Qt::Key and Qt::KeyboardModifiers. All write-accessors specifiy an additional parameter to immediatly register
the hotkey.
@note Since the operating systems do not support hotkeys that consist of multiple key-combinations in a sequence,
only the first key/modifier combination of a QKeySequence will be used.
@warning changing the shortcut on other threads but the main thread is allowed, but will block the calling
thread until the applications eventloop has the time to handle it. If the loop is not running, the function will block until
it does. This does not happen if used from the main thread.
@accessors{
@readAc{
shortcut()
keyCode()
modifiers()
}
@writeAc{
setShortcut(const QKeySequence &, bool)
setShortcut(Qt::Key, Qt::KeyboardModifiers, bool)
}
}
@sa QHotkey::registered, QHotkey::isKeyCaptured
*/
/*!
@typedef QHotkey::NativeShortcut
| Member | Details |
|---|---|
| first | The keycode of the key to be pressed |
| second | The modifiers that have to be pressed together with the key |