Krita Source Code Documentation
Loading...
Searching...
No Matches
KisInputManager::Private Class Reference

#include <kis_input_manager_p.h>

Classes

class  CanvasSwitcher
 
struct  EventEater
 
class  ProximityNotifier
 
class  TabletLatencyTracker
 

Public Types

typedef QList< PriorityPairPriorityList
 
typedef QPair< int, QPointer< QObject > > PriorityPair
 

Public Member Functions

void addKeyShortcut (KisAbstractInputAction *action, int index, const QList< Qt::Key > &keys)
 
bool addNativeGestureShortcut (KisAbstractInputAction *action, int index, KisShortcutConfiguration::GestureAction gesture)
 
void addStrokeShortcut (KisAbstractInputAction *action, int index, const QList< Qt::Key > &modifiers, Qt::MouseButtons buttons)
 
void addTouchShortcut (KisAbstractInputAction *action, int index, KisShortcutConfiguration::GestureAction gesture)
 
void addWheelShortcut (KisAbstractInputAction *action, int index, const QList< Qt::Key > &modifiers, KisShortcutConfiguration::MouseWheelMovement wheelAction)
 
void allowMouseEvents ()
 
void blockMouseEvents ()
 
void bufferTouchEvent (QTouchEvent *event)
 
void cancelTouchHoldTimer ()
 
void clearBufferedTouchEvents ()
 
template<class Event , bool useBlocking>
void debugEvent (QEvent *event)
 
void eatOneMousePress ()
 
void fixShortcutMatcherModifiersState ()
 
void fixShortcutMatcherModifiersState (QVector< Qt::Key > newKeys, Qt::KeyboardModifiers modifiers)
 
void flushBufferedTouchEvents ()
 
bool handleCompressedTabletEvent (QEvent *event)
 
bool ignoringQtCursorEvents ()
 
bool isPendingTouchHold () const
 
bool isWithinTouchHoldSlopRange (const QPointF &currentPos) const
 
 Private (KisInputManager *qq)
 
bool processUnhandledEvent (QEvent *event)
 
void resetCompressor ()
 
void restartTouchHoldTimer ()
 
void setMaskSyntheticEvents (bool value)
 
void setupActions ()
 
void startBlockingTouch ()
 
void stopBlockingTouch ()
 

Public Attributes

int accumulatedScrollDelta = 0
 
QVector< QTouchEvent * > bufferedTouchEvents
 
QPointer< KisCanvas2canvas
 
CanvasSwitcher canvasSwitcher
 
QScopedPointer< QEvent > compressedMoveEvent
 
bool containsPointer = false
 
KisToolInvocationActiondefaultInputAction = 0
 
EventEater eventEater
 
QObject * eventsReceiver = 0
 
bool forwardAllEventsToTool = false
 
int lastPointCount = 0
 
KisShortcutMatcher matcher
 
KisSignalCompressor moveEventCompressor
 
QScopedPointer< QEvent > originatingTouchBeginEvent
 
bool popupWasActive = false
 
KisPopupWidgetInterfacepopupWidget
 
QPointF previousPos
 
PriorityList priorityEventFilter
 
int priorityEventFilterSeqNo
 
KisInputManagerq
 
bool shouldSynchronizeOnNextKeyPress = false
 
QPointF startingPos
 
KisSharedPtr< TabletLatencyTrackertabletLatencyTracker
 
bool testingAcceptCompressedTabletEvents = false
 
bool testingCompressBrushEvents = false
 
QPointer< KisToolProxytoolProxy
 
bool touchHasBlockedPressEvents = false
 
QTimer * touchHoldTimer
 
bool touchStrokeBlocked = false
 
bool touchStrokeStarted = false
 
bool useUnbalancedKeyPressEventWorkaround = false
 

Static Public Attributes

static constexpr int TOUCH_HOLD_DELAY_MS = 400
 

Detailed Description

Definition at line 29 of file kis_input_manager_p.h.

Member Typedef Documentation

◆ PriorityList

◆ PriorityPair

typedef QPair<int, QPointer<QObject> > KisInputManager::Private::PriorityPair

Definition at line 66 of file kis_input_manager_p.h.

Constructor & Destructor Documentation

