|
Krita Source Code Documentation
|
#include <kis_input_manager_p.h>
Classes | |
| class | CanvasSwitcher |
| struct | EventEater |
| class | ProximityNotifier |
| class | TabletLatencyTracker |
Public Types | |
| typedef QList< PriorityPair > | PriorityList |
| typedef QPair< int, QPointer< QObject > > | PriorityPair |
Static Public Attributes | |
| static constexpr int | TOUCH_HOLD_DELAY_MS = 400 |
Definition at line 29 of file kis_input_manager_p.h.
Definition at line 67 of file kis_input_manager_p.h.
| typedef QPair<int, QPointer<QObject> > KisInputManager::Private::PriorityPair |
Definition at line 66 of file kis_input_manager_p.h.
| KisInputManager::Private::Private | ( | KisInputManager * | ) |
On Windows and Linux we have a proper fix for this bug patched into our local version of Qt. We don't have a fix for macOS
In Linux distributions Qt is not patched, so we should use workaround for them
Definition at line 198 of file kis_input_manager_p.cpp.
References AllActionGroup, canvas, matcher, moveEventCompressor, KisSignalCompressor::setDelay(), KisShortcutMatcher::setInputActionGroupsMaskCallback(), KisInputManager::slotTouchHoldTriggered(), KisConfig::tabletEventsDelay(), tabletLatencyTracker, testingAcceptCompressedTabletEvents, KisConfig::testingAcceptCompressedTabletEvents(), testingCompressBrushEvents, KisConfig::testingCompressBrushEvents(), TOUCH_HOLD_DELAY_MS, touchHoldTimer, KisConfig::trackTabletEventLatency(), and useUnbalancedKeyPressEventWorkaround.
| void KisInputManager::Private::addKeyShortcut | ( | KisAbstractInputAction * | action, |
| int | index, | ||
| const QList< Qt::Key > & | keys ) |
Definition at line 509 of file kis_input_manager_p.cpp.
References KisShortcutMatcher::addShortcut(), matcher, and KisSingleActionShortcut::setKey().
| bool KisInputManager::Private::addNativeGestureShortcut | ( | KisAbstractInputAction * | action, |
| int | index, | ||
| KisShortcutConfiguration::GestureAction | gesture ) |
Definition at line 603 of file kis_input_manager_p.cpp.
References KisShortcutMatcher::addShortcut(), and matcher.
| void KisInputManager::Private::addStrokeShortcut | ( | KisAbstractInputAction * | action, |
| int | index, | ||
| const QList< Qt::Key > & | modifiers, | ||
| Qt::MouseButtons | buttons ) |
Definition at line 480 of file kis_input_manager_p.cpp.
References _, KisShortcutMatcher::addShortcut(), buttons(), EXTRA_BUTTON, matcher, and KisStrokeShortcut::setButtons().
| void KisInputManager::Private::addTouchShortcut | ( | KisAbstractInputAction * | action, |
| int | index, | ||
| KisShortcutConfiguration::GestureAction | gesture ) |
Definition at line 559 of file kis_input_manager_p.cpp.
References KisShortcutMatcher::addShortcut(), dbgKrita, KisShortcutConfiguration::FiveFingerDrag, KisShortcutConfiguration::FiveFingerTap, KisShortcutConfiguration::FourFingerDrag, KisShortcutConfiguration::FourFingerTap, matcher, KisAbstractInputAction::name, KisShortcutConfiguration::OneFingerDrag, KisShortcutConfiguration::OneFingerHold, KisShortcutConfiguration::OneFingerTap, KisTouchShortcut::setDisableOnTouchPainting(), KisTouchShortcut::setMaximumTouchPoints(), KisTouchShortcut::setMinimumTouchPoints(), KisShortcutConfiguration::ThreeFingerDrag, KisShortcutConfiguration::ThreeFingerTap, KisShortcutConfiguration::TwoFingerDrag, and KisShortcutConfiguration::TwoFingerTap.
| void KisInputManager::Private::addWheelShortcut | ( | KisAbstractInputAction * | action, |
| int | index, | ||
| const QList< Qt::Key > & | modifiers, | ||
| KisShortcutConfiguration::MouseWheelMovement | wheelAction ) |
Definition at line 528 of file kis_input_manager_p.cpp.
References KisShortcutMatcher::addShortcut(), matcher, KisShortcutConfiguration::WheelDown, KisSingleActionShortcut::WheelDown, KisShortcutConfiguration::WheelLeft, KisSingleActionShortcut::WheelLeft, KisShortcutConfiguration::WheelRight, KisSingleActionShortcut::WheelRight, KisShortcutConfiguration::WheelTrackpad, KisSingleActionShortcut::WheelTrackpad, KisShortcutConfiguration::WheelUp, and KisSingleActionShortcut::WheelUp.
| void KisInputManager::Private::allowMouseEvents | ( | ) |
On Windows tablet events may arrive asynchronously to the mouse events (in WinTab mode). The problem is that Qt generates Enter/Leave and FocusIn/Out events via mouse events only. It means that TabletPress may come much before Enter and FocusIn event and start the stroke. In such a case we shouldn't unblock mouse events.
See https://bugs.kde.org/show_bug.cgi?id=417040
PS: Ideally, we should fix Qt to generate Enter/Leave and FocusIn/Out events based on tablet events as well, but it is a lot of work.
Definition at line 679 of file kis_input_manager_p.cpp.
References KisInputManager::Private::EventEater::deactivate(), eventEater, KisShortcutMatcher::hasRunningShortcut(), KisInputManager::Private::EventEater::hungry, and matcher.
| void KisInputManager::Private::blockMouseEvents | ( | ) |
Definition at line 674 of file kis_input_manager_p.cpp.
References KisInputManager::Private::EventEater::activate(), and eventEater.
| void KisInputManager::Private::bufferTouchEvent | ( | QTouchEvent * | event | ) |
Definition at line 747 of file kis_input_manager_p.cpp.
References bufferedTouchEvents.
| void KisInputManager::Private::cancelTouchHoldTimer | ( | ) |
Definition at line 730 of file kis_input_manager_p.cpp.
References touchHoldTimer.
| void KisInputManager::Private::clearBufferedTouchEvents | ( | ) |
Definition at line 777 of file kis_input_manager_p.cpp.
References bufferedTouchEvents.
|
inline |
Definition at line 103 of file kis_input_manager_p.h.
References dbgTablet, debugEnabled(), KisTabletDebugger::eventToString(), ignoringQtCursorEvents(), and KisTabletDebugger::instance().
| void KisInputManager::Private::eatOneMousePress | ( | ) |
Definition at line 705 of file kis_input_manager_p.cpp.
References KisInputManager::Private::EventEater::eatOneMousePress(), and eventEater.
| void KisInputManager::Private::fixShortcutMatcherModifiersState | ( | ) |
Definition at line 800 of file kis_input_manager_p.cpp.
References fixShortcutMatcherModifiersState(), KisExtendedModifiersMapper::queryExtendedModifiers(), KisExtendedModifiersMapper::queryStandardModifiers(), and KisExtendedModifiersMapper::workaroundShiftAltMetaHell().
| void KisInputManager::Private::fixShortcutMatcherModifiersState | ( | QVector< Qt::Key > | newKeys, |
| Qt::KeyboardModifiers | modifiers ) |
Definition at line 814 of file kis_input_manager_p.cpp.
References KisShortcutMatcher::debugPressedKeys(), KisShortcutMatcher::handlePolledKeys(), matcher, and processUnhandledEvent().
| void KisInputManager::Private::flushBufferedTouchEvents | ( | ) |
Definition at line 758 of file kis_input_manager_p.cpp.
References bufferedTouchEvents, KisInputManager::handleTouchBegin(), KisInputManager::handleTouchUpdate(), and q.
| bool KisInputManager::Private::handleCompressedTabletEvent | ( | QEvent * | event | ) |
Definition at line 785 of file kis_input_manager_p.cpp.
References matcher, KisShortcutMatcher::pointerMoved(), toolProxy, touchHasBlockedPressEvents, and KisShortcutMatcher::touchUpdateEvent().
| bool KisInputManager::Private::ignoringQtCursorEvents | ( | ) |
Definition at line 188 of file kis_input_manager_p.cpp.
References eventEater, and KisInputManager::Private::EventEater::hungry.
| bool KisInputManager::Private::isPendingTouchHold | ( | ) | const |
Definition at line 735 of file kis_input_manager_p.cpp.
References touchHoldTimer.
| bool KisInputManager::Private::isWithinTouchHoldSlopRange | ( | const QPointF & | currentPos | ) | const |
Definition at line 740 of file kis_input_manager_p.cpp.
References KisInputManager::d, startingPos, and KisShortcutMatcher::TOUCH_SLOP_SQUARED.
| bool KisInputManager::Private::processUnhandledEvent | ( | QEvent * | event | ) |
Definition at line 649 of file kis_input_manager_p.cpp.
References defaultInputAction, forwardAllEventsToTool, and KisToolInvocationAction::processUnhandledEvent().
| void KisInputManager::Private::resetCompressor | ( | ) |
Definition at line 710 of file kis_input_manager_p.cpp.
References compressedMoveEvent, moveEventCompressor, and KisSignalCompressor::stop().
| void KisInputManager::Private::restartTouchHoldTimer | ( | ) |
Definition at line 725 of file kis_input_manager_p.cpp.
References touchHoldTimer.
| void KisInputManager::Private::setMaskSyntheticEvents | ( | bool | value | ) |
Definition at line 193 of file kis_input_manager_p.cpp.
References KisInputManager::Private::EventEater::eatSyntheticEvents, eventEater, and value().
| void KisInputManager::Private::setupActions | ( | ) |
Definition at line 631 of file kis_input_manager_p.cpp.
References KisInputProfileManager::actions, defaultInputAction, KisInputProfileManager::instance(), KisInputManager::profileChanged(), and q.
| void KisInputManager::Private::startBlockingTouch | ( | ) |
Definition at line 715 of file kis_input_manager_p.cpp.
References eventEater, and KisInputManager::Private::EventEater::startBlockingTouch().
| void KisInputManager::Private::stopBlockingTouch | ( | ) |
Definition at line 720 of file kis_input_manager_p.cpp.
References eventEater, and KisInputManager::Private::EventEater::stopBlockingTouch().
| int KisInputManager::Private::accumulatedScrollDelta = 0 |
Definition at line 170 of file kis_input_manager_p.h.
| QVector<QTouchEvent *> KisInputManager::Private::bufferedTouchEvents |
Definition at line 85 of file kis_input_manager_p.h.
| QPointer<KisCanvas2> KisInputManager::Private::canvas |
Definition at line 48 of file kis_input_manager_p.h.
| CanvasSwitcher KisInputManager::Private::canvasSwitcher |
Definition at line 139 of file kis_input_manager_p.h.
| QScopedPointer<QEvent> KisInputManager::Private::compressedMoveEvent |
Definition at line 62 of file kis_input_manager_p.h.
| bool KisInputManager::Private::containsPointer = false |
Definition at line 168 of file kis_input_manager_p.h.
| KisToolInvocationAction* KisInputManager::Private::defaultInputAction = 0 |
Definition at line 58 of file kis_input_manager_p.h.
| EventEater KisInputManager::Private::eventEater |
Definition at line 166 of file kis_input_manager_p.h.
| QObject* KisInputManager::Private::eventsReceiver = 0 |
Definition at line 60 of file kis_input_manager_p.h.
| bool KisInputManager::Private::forwardAllEventsToTool = false |
Definition at line 51 of file kis_input_manager_p.h.
| int KisInputManager::Private::lastPointCount = 0 |
Definition at line 73 of file kis_input_manager_p.h.
| KisShortcutMatcher KisInputManager::Private::matcher |
Definition at line 56 of file kis_input_manager_p.h.
| KisSignalCompressor KisInputManager::Private::moveEventCompressor |
Definition at line 61 of file kis_input_manager_p.h.
| QScopedPointer<QEvent> KisInputManager::Private::originatingTouchBeginEvent |
Definition at line 77 of file kis_input_manager_p.h.
| bool KisInputManager::Private::popupWasActive = false |
Definition at line 72 of file kis_input_manager_p.h.
| KisPopupWidgetInterface* KisInputManager::Private::popupWidget |
Definition at line 82 of file kis_input_manager_p.h.
| QPointF KisInputManager::Private::previousPos |
Definition at line 76 of file kis_input_manager_p.h.
| PriorityList KisInputManager::Private::priorityEventFilter |
Definition at line 68 of file kis_input_manager_p.h.
| int KisInputManager::Private::priorityEventFilterSeqNo |
Definition at line 69 of file kis_input_manager_p.h.
| KisInputManager* KisInputManager::Private::q |
Definition at line 46 of file kis_input_manager_p.h.
| bool KisInputManager::Private::shouldSynchronizeOnNextKeyPress = false |
Definition at line 80 of file kis_input_manager_p.h.
| QPointF KisInputManager::Private::startingPos |
Definition at line 75 of file kis_input_manager_p.h.
| KisSharedPtr<TabletLatencyTracker> KisInputManager::Private::tabletLatencyTracker |
Definition at line 178 of file kis_input_manager_p.h.
| bool KisInputManager::Private::testingAcceptCompressedTabletEvents = false |
Definition at line 63 of file kis_input_manager_p.h.
| bool KisInputManager::Private::testingCompressBrushEvents = false |
Definition at line 64 of file kis_input_manager_p.h.
| QPointer<KisToolProxy> KisInputManager::Private::toolProxy |
Definition at line 49 of file kis_input_manager_p.h.
|
staticconstexpr |
Definition at line 32 of file kis_input_manager_p.h.
| bool KisInputManager::Private::touchHasBlockedPressEvents = false |
Definition at line 54 of file kis_input_manager_p.h.
| QTimer* KisInputManager::Private::touchHoldTimer |
Definition at line 84 of file kis_input_manager_p.h.
| bool KisInputManager::Private::touchStrokeStarted = false |
Definition at line 71 of file kis_input_manager_p.h.
| bool KisInputManager::Private::useUnbalancedKeyPressEventWorkaround = false |
Definition at line 79 of file kis_input_manager_p.h.