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
9
10#include <QNativeGestureEvent>
11
13{
14public:
15 Private() { }
16
17 // Coverity requires sane defaults for every variable (CID 248365)
18 Qt::NativeGestureType type {Qt::PanNativeGesture};
19};
20
22 : KisAbstractShortcut(action, index), d(new Private)
23{
24 d->type = type;
25}
26
31
33{
34 return 0;
35}
36
37bool KisNativeGestureShortcut::match(QNativeGestureEvent* event)
38{
39 //printf("checking NativeGesture against KisNativeGestureShortcut %d %d\n", (int)event->gestureType(), (int)d->type);
40 return event->gestureType() == d->type;
41}
Abstract base class for input actions.
bool match(QNativeGestureEvent *event)
KisNativeGestureShortcut(KisAbstractInputAction *action, int index, Qt::NativeGestureType type)