◆ Private()

KisInputManager::Private::Private ( KisInputManager * qq)

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 200 of file kis_input_manager_p.cpp.

201 : q(qq)
202 , moveEventCompressor(10 /* ms */,
206 , popupWidget(nullptr)
207 , touchHoldTimer(new QTimer(qq))
208 , canvasSwitcher(this, qq)
209{
210 KisConfig cfg(true);
211
212 moveEventCompressor.setDelay(cfg.tabletEventsDelay());
213 testingAcceptCompressedTabletEvents = cfg.testingAcceptCompressedTabletEvents();
214 testingCompressBrushEvents = cfg.testingCompressBrushEvents();
215
216 if (cfg.trackTabletEventLatency()) {
217 tabletLatencyTracker = new TabletLatencyTracker();
218 }
219
221 [this] () {
222 return this->canvas ? this->canvas->inputActionGroupsMaskInterface()->inputActionGroupsMask() : AllActionGroup;
223 });
224
230#ifdef Q_OS_MACOS
232#endif
233
238#if defined Q_OS_LINUX && !KRITA_QT_HAS_UNBALANCED_KEY_PRESS_RELEASE_PATCH
240#endif
241
242 if (qEnvironmentVariableIsSet("KRITA_FIX_UNBALANCED_KEY_EVENTS")) {
243 useUnbalancedKeyPressEventWorkaround = qEnvironmentVariableIntValue("KRITA_FIX_UNBALANCED_KEY_EVENTS");
244 }
245
246 touchHoldTimer->setTimerType(Qt::CoarseTimer);
247 touchHoldTimer->setSingleShot(true);
249 connect(touchHoldTimer, &QTimer::timeout, qq, &KisInputManager::slotTouchHoldTriggered);
250}
@ AllActionGroup
static constexpr int TOUCH_HOLD_DELAY_MS
KisSignalCompressor moveEventCompressor
QPointer< KisCanvas2 > canvas
KisSharedPtr< TabletLatencyTracker > tabletLatencyTracker
KisPopupWidgetInterface * popupWidget
void setInputActionGroupsMaskCallback(std::function< KisInputActionGroupsMask()> func)
void setDelay(std::function< bool()> idleCallback, int idleDelay, int timeout)

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.

Member Function Documentation

◆ addKeyShortcut()

void KisInputManager::Private::addKeyShortcut ( KisAbstractInputAction * action,
int index,
const QList< Qt::Key > & keys )

Definition at line 511 of file kis_input_manager_p.cpp.

513{
514 if (keys.size() == 0) return;
515
516 KisSingleActionShortcut *keyShortcut =
517 new KisSingleActionShortcut(action, index);
518
519 //Note: Ordering is important here, Shift + V is different from V + Shift,
520 //which is the reason we use the last key here since most users will enter
521 //shortcuts as "Shift + V". Ideally this should not happen, but this is
522 //the way the shortcut matcher is currently implemented.
523 QList<Qt::Key> allKeys = keys;
524 Qt::Key key = allKeys.takeLast();
525 QSet<Qt::Key> modifiers = QSet<Qt::Key>(allKeys.begin(), allKeys.end());
526 keyShortcut->setKey(modifiers, key);
527 matcher.addShortcut(keyShortcut);
528}
void addShortcut(KisSingleActionShortcut *shortcut)
void setKey(const QSet< Qt::Key > &modifiers, Qt::Key key)

References KisShortcutMatcher::addShortcut(), matcher, and KisSingleActionShortcut::setKey().

◆ addNativeGestureShortcut()

bool KisInputManager::Private::addNativeGestureShortcut ( KisAbstractInputAction * action,
int index,
KisShortcutConfiguration::GestureAction gesture )

Definition at line 605 of file kis_input_manager_p.cpp.

606{
607 // Qt5 only implements QNativeGestureEvent for macOS
608 Qt::NativeGestureType type;
609 switch (gesture) {
610#ifdef Q_OS_MACOS
611 case KisShortcutConfiguration::PinchGesture:
612 type = Qt::ZoomNativeGesture;
613 break;
614 case KisShortcutConfiguration::PanGesture:
615 type = Qt::PanNativeGesture;
616 break;
617 case KisShortcutConfiguration::RotateGesture:
618 type = Qt::RotateNativeGesture;
619 break;
620 case KisShortcutConfiguration::SmartZoomGesture:
621 type = Qt::SmartZoomNativeGesture;
622 break;
623#endif
624 default:
625 return false;
626 }
627
628 KisNativeGestureShortcut *shortcut = new KisNativeGestureShortcut(action, index, type);
629 matcher.addShortcut(shortcut);
630 return true;
631}

References KisShortcutMatcher::addShortcut(), and matcher.

◆ addStrokeShortcut()

void KisInputManager::Private::addStrokeShortcut ( KisAbstractInputAction * action,
int index,
const QList< Qt::Key > & modifiers,
Qt::MouseButtons buttons )

Definition at line 482 of file kis_input_manager_p.cpp.

485{
486 KisStrokeShortcut *strokeShortcut =
487 new KisStrokeShortcut(action, index);
488
489 QSet<Qt::MouseButton> buttonSet;
490 if(buttons & Qt::LeftButton) {
491 buttonSet << Qt::LeftButton;
492 }
493 if(buttons & Qt::RightButton) {
494 buttonSet << Qt::RightButton;
495 }
496 if(buttons & Qt::MiddleButton) {
497 buttonSet << Qt::MiddleButton;
498 }
499
500BOOST_PP_REPEAT_FROM_TO(1, 25, EXTRA_BUTTON, _)
501
502 if (!buttonSet.empty()) {
503 strokeShortcut->setButtons(QSet<Qt::Key>(modifiers.cbegin(), modifiers.cend()), buttonSet);
504 matcher.addShortcut(strokeShortcut);
505 }
506 else {
507 delete strokeShortcut;
508 }
509}
void setButtons(const QSet< Qt::Key > &modifiers, const QSet< Qt::MouseButton > &buttons)
#define EXTRA_BUTTON(z, n, _)
QString buttons(const T &ev)

References KisShortcutMatcher::addShortcut(), buttons(), EXTRA_BUTTON, matcher, and KisStrokeShortcut::setButtons().

◆ addTouchShortcut()

void KisInputManager::Private::addTouchShortcut ( KisAbstractInputAction * action,
int index,
KisShortcutConfiguration::GestureAction gesture )

Definition at line 561 of file kis_input_manager_p.cpp.

562{
563 KisTouchShortcut *shortcut = new KisTouchShortcut(action, index, gesture);
564 dbgKrita << "TouchAction:" << action->name();
565 switch(gesture) {
566#ifndef Q_OS_MACOS
569 // Touch painting takes precedence over one-finger touch shortcuts, so
570 // disable this type of shortcut when touch painting is active. Except
571 // touch hold shortcuts, since touching and holding in one spot does
572 // nothing otherwise and is therefore unambiguous.
573 shortcut->setDisableOnTouchPainting(true);
574 Q_FALLTHROUGH();
576 shortcut->setMinimumTouchPoints(1);
577 shortcut->setMaximumTouchPoints(1);
578 break;
581 shortcut->setMinimumTouchPoints(2);
582 shortcut->setMaximumTouchPoints(2);
583 break;
586 shortcut->setMinimumTouchPoints(3);
587 shortcut->setMaximumTouchPoints(3);
588 break;
591 shortcut->setMinimumTouchPoints(4);
592 shortcut->setMaximumTouchPoints(4);
593 break;
596 shortcut->setMinimumTouchPoints(5);
597 shortcut->setMaximumTouchPoints(5);
598#endif
599 default:
600 break;
601 }
602 matcher.addShortcut(shortcut);
603}
The KisTouchShortcut class only handles touch gestures it does not handle tool invocation i....
void setMaximumTouchPoints(int max)
void setDisableOnTouchPainting(bool disableOnTouchPainting)
void setMinimumTouchPoints(int min)
#define dbgKrita
Definition kis_debug.h:48

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.

◆ addWheelShortcut()

void KisInputManager::Private::addWheelShortcut ( KisAbstractInputAction * action,
int index,
const QList< Qt::Key > & modifiers,
KisShortcutConfiguration::MouseWheelMovement wheelAction )

Definition at line 530 of file kis_input_manager_p.cpp.

533{
534 std::unique_ptr<KisSingleActionShortcut> keyShortcut(
535 new KisSingleActionShortcut(action, index));
536
538 switch(wheelAction) {
541 break;
544 break;
547 break;
550 break;
553 break;
554 default:
555 return;
556 }
557 keyShortcut->setWheel(QSet<Qt::Key>(modifiers.begin(), modifiers.end()), a);
558 matcher.addShortcut(keyShortcut.release());
559}
@ WheelTrackpad
A pan movement on a trackpad.
@ WheelDown
Downwards movement, toward the user.
@ WheelUp
Upwards movement, away from the user.
@ WheelDown
Mouse wheel moves down.
@ WheelTrackpad
A pan movement on a trackpad.
@ WheelRight
Mouse wheel moves right.
@ WheelLeft
Mouse wheel moves left.

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.

◆ allowMouseEvents()

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 681 of file kis_input_manager_p.cpp.

References KisInputManager::Private::EventEater::deactivate(), eventEater, KisShortcutMatcher::hasRunningShortcut(), KisInputManager::Private::EventEater::hungry, and matcher.

◆ blockMouseEvents()

void KisInputManager::Private::blockMouseEvents ( )

◆ bufferTouchEvent()

void KisInputManager::Private::bufferTouchEvent ( QTouchEvent * event)

Definition at line 749 of file kis_input_manager_p.cpp.

750{
751#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
752 QScopedPointer<QEvent> dst;
753 KoPointerEvent::copyQtPointerEvent(touchEvent, dst);
754 bufferedTouchEvents.append(static_cast<QTouchEvent *>(dst.take()));
755#else
756 bufferedTouchEvents.append(touchEvent->clone());
757#endif
758}
QVector< QTouchEvent * > bufferedTouchEvents

References bufferedTouchEvents.

◆ cancelTouchHoldTimer()

void KisInputManager::Private::cancelTouchHoldTimer ( )

Definition at line 732 of file kis_input_manager_p.cpp.

733{
734 touchHoldTimer->stop();
735}

References touchHoldTimer.

◆ clearBufferedTouchEvents()

void KisInputManager::Private::clearBufferedTouchEvents ( )

Definition at line 779 of file kis_input_manager_p.cpp.

780{
781 for (QTouchEvent *event : bufferedTouchEvents) {
782 delete event;
783 }
784 bufferedTouchEvents.clear();
785}

References bufferedTouchEvents.

◆ debugEvent()

template<class Event , bool useBlocking>
void KisInputManager::Private::debugEvent ( QEvent * event)
inline

Definition at line 104 of file kis_input_manager_p.h.

105 {
107
108 QString msg1 = useBlocking && ignoringQtCursorEvents() ? "[BLOCKED] " : "[ ]";
109 Event *specificEvent = static_cast<Event*>(event);
110 dbgTablet << KisTabletDebugger::instance()->eventToString(*specificEvent, msg1);
111 }
static bool debugEnabled()
Linethickness.
QString eventToString(const QMouseEvent &ev, const QString &prefix)
static KisTabletDebugger * instance()
#define dbgTablet
Definition kis_debug.h:62

References dbgTablet, debugEnabled(), KisTabletDebugger::eventToString(), ignoringQtCursorEvents(), and KisTabletDebugger::instance().

◆ eatOneMousePress()

void KisInputManager::Private::eatOneMousePress ( )

◆ fixShortcutMatcherModifiersState() [1/2]

void KisInputManager::Private::fixShortcutMatcherModifiersState ( )

Definition at line 802 of file kis_input_manager_p.cpp.

803{
805
806 QVector<Qt::Key> newKeys;
807 Qt::KeyboardModifiers modifiers = mapper.queryStandardModifiers();
808 Q_FOREACH (Qt::Key key, mapper.queryExtendedModifiers()) {
809 QKeyEvent kevent(QEvent::ShortcutOverride, key, modifiers);
811 }
812
813 fixShortcutMatcherModifiersState(newKeys, modifiers);
814}
static Qt::Key workaroundShiftAltMetaHell(const QKeyEvent *keyEvent)

References fixShortcutMatcherModifiersState(), KisExtendedModifiersMapper::queryExtendedModifiers(), KisExtendedModifiersMapper::queryStandardModifiers(), and KisExtendedModifiersMapper::workaroundShiftAltMetaHell().

◆ fixShortcutMatcherModifiersState() [2/2]

void KisInputManager::Private::fixShortcutMatcherModifiersState ( QVector< Qt::Key > newKeys,
Qt::KeyboardModifiers modifiers )

This function may be called from slotConfigChanged() from the constructor of KisInputManager. It may theoretically happen that we haven't recieved any sensible events to set up the link to the input manager.

Definition at line 816 of file kis_input_manager_p.cpp.

817{
819
820 matcher.handlePolledKeys(newKeys);
821
822 for (auto it = danglingKeys.begin(); it != danglingKeys.end();) {
823 if (newKeys.contains(*it)) {
824 newKeys.removeOne(*it);
825 it = danglingKeys.erase(it);
826 } else {
827 ++it;
828 }
829 }
830
838
839 Q_FOREACH (Qt::Key key, danglingKeys) {
840 QKeyEvent kevent(QEvent::KeyRelease, key, modifiers);
841 processUnhandledEvent(&kevent);
842 }
843
844 Q_FOREACH (Qt::Key key, newKeys) {
845 // just replay the whole sequence
846 {
847 QKeyEvent kevent(QEvent::ShortcutOverride, key, modifiers);
848 processUnhandledEvent(&kevent);
849 }
850 {
851 QKeyEvent kevent(QEvent::KeyPress, key, modifiers);
852 processUnhandledEvent(&kevent);
853 }
854 }
855}
static void setInputManager(KisInputManager *manager)
bool processUnhandledEvent(QEvent *event)
QVector< Qt::Key > debugPressedKeys() const
void handlePolledKeys(const QVector< Qt::Key > &keys)

References KisShortcutMatcher::debugPressedKeys(), KisShortcutMatcher::handlePolledKeys(), matcher, processUnhandledEvent(), q, and KisAbstractInputAction::setInputManager().

◆ flushBufferedTouchEvents()

void KisInputManager::Private::flushBufferedTouchEvents ( )

Definition at line 760 of file kis_input_manager_p.cpp.

761{
762 for (QTouchEvent *touchEvent : bufferedTouchEvents) {
763 switch (touchEvent->type()) {
764 case QEvent::TouchBegin:
765 q->handleTouchBegin(touchEvent);
766 break;
767 case QEvent::TouchUpdate:
768 q->handleTouchUpdate(touchEvent);
769 break;
770 default:
771 qWarning("Unhandled buffered touch event type %d", int(touchEvent->type()));
772 break;
773 }
774 delete touchEvent;
775 }
776 bufferedTouchEvents.clear();
777}
bool handleTouchBegin(QTouchEvent *touchEvent)
bool handleTouchUpdate(QTouchEvent *touchEvent)

References bufferedTouchEvents, KisInputManager::handleTouchBegin(), KisInputManager::handleTouchUpdate(), and q.

◆ handleCompressedTabletEvent()

bool KisInputManager::Private::handleCompressedTabletEvent ( QEvent * event)

Definition at line 787 of file kis_input_manager_p.cpp.

788{
789 bool retval = false;
790
791 if (event->type() == QTouchEvent::TouchUpdate && touchHasBlockedPressEvents) {
792 matcher.touchUpdateEvent((QTouchEvent *)event);
793 } else if (!matcher.pointerMoved(event) && toolProxy && event->type() != QTouchEvent::TouchUpdate) {
794 toolProxy->forwardHoverEvent(event);
795 }
796 retval = true;
797 event->setAccepted(true);
798
799 return retval;
800}
QPointer< KisToolProxy > toolProxy
bool touchUpdateEvent(QTouchEvent *event)
bool pointerMoved(QEvent *event)

References matcher, KisShortcutMatcher::pointerMoved(), toolProxy, touchHasBlockedPressEvents, and KisShortcutMatcher::touchUpdateEvent().

◆ ignoringQtCursorEvents()

bool KisInputManager::Private::ignoringQtCursorEvents ( )

