7#ifndef __KIS_SHORTCUT_MATCHER_H
8#define __KIS_SHORTCUT_MATCHER_H
19class QNativeGestureEvent;
80 bool hasRunningShortcut()
const;
94 bool supportsHiResInputEvents();
103 bool keyPressed(Qt::Key key);
112 bool autoRepeatedKeyPressed(Qt::Key key);
121 bool keyReleased(Qt::Key key);
132 bool buttonPressed(Qt::MouseButton
button, QEvent *event);
143 bool buttonReleased(Qt::MouseButton
button, QEvent *event);
161 bool pointerMoved(QEvent *event);
175 bool touchBeginEvent(QTouchEvent *event);
176 bool touchUpdateEvent(QTouchEvent *event);
177 bool touchEndEvent(QTouchEvent *event);
184 void touchCancelEvent(QTouchEvent *event,
const QPointF &localPos);
186 bool nativeGestureBeginEvent(QNativeGestureEvent *event);
187 bool nativeGestureEvent(QNativeGestureEvent *event);
188 bool nativeGestureEndEvent(QNativeGestureEvent *event);
206 void reinitializeButtons();
224 bool sanityCheckModifiersCorrectness(Qt::KeyboardModifiers modifiers)
const;
234 bool hasPolledKeys();
240 void lostFocusEvent(
const QPointF &localPos);
246 void toolHasBeenActivated();
276 void clearShortcuts();
278 void setInputActionGroupsMaskCallback(std::function<KisInputActionGroupsMask()> func);
281 friend class KisInputManagerTest;
284 void reset(QString msg);
287 template<
typename T,
typename U>
bool tryRunSingleActionShortcutImpl(T param, U *event,
const QSet<Qt::Key> &keysState,
bool keyboard =
true);
289 void prepareReadyShortcuts();
291 bool tryRunReadyShortcut( Qt::MouseButton
button, QEvent* event );
292 void tryActivateReadyShortcut();
293 bool tryEndRunningShortcut( Qt::MouseButton
button, QEvent* event );
294 void forceEndRunningShortcut(
const QPointF &localPos);
295 void forceDeactivateAllActions();
297 void setMaxTouchPointEvent(QTouchEvent *event);
298 void fireReadyTouchShortcut(QTouchEvent *event);
300 bool tryRunTouchShortcut(QTouchEvent *event);
301 bool tryEndTouchShortcut(QTouchEvent *event);
303 bool tryRunNativeGestureShortcut(QNativeGestureEvent *event);
304 bool tryEndNativeGestureShortcut(QNativeGestureEvent *event);
float value(const T *src, size_t ch)
void suppressAllKeyboardActions(bool value)
void suppressAllActions(bool value)
The KisTouchShortcut class only handles touch gestures it does not handle tool invocation i....
QString button(const QWheelEvent &ev)