Krita Source Code Documentation
Loading...
Searching...
No Matches
KisNativeGestureShortcut Class Reference

#include <kis_native_gesture_shortcut.h>

+ Inheritance diagram for KisNativeGestureShortcut:

Classes

class  Private
 

Public Member Functions

 KisNativeGestureShortcut (KisAbstractInputAction *action, int index, Qt::NativeGestureType type)
 
bool match (QNativeGestureEvent *event)
 
int priority () const override
 
 ~KisNativeGestureShortcut () override
 
- Public Member Functions inherited from KisAbstractShortcut
KisAbstractInputActionaction () const
 
bool isAvailable (KisInputActionGroupsMask mask) const
 
 KisAbstractShortcut (KisAbstractInputAction *action, int index)
 
void setAction (KisAbstractInputAction *action)
 
int shortcutIndex () const
 
virtual ~KisAbstractShortcut ()
 

Private Attributes

Private *const d {nullptr}
 

Additional Inherited Members

- Public Attributes inherited from KisAbstractShortcut
KisAbstractInputActionaction
 
int shortcutIndex
 
- Protected Member Functions inherited from KisAbstractShortcut
bool compareKeys (const QSet< Qt::Key > &keys1, const QSet< Qt::Key > &keys2)
 

Detailed Description

Definition at line 14 of file kis_native_gesture_shortcut.h.

Constructor & Destructor Documentation

◆ KisNativeGestureShortcut()

KisNativeGestureShortcut::KisNativeGestureShortcut ( KisAbstractInputAction * action,
int index,
Qt::NativeGestureType type )

Definition at line 21 of file kis_native_gesture_shortcut.cpp.

22 : KisAbstractShortcut(action, index), d(new Private)
23{
24 d->type = type;
25}
KisAbstractInputAction * action
KisAbstractShortcut(KisAbstractInputAction *action, int index)

References d, and KisNativeGestureShortcut::Private::type.

◆ ~KisNativeGestureShortcut()

KisNativeGestureShortcut::~KisNativeGestureShortcut ( )
override

Definition at line 27 of file kis_native_gesture_shortcut.cpp.

28{
29 delete d;
30}

References d.

Member Function Documentation

◆ match()

bool KisNativeGestureShortcut::match ( QNativeGestureEvent * event)

Definition at line 37 of file kis_native_gesture_shortcut.cpp.

38{
39 //printf("checking NativeGesture against KisNativeGestureShortcut %d %d\n", (int)event->gestureType(), (int)d->type);
40 return event->gestureType() == d->type;
41}

References d, and KisNativeGestureShortcut::Private::type.

◆ priority()

int KisNativeGestureShortcut::priority ( ) const
overridevirtual

The priority of the shortcut. The shortcut with the greatest value will be chosen for execution

Implements KisAbstractShortcut.

Definition at line 32 of file kis_native_gesture_shortcut.cpp.

33{
34 return 0;
35}

Member Data Documentation

◆ d

Private* const KisNativeGestureShortcut::d {nullptr}
private

Definition at line 26 of file kis_native_gesture_shortcut.h.

26{nullptr};

The documentation for this class was generated from the following files: