Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_native_gesture_shortcut.cpp
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2017 Bernhard Liebl <poke1024@gmx.de>
3
*
4
* SPDX-License-Identifier: GPL-2.0-or-later
5
*
6
*/
7
8
#include "
kis_native_gesture_shortcut.h
"
9
10
#include <QNativeGestureEvent>
11
12
class
KisNativeGestureShortcut::Private
13
{
14
public
:
15
Private
() { }
16
17
Type
type
=
PinchNavigation
;
18
};
19
20
KisNativeGestureShortcut::KisNativeGestureShortcut
(
KisAbstractInputAction
* action,
int
index,
Type
type)
21
:
KisAbstractShortcut
(action, index), d(new
Private
)
22
{
23
d
->
type
= type;
24
}
25
26
KisNativeGestureShortcut::~KisNativeGestureShortcut
()
27
{
28
delete
d
;
29
}
30
31
int
KisNativeGestureShortcut::priority
()
const
32
{
33
return
0;
34
}
35
36
bool
KisNativeGestureShortcut::match
(QNativeGestureEvent* event)
37
{
38
if
(
d
->
type
==
PinchNavigation
) {
39
return
event
->gestureType() == Qt::PanNativeGesture ||
event
->gestureType() == Qt::ZoomNativeGesture
40
||
event
->gestureType() == Qt::RotateNativeGesture;
41
}
else
if
(
d
->
type
==
SmartZoomNativeGesture
) {
42
return
event
->gestureType() == Qt::SmartZoomNativeGesture;
43
}
44
45
return
false
;
46
}
KisAbstractInputAction
Abstract base class for input actions.
Definition
kis_abstract_input_action.cpp:20
KisAbstractShortcut
Definition
kis_abstract_shortcut.cpp:13
KisNativeGestureShortcut::Private
Definition
kis_native_gesture_shortcut.cpp:13
KisNativeGestureShortcut::Private::type
Type type
Definition
kis_native_gesture_shortcut.cpp:17
KisNativeGestureShortcut::Private::Private
Private()
Definition
kis_native_gesture_shortcut.cpp:15
KisNativeGestureShortcut::match
bool match(QNativeGestureEvent *event)
Definition
kis_native_gesture_shortcut.cpp:36
KisNativeGestureShortcut::~KisNativeGestureShortcut
~KisNativeGestureShortcut() override
Definition
kis_native_gesture_shortcut.cpp:26
KisNativeGestureShortcut::d
Private *const d
Definition
kis_native_gesture_shortcut.h:32
KisNativeGestureShortcut::KisNativeGestureShortcut
KisNativeGestureShortcut(KisAbstractInputAction *action, int index, Type type)
Definition
kis_native_gesture_shortcut.cpp:20
KisNativeGestureShortcut::Type
Type
Definition
kis_native_gesture_shortcut.h:17
KisNativeGestureShortcut::SmartZoomNativeGesture
@ SmartZoomNativeGesture
Definition
kis_native_gesture_shortcut.h:19
KisNativeGestureShortcut::PinchNavigation
@ PinchNavigation
Definition
kis_native_gesture_shortcut.h:18
KisNativeGestureShortcut::priority
int priority() const override
Definition
kis_native_gesture_shortcut.cpp:31
kis_native_gesture_shortcut.h
Private
Definition
SvgTransformParser.cpp:20
libs
ui
input
kis_native_gesture_shortcut.cpp
Generated at
2026-10-17 02:30:02+02:00
from
Krita
branch
master
, commit
903a17397f5fbe8a26c41562659febfa2f7fb5a5