mirror of
https://github.com/Skycoder42/QHotkey.git
synced 2026-11-19 12:49:58 +03:00
doc ready and add QPrivateSignal to activated
This commit is contained in:
+154
@@ -0,0 +1,154 @@
|
||||
/*!
|
||||
@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{
|
||||
<b>shortcut()</b><br/>
|
||||
keyCode()<br/>
|
||||
modifiers()
|
||||
}
|
||||
@writeAc{
|
||||
<b>setShortcut(const QKeySequence &, bool)</b><br/>
|
||||
setShortcut(Qt::Key, Qt::KeyboardModifiers, bool)
|
||||
}
|
||||
}
|
||||
|
||||
@sa QHotkey::registered, QHotkey::isKeyCaptured
|
||||
*/
|
||||
|
||||
/*!
|
||||
@typedef QHotkey::NativeShortcut
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Member</th>
|
||||
<th>Details</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>first</td>
|
||||
<td>The keycode of the key to be pressed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>second</td>
|
||||
<td>The modifiers that have to be pressed together with the key</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
The NativeShortcut is used internally only and holds the native keycode and modifiers, after they have been translated
|
||||
from Qt::Key and Qt::Modifiers into the native ones.
|
||||
*/
|
||||
|
||||
/*!
|
||||
@fn QHotkey::QHotkey(QObject *)
|
||||
|
||||
@overload
|
||||
@param parent The parent object
|
||||
|
||||
@overloads{
|
||||
@povElem{QHotkey::QHotkey(QObject *)}
|
||||
@ovElem{QHotkey::QHotkey(const QKeySequence &, bool, QObject *)}
|
||||
@ovElem{QHotkey::QHotkey(Qt::Key, Qt::KeyboardModifiers, bool, QObject *)}
|
||||
}
|
||||
*/
|
||||
|
||||
/*!
|
||||
@fn QHotkey::QHotkey(const QKeySequence &, bool, QObject *)
|
||||
|
||||
@overload
|
||||
@param parent The parent object
|
||||
@param shortcut The shortcut this hotkey should be registered for
|
||||
@param autoRegister Specifies, whether the hotkey should be automatically registered or not
|
||||
|
||||
@overloads{
|
||||
@povElem{QHotkey::QHotkey(QObject *)}
|
||||
@ovElem{QHotkey::QHotkey(const QKeySequence &, bool, QObject *)}
|
||||
@ovElem{QHotkey::QHotkey(Qt::Key, Qt::KeyboardModifiers, bool, QObject *)}
|
||||
}
|
||||
|
||||
@sa QHotkey::shortcut, QHotkey::registered
|
||||
*/
|
||||
|
||||
/*!
|
||||
@fn QHotkey::QHotkey(Qt::Key, Qt::KeyboardModifiers, bool, QObject *)
|
||||
|
||||
@overload
|
||||
@param parent The parent object
|
||||
@param key The key this hotkey should be registered for
|
||||
@param modifiers The modifiers that have to be pressed together with the `key`
|
||||
@param autoRegister Specifies, whether the hotkey should be automatically registered or not
|
||||
|
||||
@overloads{
|
||||
@povElem{QHotkey::QHotkey(QObject *)}
|
||||
@ovElem{QHotkey::QHotkey(const QKeySequence &, bool, QObject *)}
|
||||
@ovElem{QHotkey::QHotkey(Qt::Key, Qt::KeyboardModifiers, bool, QObject *)}
|
||||
}
|
||||
|
||||
@sa QHotkey::shortcut, QHotkey::registered
|
||||
*/
|
||||
|
||||
/*!
|
||||
@fn QHotkey::~QHotkey
|
||||
|
||||
If the hotkey is still registered on destruction, it will automatically unregister itself.
|
||||
|
||||
@warning If using a hotkey on a thread other than the main thread, make shure the QApplication is still running it's eventloop.
|
||||
Otherwise your application will hang up.
|
||||
|
||||
@sa QHotkey::registered
|
||||
*/
|
||||
|
||||
/*!
|
||||
@fn QHotkey::activated
|
||||
|
||||
This signal can only be emitted if Hotkey::registered is set to true (with a valid key-sequence). The signal will always be emitted
|
||||
from the thread this instance lives on.
|
||||
|
||||
@note This is a private signal. It can be used in signal connections but cannot be emitted by the user.
|
||||
*/
|
||||
|
||||
+6
-3
@@ -251,8 +251,11 @@ ALIASES = "accessors{1}=<table><tr><th colspan= 2>Accessors</th><
|
||||
userAc{1}=<tr><td><b>USER</b></td><td>\1</td></tr> \
|
||||
"constantAc=<tr><td colspan= 2><b>CONSTANT</b></td></tr>" \
|
||||
"finalAc=<tr><td colspan= 2><b>FINAL</b></td></tr>" \
|
||||
"default{1}=<b>Default:</b> \1 <br>" \
|
||||
"overload=<i>This is an overloaded function.</i>"
|
||||
"default{1}=<b>Default:</b> \1 <br>" \
|
||||
overloads{1}=<b>Overloads:</b><ul>\1</ul> \
|
||||
ovElem{1}=<li>\1</li> \
|
||||
"overload=<i>This is an overloaded function.</i>" \
|
||||
"povElem{1}=<li>\1 <i>(primary, check for more details)</i></li>"
|
||||
|
||||
# This tag can be used to specify a number of word-keyword mappings (TCL only).
|
||||
# A mapping has the form "name=value". For example adding "class=itcl::class"
|
||||
@@ -365,7 +368,7 @@ IDL_PROPERTY_SUPPORT = YES
|
||||
# all members of a group must be documented explicitly.
|
||||
# The default value is: NO.
|
||||
|
||||
DISTRIBUTE_GROUP_DOC = YES
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
|
||||
# If one adds a struct or class to a group and this option is enabled, then also
|
||||
# any nested class or struct is added to the same group. By default this option
|
||||
|
||||
Reference in New Issue
Block a user