Definition at line 190 of file kis_input_manager_p.cpp.

191{
192 return eventEater.hungry;
193}

References eventEater, and KisInputManager::Private::EventEater::hungry.

◆ isPendingTouchHold()

bool KisInputManager::Private::isPendingTouchHold ( ) const

Definition at line 737 of file kis_input_manager_p.cpp.

738{
739 return touchHoldTimer->isActive();
740}

References touchHoldTimer.

◆ isWithinTouchHoldSlopRange()

bool KisInputManager::Private::isWithinTouchHoldSlopRange ( const QPointF & currentPos) const

Definition at line 742 of file kis_input_manager_p.cpp.

743{
744 QPointF d = startingPos - currentPos;
745 qreal distanceSquared = (d.x() * d.x()) + (d.y() * d.y());
746 return distanceSquared <= KisShortcutMatcher::TOUCH_SLOP_SQUARED;
747}
static constexpr int TOUCH_SLOP_SQUARED

References KisInputManager::d, startingPos, and KisShortcutMatcher::TOUCH_SLOP_SQUARED.

◆ processUnhandledEvent()

bool KisInputManager::Private::processUnhandledEvent ( QEvent * event)

Definition at line 651 of file kis_input_manager_p.cpp.

652{
653 bool retval = false;
654
656 event->type() == QEvent::KeyPress ||
657 event->type() == QEvent::KeyRelease) {
658
660 retval = true;
661 }
662
663 return retval && !forwardAllEventsToTool;
664}
KisToolInvocationAction * defaultInputAction

References defaultInputAction, forwardAllEventsToTool, and KisToolInvocationAction::processUnhandledEvent().

◆ resetCompressor()

void KisInputManager::Private::resetCompressor ( )

◆ restartTouchHoldTimer()

void KisInputManager::Private::restartTouchHoldTimer ( )

Definition at line 727 of file kis_input_manager_p.cpp.

728{
729 touchHoldTimer->start();
730}

References touchHoldTimer.

◆ setMaskSyntheticEvents()

void KisInputManager::Private::setMaskSyntheticEvents ( bool value)

◆ setupActions()

void KisInputManager::Private::setupActions ( )

Definition at line 633 of file kis_input_manager_p.cpp.

634{
636 Q_FOREACH (KisAbstractInputAction *action, actions) {
637 KisToolInvocationAction *toolAction =
638 dynamic_cast<KisToolInvocationAction*>(action);
639
640 if(toolAction) {
641 defaultInputAction = toolAction;
642 }
643 }
644
645 connect(KisInputProfileManager::instance(), SIGNAL(currentProfileChanged()), q, SLOT(profileChanged()));
646 if(KisInputProfileManager::instance()->currentProfile()) {
647 q->profileChanged();
648 }
649}
Abstract base class for input actions.
QList< KisAbstractInputAction * > actions
static KisInputProfileManager * instance()
Tool Invocation action of KisAbstractInputAction.

References KisInputProfileManager::actions, defaultInputAction, KisInputProfileManager::instance(), KisInputManager::profileChanged(), and q.

◆ startBlockingTouch()

void KisInputManager::Private::startBlockingTouch ( )

◆ stopBlockingTouch()

void KisInputManager::Private::stopBlockingTouch ( )

Member Data Documentation

◆ accumulatedScrollDelta

int KisInputManager::Private::accumulatedScrollDelta = 0

Definition at line 171 of file kis_input_manager_p.h.

◆ bufferedTouchEvents

QVector<QTouchEvent *> KisInputManager::Private::bufferedTouchEvents

Definition at line 86 of file kis_input_manager_p.h.

◆ canvas

QPointer<KisCanvas2> KisInputManager::Private::canvas

Definition at line 48 of file kis_input_manager_p.h.

◆ canvasSwitcher

CanvasSwitcher KisInputManager::Private::canvasSwitcher

Definition at line 140 of file kis_input_manager_p.h.

◆ compressedMoveEvent

QScopedPointer<QEvent> KisInputManager::Private::compressedMoveEvent

Definition at line 62 of file kis_input_manager_p.h.

◆ containsPointer

bool KisInputManager::Private::containsPointer = false

