|
Krita Source Code Documentation
|
The KisTouchShortcut class only handles touch gestures it does not handle tool invocation i.e painting (which is being handled in KisShortcutMatcher). More...
#include <kis_touch_shortcut.h>
Inheritance diagram for KisTouchShortcut:Classes | |
| class | Private |
Public Member Functions | |
| bool | isAvailable (KisInputActionGroupsMask mask) const override |
| bool | isHoldType () const |
| KisTouchShortcut (KisAbstractInputAction *action, int index, TouchGestureAction type) | |
| bool | matchDragType (const QTouchEvent *event, Qt::TouchPointStates allowedStates) |
| bool | matchHoldType (const QTouchEvent *event, Qt::TouchPointStates allowedStates) |
| bool | matchTapType (const QTouchEvent *event, Qt::TouchPointStates allowedStates) |
| bool | matchTouchPoint (const QTouchEvent *event, Qt::TouchPointStates allowedStates) |
| qreal | minDragThreshold () const |
| int | priority () const override |
| void | setIsTouchPainting (bool value) |
| void | setMaximumTouchPoints (int max) |
| void | setMinDragThreshold (qreal value) |
| void | setMinimumTouchPoints (int min) |
| ~KisTouchShortcut () override | |
Public Member Functions inherited from KisAbstractShortcut | |
| KisAbstractInputAction * | action () const |
| KisAbstractShortcut (KisAbstractInputAction *action, int index) | |
| void | setAction (KisAbstractInputAction *action) |
| int | shortcutIndex () const |
| virtual | ~KisAbstractShortcut () |
Static Public Member Functions | |
| static Qt::TouchPointStates | allTouchStates () |
| static int | countTouchPoints (const QTouchEvent *event, Qt::TouchPointStates allowedStates) |
| static Qt::TouchPointStates | pressedOnlyTouchStates () |
| static qreal | touchDragDistance (const QTouchEvent *event, Qt::TouchPointStates allowedStates) |
Private Types | |
| using | TouchGestureAction = KisShortcutConfiguration::TouchGestureAction |
Private Attributes | |
| Private *const | d |
Additional Inherited Members | |
Public Attributes inherited from KisAbstractShortcut | |
| KisAbstractInputAction * | action |
| int | shortcutIndex |
Protected Member Functions inherited from KisAbstractShortcut | |
| bool | compareKeys (const QSet< Qt::Key > &keys1, const QSet< Qt::Key > &keys2) |
The KisTouchShortcut class only handles touch gestures it does not handle tool invocation i.e painting (which is being handled in KisShortcutMatcher).
Definition at line 21 of file kis_touch_shortcut.h.
Definition at line 23 of file kis_touch_shortcut.h.
| KisTouchShortcut::KisTouchShortcut | ( | KisAbstractInputAction * | action, |
| int | index, | ||
| TouchGestureAction | type ) |
Definition at line 35 of file kis_touch_shortcut.cpp.
|
override |
|
inlinestatic |
Definition at line 46 of file kis_touch_shortcut.h.
|
static |
Definition at line 109 of file kis_touch_shortcut.cpp.
|
overridevirtual |
Returns true if the shortcut is enabled at the moment
Reimplemented from KisAbstractShortcut.
Definition at line 82 of file kis_touch_shortcut.cpp.
References d, KisAbstractShortcut::isAvailable(), and KisTouchShortcut::Private::isTouchPainting.
| bool KisTouchShortcut::isHoldType | ( | ) | const |
Definition at line 62 of file kis_touch_shortcut.cpp.
References d, KisShortcutConfiguration::OneFingerHold, and KisTouchShortcut::Private::type.
| bool KisTouchShortcut::matchDragType | ( | const QTouchEvent * | event, |
| Qt::TouchPointStates | allowedStates ) |
Definition at line 97 of file kis_touch_shortcut.cpp.
References d, KisShortcutConfiguration::FiveFingerDrag, matchTouchPoint(), KisTouchShortcut::Private::minDragThreshold, KisShortcutConfiguration::OneFingerDrag, touchDragDistance(), and KisTouchShortcut::Private::type.
| bool KisTouchShortcut::matchHoldType | ( | const QTouchEvent * | event, |
| Qt::TouchPointStates | allowedStates ) |
Definition at line 104 of file kis_touch_shortcut.cpp.
References isHoldType(), and matchTouchPoint().
| bool KisTouchShortcut::matchTapType | ( | const QTouchEvent * | event, |
| Qt::TouchPointStates | allowedStates ) |
Definition at line 91 of file kis_touch_shortcut.cpp.
References d, KisShortcutConfiguration::FiveFingerTap, matchTouchPoint(), KisShortcutConfiguration::OneFingerTap, and KisTouchShortcut::Private::type.
| bool KisTouchShortcut::matchTouchPoint | ( | const QTouchEvent * | event, |
| Qt::TouchPointStates | allowedStates ) |
Definition at line 149 of file kis_touch_shortcut.cpp.
References countTouchPoints(), d, KisTouchShortcut::Private::maxTouchPoints, and KisTouchShortcut::Private::minTouchPoints.
| qreal KisTouchShortcut::minDragThreshold | ( | ) | const |
Definition at line 47 of file kis_touch_shortcut.cpp.
References d, and KisTouchShortcut::Private::minDragThreshold.
|
inlinestatic |
Definition at line 50 of file kis_touch_shortcut.h.
|
overridevirtual |
The priority of the shortcut. The shortcut with the greatest value will be chosen for execution
Implements KisAbstractShortcut.
Definition at line 57 of file kis_touch_shortcut.cpp.
References KisAbstractShortcut::action, d, KisTouchShortcut::Private::isTouchPainting, and KisAbstractInputAction::priority().
| void KisTouchShortcut::setIsTouchPainting | ( | bool | value | ) |
Definition at line 77 of file kis_touch_shortcut.cpp.
References d, KisTouchShortcut::Private::isTouchPainting, and value().
| void KisTouchShortcut::setMaximumTouchPoints | ( | int | max | ) |
Definition at line 72 of file kis_touch_shortcut.cpp.
References d, and KisTouchShortcut::Private::maxTouchPoints.
| void KisTouchShortcut::setMinDragThreshold | ( | qreal | value | ) |
Definition at line 52 of file kis_touch_shortcut.cpp.
References d, KisTouchShortcut::Private::minDragThreshold, and value().
| void KisTouchShortcut::setMinimumTouchPoints | ( | int | min | ) |
Definition at line 67 of file kis_touch_shortcut.cpp.
References d, and KisTouchShortcut::Private::minTouchPoints.
|
static |
Definition at line 128 of file kis_touch_shortcut.cpp.
References KisAlgebra2D::normSquared().
|
private |
Definition at line 60 of file kis_touch_shortcut.h.