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

199 : q(qq)
200 , moveEventCompressor(10 /* ms */,
204 , popupWidget(nullptr)
205 , touchHoldTimer(new QTimer(qq))
206 , canvasSwitcher(this, qq)
207{
208 KisConfig cfg(true);
209
210 moveEventCompressor.setDelay(cfg.tabletEventsDelay());
211 testingAcceptCompressedTabletEvents = cfg.testingAcceptCompressedTabletEvents();
212 testingCompressBrushEvents = cfg.testingCompressBrushEvents();
213
214 if (cfg.trackTabletEventLatency()) {
215 tabletLatencyTracker = new TabletLatencyTracker();
216 }
217
219 [this] () {
220 return this->canvas ? this->canvas->inputActionGroupsMaskInterface()->inputActionGroupsMask() : AllActionGroup;
221 });
222
228#ifdef Q_OS_MACOS
230#endif
231
236#if defined Q_OS_LINUX && !KRITA_QT_HAS_UNBALANCED_KEY_PRESS_RELEASE_PATCH
238#endif
239
240 if (qEnvironmentVariableIsSet("KRITA_FIX_UNBALANCED_KEY_EVENTS")) {
241 useUnbalancedKeyPressEventWorkaround = qEnvironmentVariableIntValue("KRITA_FIX_UNBALANCED_KEY_EVENTS");
242 }
243
244 touchHoldTimer->setTimerType(Qt::CoarseTimer);
245 touchHoldTimer->setSingleShot(true);
247 connect(touchHoldTimer, &QTimer::timeout, qq, &KisInputManager::slotTouchHoldTriggered);
248}
@ 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 509 of file kis_input_manager_p.cpp.

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

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

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

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

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

560{
561 KisTouchShortcut *shortcut = new KisTouchShortcut(action, index, gesture);
562 dbgKrita << "TouchAction:" << action->name();
563 switch(gesture) {
564#ifndef Q_OS_MACOS
567 // Touch painting takes precedence over one-finger touch shortcuts, so
568 // disable this type of shortcut when touch painting is active. Except
569 // touch hold shortcuts, since touching and holding in one spot does
570 // nothing otherwise and is therefore unambiguous.
571 shortcut->setDisableOnTouchPainting(true);
572 Q_FALLTHROUGH();
574 shortcut->setMinimumTouchPoints(1);
575 shortcut->setMaximumTouchPoints(1);
576 break;
579 shortcut->setMinimumTouchPoints(2);
580 shortcut->setMaximumTouchPoints(2);
581 break;
584 shortcut->setMinimumTouchPoints(3);
585 shortcut->setMaximumTouchPoints(3);
586 break;
589 shortcut->setMinimumTouchPoints(4);
590 shortcut->setMaximumTouchPoints(4);
591 break;
594 shortcut->setMinimumTouchPoints(5);
595 shortcut->setMaximumTouchPoints(5);
596#endif
597 default:
598 break;
599 }
600 matcher.addShortcut(shortcut);
601}
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:45

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

531{
532 QScopedPointer<KisSingleActionShortcut> keyShortcut(
533 new KisSingleActionShortcut(action, index));
534
536 switch(wheelAction) {
539 break;
542 break;
545 break;
548 break;
551 break;
552 default:
553 return;
554 }
555 keyShortcut->setWheel(QSet<Qt::Key>(modifiers.begin(), modifiers.end()), a);
556 matcher.addShortcut(keyShortcut.take());
557}
@ 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 679 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 747 of file kis_input_manager_p.cpp.

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

References bufferedTouchEvents.

◆ cancelTouchHoldTimer()

void KisInputManager::Private::cancelTouchHoldTimer ( )

Definition at line 730 of file kis_input_manager_p.cpp.

731{
732 touchHoldTimer->stop();
733}

References touchHoldTimer.

◆ clearBufferedTouchEvents()

void KisInputManager::Private::clearBufferedTouchEvents ( )

Definition at line 777 of file kis_input_manager_p.cpp.

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

References bufferedTouchEvents.

◆ debugEvent()

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

Definition at line 103 of file kis_input_manager_p.h.

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

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

◆ eatOneMousePress()

void KisInputManager::Private::eatOneMousePress ( )

◆ fixShortcutMatcherModifiersState() [1/2]

void KisInputManager::Private::fixShortcutMatcherModifiersState ( )

Definition at line 800 of file kis_input_manager_p.cpp.

801{
803
804 QVector<Qt::Key> newKeys;
805 Qt::KeyboardModifiers modifiers = mapper.queryStandardModifiers();
806 Q_FOREACH (Qt::Key key, mapper.queryExtendedModifiers()) {
807 QKeyEvent kevent(QEvent::ShortcutOverride, key, modifiers);
809 }
810
811 fixShortcutMatcherModifiersState(newKeys, modifiers);
812}
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 )

Definition at line 814 of file kis_input_manager_p.cpp.