Definition at line 169 of file kis_input_manager_p.h.

◆ defaultInputAction

KisToolInvocationAction* KisInputManager::Private::defaultInputAction = 0

Definition at line 58 of file kis_input_manager_p.h.

◆ eventEater

EventEater KisInputManager::Private::eventEater

Definition at line 167 of file kis_input_manager_p.h.

◆ eventsReceiver

QObject* KisInputManager::Private::eventsReceiver = 0

Definition at line 60 of file kis_input_manager_p.h.

◆ forwardAllEventsToTool

bool KisInputManager::Private::forwardAllEventsToTool = false

Definition at line 51 of file kis_input_manager_p.h.

◆ lastPointCount

int KisInputManager::Private::lastPointCount = 0

Definition at line 74 of file kis_input_manager_p.h.

◆ matcher

KisShortcutMatcher KisInputManager::Private::matcher

Definition at line 56 of file kis_input_manager_p.h.

◆ moveEventCompressor

KisSignalCompressor KisInputManager::Private::moveEventCompressor

Definition at line 61 of file kis_input_manager_p.h.

◆ originatingTouchBeginEvent

QScopedPointer<QEvent> KisInputManager::Private::originatingTouchBeginEvent

Definition at line 78 of file kis_input_manager_p.h.

◆ popupWasActive

bool KisInputManager::Private::popupWasActive = false

Definition at line 73 of file kis_input_manager_p.h.

◆ popupWidget

KisPopupWidgetInterface* KisInputManager::Private::popupWidget

Definition at line 83 of file kis_input_manager_p.h.

◆ previousPos

QPointF KisInputManager::Private::previousPos

Definition at line 77 of file kis_input_manager_p.h.

◆ priorityEventFilter

PriorityList KisInputManager::Private::priorityEventFilter

Definition at line 68 of file kis_input_manager_p.h.

◆ priorityEventFilterSeqNo

int KisInputManager::Private::priorityEventFilterSeqNo

Definition at line 69 of file kis_input_manager_p.h.

◆ q

KisInputManager* KisInputManager::Private::q

Definition at line 46 of file kis_input_manager_p.h.

◆ shouldSynchronizeOnNextKeyPress

bool KisInputManager::Private::shouldSynchronizeOnNextKeyPress = false

Definition at line 81 of file kis_input_manager_p.h.

◆ startingPos

QPointF KisInputManager::Private::startingPos

Definition at line 76 of file kis_input_manager_p.h.

◆ tabletLatencyTracker

KisSharedPtr<TabletLatencyTracker> KisInputManager::Private::tabletLatencyTracker

Definition at line 179 of file kis_input_manager_p.h.

◆ testingAcceptCompressedTabletEvents

bool KisInputManager::Private::testingAcceptCompressedTabletEvents = false

Definition at line 63 of file kis_input_manager_p.h.

◆ testingCompressBrushEvents

bool KisInputManager::Private::testingCompressBrushEvents = false

Definition at line 64 of file kis_input_manager_p.h.

◆ toolProxy

QPointer<KisToolProxy> KisInputManager::Private::toolProxy

Definition at line 49 of file kis_input_manager_p.h.

◆ TOUCH_HOLD_DELAY_MS

constexpr int KisInputManager::Private::TOUCH_HOLD_DELAY_MS = 400
staticconstexpr

Definition at line 32 of file kis_input_manager_p.h.

◆ touchHasBlockedPressEvents

bool KisInputManager::Private::touchHasBlockedPressEvents = false

Definition at line 54 of file kis_input_manager_p.h.

◆ touchHoldTimer

QTimer* KisInputManager::Private::touchHoldTimer

Definition at line 85 of file kis_input_manager_p.h.

◆ touchStrokeBlocked

bool KisInputManager::Private::touchStrokeBlocked = false

Definition at line 72 of file kis_input_manager_p.h.

◆ touchStrokeStarted

bool KisInputManager::Private::touchStrokeStarted = false

Definition at line 71 of file kis_input_manager_p.h.

◆ useUnbalancedKeyPressEventWorkaround

bool KisInputManager::Private::useUnbalancedKeyPressEventWorkaround = false

Definition at line 80 of file kis_input_manager_p.h.


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