|
Krita Source Code Documentation
|
#include <kis_single_action_shortcut.h>
Inheritance diagram for KisSingleActionShortcut:Public Types | |
| enum | WheelAction { WheelUp , WheelDown , WheelLeft , WheelRight , WheelTrackpad } |
Public Member Functions | |
| bool | conflictsWith (const QKeySequence &seq) |
| KisSingleActionShortcut (KisAbstractInputAction *action, int index) | |
| bool | match (const QSet< Qt::Key > &modifiers, Qt::Key key) |
| bool | match (const QSet< Qt::Key > &modifiers, WheelAction wheelAction) |
| int | priority () const override |
| void | setKey (const QSet< Qt::Key > &modifiers, Qt::Key key) |
| void | setWheel (const QSet< Qt::Key > &modifiers, WheelAction wheelAction) |
| ~KisSingleActionShortcut () override | |
Public Member Functions inherited from KisAbstractShortcut | |
| KisAbstractInputAction * | action () const |
| bool | isAvailable (KisInputActionGroupsMask mask) const |
| KisAbstractShortcut (KisAbstractInputAction *action, int index) | |
| void | setAction (KisAbstractInputAction *action) |
| int | shortcutIndex () const |
| virtual | ~KisAbstractShortcut () |
Public Attributes | |
| Qt::Key | key |
| QSet< Qt::Key > | modifiers |
| bool | useWheel |
| WheelAction | wheelAction |
Public Attributes inherited from KisAbstractShortcut | |
| KisAbstractInputAction * | action |
| int | shortcutIndex |
Private Attributes | |
| Private *const | m_d |
Private Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
Additional Inherited Members | |
Protected Member Functions inherited from KisAbstractShortcut | |
| bool | compareKeys (const QSet< Qt::Key > &keys1, const QSet< Qt::Key > &keys2) |
Private Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
This class represents a shortcut that executes a simple atomic action. It can be initiated either by a keyboard hotkey or by a mouse wheel rotation.
Definition at line 13 of file kis_single_action_shortcut.cpp.
| Enumerator | |
|---|---|
| WheelUp | Mouse wheel moves up. |
| WheelDown | Mouse wheel moves down. |
| WheelLeft | Mouse wheel moves left. |
| WheelRight | Mouse wheel moves right. |
| WheelTrackpad | A pan movement on a trackpad. |
Definition at line 21 of file kis_single_action_shortcut.h.
| KisSingleActionShortcut::KisSingleActionShortcut | ( | KisAbstractInputAction * | action, |
| int | index ) |
Definition at line 23 of file kis_single_action_shortcut.cpp.
|
override |
Definition at line 29 of file kis_single_action_shortcut.cpp.
References m_d.
| bool KisSingleActionShortcut::conflictsWith | ( | const QKeySequence & | seq | ) |
Check is the shortcut or the key sequence is a prefix of one another
Definition at line 65 of file kis_single_action_shortcut.cpp.
References KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE, and m_d.
| bool KisSingleActionShortcut::match | ( | const QSet< Qt::Key > & | modifiers, |
| Qt::Key | key ) |
Definition at line 53 of file kis_single_action_shortcut.cpp.
References KisAbstractShortcut::compareKeys(), key, m_d, and modifiers.
| bool KisSingleActionShortcut::match | ( | const QSet< Qt::Key > & | modifiers, |
| WheelAction | wheelAction ) |
Definition at line 59 of file kis_single_action_shortcut.cpp.
References KisAbstractShortcut::compareKeys(), m_d, modifiers, and wheelAction.
|
overridevirtual |
The priority of the shortcut. The shortcut with the greatest value will be chosen for execution
Implements KisAbstractShortcut.
Definition at line 34 of file kis_single_action_shortcut.cpp.
References KisAbstractShortcut::action, m_d, and KisAbstractInputAction::priority().
| void KisSingleActionShortcut::setKey | ( | const QSet< Qt::Key > & | modifiers, |
| Qt::Key | key ) |
| void KisSingleActionShortcut::setWheel | ( | const QSet< Qt::Key > & | modifiers, |
| WheelAction | wheelAction ) |
Definition at line 46 of file kis_single_action_shortcut.cpp.
References m_d, modifiers, and wheelAction.
| Qt::Key KisSingleActionShortcut::key |
Definition at line 17 of file kis_single_action_shortcut.cpp.
|
private |
Definition at line 47 of file kis_single_action_shortcut.h.
| QSet<Qt::Key> KisSingleActionShortcut::modifiers |
Definition at line 16 of file kis_single_action_shortcut.cpp.
| bool KisSingleActionShortcut::useWheel |
Definition at line 18 of file kis_single_action_shortcut.cpp.
| WheelAction KisSingleActionShortcut::wheelAction |
Definition at line 19 of file kis_single_action_shortcut.cpp.