|
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 |
Public Attributes | |
| int | accumulatedScrollDelta = 0 |
| QPointer< KisCanvas2 > | canvas |
| CanvasSwitcher | canvasSwitcher |
| QScopedPointer< QEvent > | compressedMoveEvent |
| bool | containsPointer = false |
| KisToolInvocationAction * | defaultInputAction = 0 |
| EventEater | eventEater |
| QObject * | eventsReceiver = 0 |
| bool | forwardAllEventsToTool = false |
| KisShortcutMatcher | matcher |
| KisSignalCompressor | moveEventCompressor |
| QScopedPointer< QEvent > | originatingTouchBeginEvent |
| bool | popupWasActive = false |
| KisPopupWidgetInterface * | popupWidget |
| QPointF | previousPos |
| PriorityList | priorityEventFilter |
| int | priorityEventFilterSeqNo |
| KisInputManager * | q |
| bool | shouldSynchronizeOnNextKeyPress = false |
| KisSharedPtr< TabletLatencyTracker > | tabletLatencyTracker |
| bool | testingAcceptCompressedTabletEvents = false |
| bool | testingCompressBrushEvents = false |
| QPointer< KisToolProxy > | toolProxy |
| bool | touchHasBlockedPressEvents = false |
| bool | touchStrokeStarted = false |
| bool | useUnbalancedKeyPressEventWorkaround = false |
Definition at line 29 of file kis_input_manager_p.h.
Definition at line 65 of file kis_input_manager_p.h.
| typedef QPair<int, QPointer<QObject> > KisInputManager::Private::PriorityPair |
Definition at line 64 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 197 of file kis_input_manager_p.cpp.
References AllActionGroup, canvas, matcher, moveEventCompressor, KisSignalCompressor::setDelay(), KisShortcutMatcher::setInputActionGroupsMaskCallback(), KisConfig::tabletEventsDelay(), tabletLatencyTracker, testingAcceptCompressedTabletEvents, KisConfig::testingAcceptCompressedTabletEvents(), testingCompressBrushEvents, KisConfig::testingCompressBrushEvents(), KisConfig::trackTabletEventLatency(), and useUnbalancedKeyPressEventWorkaround.
| void KisInputManager::Private::addKeyShortcut | ( | KisAbstractInputAction * | action, |
| int | index, | ||
| const QList< Qt::Key > & | keys ) |
Definition at line 502 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 592 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 473 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 552 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::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 521 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 668 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 663 of file kis_input_manager_p.cpp.
References KisInputManager::Private::EventEater::activate(), and eventEater.
|
inline |
Definition at line 89 of file kis_input_manager_p.h.
References dbgTablet, debugEnabled(), KisTabletDebugger::eventToString(), ignoringQtCursorEvents(), and KisTabletDebugger::instance().
| void KisInputManager::Private::eatOneMousePress | ( | ) |
Definition at line 694 of file kis_input_manager_p.cpp.
References KisInputManager::Private::EventEater::eatOneMousePress(), and eventEater.
| void KisInputManager::Private::fixShortcutMatcherModifiersState | ( | ) |
Definition at line 729 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 743 of file kis_input_manager_p.cpp.
References KisShortcutMatcher::debugPressedKeys(), KisShortcutMatcher::handlePolledKeys(), matcher, and processUnhandledEvent().
| bool KisInputManager::Private::handleCompressedTabletEvent | ( | QEvent * | event | ) |
Definition at line 714 of file kis_input_manager_p.cpp.
References matcher, KisShortcutMatcher::pointerMoved(), toolProxy, touchHasBlockedPressEvents, and KisShortcutMatcher::touchUpdateEvent().
| bool KisInputManager::Private::ignoringQtCursorEvents | ( | ) |
Definition at line 187 of file kis_input_manager_p.cpp.
References eventEater, and KisInputManager::Private::EventEater::hungry.
| bool KisInputManager::Private::processUnhandledEvent | ( | QEvent * | event | ) |
Definition at line 638 of file kis_input_manager_p.cpp.
References defaultInputAction, forwardAllEventsToTool, and KisToolInvocationAction::processUnhandledEvent().
| void KisInputManager::Private::resetCompressor | ( | ) |
Definition at line 699 of file kis_input_manager_p.cpp.
References compressedMoveEvent, moveEventCompressor, and KisSignalCompressor::stop().
| void KisInputManager::Private::setMaskSyntheticEvents | ( | bool | value | ) |
Definition at line 192 of file kis_input_manager_p.cpp.
References KisInputManager::Private::EventEater::eatSyntheticEvents, eventEater, and value().
| void KisInputManager::Private::setupActions | ( | ) |
Definition at line 620 of file kis_input_manager_p.cpp.
References KisInputProfileManager::actions, connect(), defaultInputAction, KisInputProfileManager::instance(), KisInputManager::profileChanged(), and q.
| void KisInputManager::Private::startBlockingTouch | ( | ) |
Definition at line 704 of file kis_input_manager_p.cpp.
References eventEater, and KisInputManager::Private::EventEater::startBlockingTouch().
| void KisInputManager::Private::stopBlockingTouch | ( | ) |
Definition at line 709 of file kis_input_manager_p.cpp.
References eventEater, and KisInputManager::Private::EventEater::stopBlockingTouch().
| int KisInputManager::Private::accumulatedScrollDelta = 0 |
Definition at line 156 of file kis_input_manager_p.h.
| QPointer<KisCanvas2> KisInputManager::Private::canvas |
Definition at line 46 of file kis_input_manager_p.h.
| CanvasSwitcher KisInputManager::Private::canvasSwitcher |
Definition at line 125 of file kis_input_manager_p.h.
| QScopedPointer<QEvent> KisInputManager::Private::compressedMoveEvent |
Definition at line 60 of file kis_input_manager_p.h.
| bool KisInputManager::Private::containsPointer = false |
Definition at line 154 of file kis_input_manager_p.h.
| KisToolInvocationAction* KisInputManager::Private::defaultInputAction = 0 |
Definition at line 56 of file kis_input_manager_p.h.
| EventEater KisInputManager::Private::eventEater |
Definition at line 152 of file kis_input_manager_p.h.
| QObject* KisInputManager::Private::eventsReceiver = 0 |
Definition at line 58 of file kis_input_manager_p.h.
| bool KisInputManager::Private::forwardAllEventsToTool = false |
Definition at line 49 of file kis_input_manager_p.h.
| KisShortcutMatcher KisInputManager::Private::matcher |
Definition at line 54 of file kis_input_manager_p.h.
| KisSignalCompressor KisInputManager::Private::moveEventCompressor |
Definition at line 59 of file kis_input_manager_p.h.
| QScopedPointer<QEvent> KisInputManager::Private::originatingTouchBeginEvent |
Definition at line 73 of file kis_input_manager_p.h.
| bool KisInputManager::Private::popupWasActive = false |
Definition at line 70 of file kis_input_manager_p.h.
| KisPopupWidgetInterface* KisInputManager::Private::popupWidget |
Definition at line 78 of file kis_input_manager_p.h.
| QPointF KisInputManager::Private::previousPos |
Definition at line 72 of file kis_input_manager_p.h.
| PriorityList KisInputManager::Private::priorityEventFilter |
Definition at line 66 of file kis_input_manager_p.h.
| int KisInputManager::Private::priorityEventFilterSeqNo |
Definition at line 67 of file kis_input_manager_p.h.
| KisInputManager* KisInputManager::Private::q |
Definition at line 44 of file kis_input_manager_p.h.
| bool KisInputManager::Private::shouldSynchronizeOnNextKeyPress = false |
Definition at line 76 of file kis_input_manager_p.h.
| KisSharedPtr<TabletLatencyTracker> KisInputManager::Private::tabletLatencyTracker |
Definition at line 164 of file kis_input_manager_p.h.
| bool KisInputManager::Private::testingAcceptCompressedTabletEvents = false |
Definition at line 61 of file kis_input_manager_p.h.
| bool KisInputManager::Private::testingCompressBrushEvents = false |
Definition at line 62 of file kis_input_manager_p.h.
| QPointer<KisToolProxy> KisInputManager::Private::toolProxy |
Definition at line 47 of file kis_input_manager_p.h.
| bool KisInputManager::Private::touchHasBlockedPressEvents = false |
Definition at line 52 of file kis_input_manager_p.h.
| bool KisInputManager::Private::touchStrokeStarted = false |
Definition at line 69 of file kis_input_manager_p.h.
| bool KisInputManager::Private::useUnbalancedKeyPressEventWorkaround = false |
Definition at line 75 of file kis_input_manager_p.h.