815{
817
818 matcher.handlePolledKeys(newKeys);
819
820 for (auto it = danglingKeys.begin(); it != danglingKeys.end();) {
821 if (newKeys.contains(*it)) {
822 newKeys.removeOne(*it);
823 it = danglingKeys.erase(it);
824 } else {
825 ++it;
826 }
827 }
828
829 Q_FOREACH (Qt::Key key, danglingKeys) {
830 QKeyEvent kevent(QEvent::KeyRelease, key, modifiers);
831 processUnhandledEvent(&kevent);
832 }
833
834 Q_FOREACH (Qt::Key key, newKeys) {
835 // just replay the whole sequence
836 {
837 QKeyEvent kevent(QEvent::ShortcutOverride, key, modifiers);
838 processUnhandledEvent(&kevent);
839 }
840 {
841 QKeyEvent kevent(QEvent::KeyPress, key, modifiers);
842 processUnhandledEvent(&kevent);
843 }
844 }
845}
bool processUnhandledEvent(QEvent *event)
QVector< Qt::Key > debugPressedKeys() const
void handlePolledKeys(const QVector< Qt::Key > &keys)

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

◆ flushBufferedTouchEvents()

void KisInputManager::Private::flushBufferedTouchEvents ( )

Definition at line 758 of file kis_input_manager_p.cpp.

759{
760 for (QTouchEvent *touchEvent : bufferedTouchEvents) {
761 switch (touchEvent->type()) {
762 case QEvent::TouchBegin:
763 q->handleTouchBegin(touchEvent);
764 break;
765 case QEvent::TouchUpdate:
766 q->handleTouchUpdate(touchEvent);
767 break;
768 default:
769 qWarning("Unhandled buffered touch event type %d", int(touchEvent->type()));
770 break;
771 }
772 delete touchEvent;
773 }
774 bufferedTouchEvents.clear();
775}
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 785 of file kis_input_manager_p.cpp.

786{
787 bool retval = false;
788
789 if (event->type() == QTouchEvent::TouchUpdate && touchHasBlockedPressEvents) {
790 matcher.touchUpdateEvent((QTouchEvent *)event);
791 } else if (!matcher.pointerMoved(event) && toolProxy && event->type() != QTouchEvent::TouchUpdate) {
792 toolProxy->forwardHoverEvent(event);
793 }
794 retval = true;
795 event->setAccepted(true);
796
797 return retval;
798}
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 188 of file kis_input_manager_p.cpp.

189{
190 return eventEater.hungry;
191}

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

◆ isPendingTouchHold()

bool KisInputManager::Private::isPendingTouchHold ( ) const

Definition at line 735 of file kis_input_manager_p.cpp.

736{
737 return touchHoldTimer->isActive();
738}

References touchHoldTimer.

◆ isWithinTouchHoldSlopRange()

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

Definition at line 740 of file kis_input_manager_p.cpp.

741{
742 QPointF d = startingPos - currentPos;
743 qreal distanceSquared = (d.x() * d.x()) + (d.y() * d.y());
744 return distanceSquared <= KisShortcutMatcher::TOUCH_SLOP_SQUARED;
745}
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 649 of file kis_input_manager_p.cpp.

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

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

◆ resetCompressor()

void KisInputManager::Private::resetCompressor ( )

◆ restartTouchHoldTimer()

void KisInputManager::Private::restartTouchHoldTimer ( )

Definition at line 725 of file kis_input_manager_p.cpp.

726{
727 touchHoldTimer->start();
728}

References touchHoldTimer.

◆ setMaskSyntheticEvents()

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

◆ setupActions()

void KisInputManager::Private::setupActions ( )

Definition at line 631 of file kis_input_manager_p.cpp.

632{
634 Q_FOREACH (KisAbstractInputAction *action, actions) {
635 KisToolInvocationAction *toolAction =
636 dynamic_cast<KisToolInvocationAction*>(action);
637
638 if(toolAction) {
639 defaultInputAction = toolAction;
640 }
641 }
642
643 connect(KisInputProfileManager::instance(), SIGNAL(currentProfileChanged()), q, SLOT(profileChanged()));
644 if(KisInputProfileManager::instance()->currentProfile()) {
645 q->profileChanged();
646 }
647}
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 170 of file kis_input_manager_p.h.

◆ bufferedTouchEvents

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

Definition at line 85 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 139 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 168 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 166 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 73 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 77 of file kis_input_manager_p.h.

◆ popupWasActive

bool KisInputManager::Private::popupWasActive = false

Definition at line 72 of file kis_input_manager_p.h.

◆ popupWidget

KisPopupWidgetInterface* KisInputManager::Private::popupWidget

Definition at line 82 of file kis_input_manager_p.h.

◆ previousPos

QPointF KisInputManager::Private::previousPos

Definition at line 76 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 80 of file kis_input_manager_p.h.

◆ startingPos

QPointF KisInputManager::Private::startingPos

Definition at line 75 of file kis_input_manager_p.h.

◆ tabletLatencyTracker

KisSharedPtr<TabletLatencyTracker> KisInputManager::Private::tabletLatencyTracker

Definition at line 178 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 84 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 79 of file kis_input_manager_p.h.


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