|
Krita Source Code Documentation
|
#include <KisInputEventsEater.h>
Public Types | |
| enum | EventBlockingReason { NotBlocked = 0x0 , BlockedByTabletProximity = 0x01 , BlockedByTabletHover = 0x02 , BlockedByTabletPress = 0x04 , BlockedByTouchPress = 0x08 , BlockedByNextPressSuppression = 0x10 , BlockedByButtonsWorkaround = 0x20 , BlockedBySynthetic = 0x40 } |
Public Member Functions | |
| void | eatOneMousePress () |
| bool | eventFilter (QObject *target, QEvent *event) |
| KisInputEventsEater () | |
| void | notifyTabletEnterProximity () |
| void | notifyTabletLeaveProximity () |
Static Public Member Functions | |
| template<class Event > | |
| static void | debugEvent (QEvent *event, EventBlockingReasons reasons=NotBlocked) |
Private Member Functions | |
| void | debugEaterStateTransition (const QLatin1String &stateName, bool newValue, QEvent::Type eventType, const QLatin1String &comment=QLatin1String()) |
Private Attributes | |
| bool | activateSecondaryButtonsWorkaround {false} |
| bool | eatOneMousePressEvent {false} |
| bool | tabletIsHovering {false} |
| bool | tabletIsInProximity {false} |
| bool | tabletIsPressed {false} |
| bool | touchIsActive {false} |
Definition at line 24 of file KisInputEventsEater.h.
| Enumerator | |
|---|---|
| NotBlocked | |
| BlockedByTabletProximity | |
| BlockedByTabletHover | |
| BlockedByTabletPress | |
| BlockedByTouchPress | |
| BlockedByNextPressSuppression | |
| BlockedByButtonsWorkaround | |
| BlockedBySynthetic | |
Definition at line 27 of file KisInputEventsEater.h.
| KisInputEventsEater::KisInputEventsEater | ( | ) |
Definition at line 75 of file KisInputEventsEater.cpp.
References activateSecondaryButtonsWorkaround, and KisConfig::useRightMiddleTabletButtonWorkaround().
|
private |
Definition at line 81 of file KisInputEventsEater.cpp.
References dbgInputEater.
|
inlinestatic |
Definition at line 50 of file KisInputEventsEater.h.
References dbgTablet, debugEnabled(), KisTabletDebugger::eventToString(), and KisTabletDebugger::instance().
| void KisInputEventsEater::eatOneMousePress | ( | ) |
Definition at line 350 of file KisInputEventsEater.cpp.
References eatOneMousePressEvent.
| bool KisInputEventsEater::eventFilter | ( | QObject * | target, |
| QEvent * | event ) |
Tablet events have higher priority over the touch events, so, if a touch has been started before the tablet stroke, then TouchUpdate events will no cause the EventEater to perform state transitions to the tablet state (on Windows, the streams of touch and tablet event come in parallel independently).
Please note that the actual cancellation of the already started touch action is performed inside KisShortcutMatcher, not in the event eater. Here we just allow all the TouchUpdate events pass firther and block synthesized mouse events only.
Definition at line 89 of file KisInputEventsEater.cpp.
References activateSecondaryButtonsWorkaround, BlockedByButtonsWorkaround, BlockedByNextPressSuppression, BlockedBySynthetic, BlockedByTabletHover, BlockedByTabletPress, BlockedByTabletProximity, BlockedByTouchPress, dbgInputEater, debugEaterStateTransition(), eatOneMousePressEvent, isMouseEventType(), isNativeGestureEventType(), isTabletEventType(), isTouchEventType(), NotBlocked, source(), tabletIsHovering, tabletIsInProximity, tabletIsPressed, target(), touchIsActive, and warnInputEater.
| void KisInputEventsEater::notifyTabletEnterProximity | ( | ) |
Definition at line 329 of file KisInputEventsEater.cpp.
References debugEaterStateTransition(), and tabletIsInProximity.
| void KisInputEventsEater::notifyTabletLeaveProximity | ( | ) |
Definition at line 337 of file KisInputEventsEater.cpp.
References debugEaterStateTransition(), tabletIsHovering, and tabletIsInProximity.
|
private |
Definition at line 89 of file KisInputEventsEater.h.
|
private |
Definition at line 88 of file KisInputEventsEater.h.
|
private |
Definition at line 92 of file KisInputEventsEater.h.
|
private |
Definition at line 91 of file KisInputEventsEater.h.
|
private |
Definition at line 93 of file KisInputEventsEater.h.
|
private |
Definition at line 94 of file KisInputEventsEater.h.