Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_input_manager.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2012 Arjen Hiemstra <ahiemstra@heimr.nl>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KIS_INPUTMANAGER_H
8#define KIS_INPUTMANAGER_H
9
10#include <QObject>
11#include <QPointer>
12
13#include <kritaui_export.h>
14
15#include <kis_tool_proxy.h>
16
17class QPointF;
18class QTouchEvent;
19class KisCanvas2;
38class KRITAUI_EXPORT KisInputManager : public QObject
39{
40 Q_OBJECT
41
42public:
46 KisInputManager(QObject *parent);
47
51 ~KisInputManager() override;
52
53 void addTrackedCanvas(KisCanvas2 *canvas);
54 void removeTrackedCanvas(KisCanvas2 *canvas);
55
56 void registerPopupWidget(KisPopupWidgetInterface *popupWidget);
57
58 void toggleTabletLogger();
59
68 void setupAsEventFilter(QObject *receiver);
69
73 bool eventFilter(QObject* object, QEvent* event ) override;
74
80 void attachPriorityEventFilter(QObject *filter, int priority = 0);
81
86 void detachPriorityEventFilter(QObject *filter);
87
91 KisCanvas2 *canvas() const;
92
96 QPointer<KisToolProxy> toolProxy() const;
97
101 KisToolInvocationAction *defaultInputAction() const;
102
103private Q_SLOTS:
104 void slotAboutToChangeTool();
105 void slotToolChanged();
106 void slotTextModeChanged();
107 void profileChanged();
108 void slotCompressedMoveEvent();
109 void deregisterPopupWidget();
110 void slotConfigChanged();
111
112private:
113 bool eventFilterImpl(QEvent * event);
114 template <class Event>
115 bool compressMoveEventCommon(Event *event);
116
117private:
118 class Private;
119 Private* const d;
120};
121
122#endif // KIS_INPUTMANAGER_H
Central object to manage canvas input.
The PopupWidgetInterface abstract class defines the basic interface that will be used by all popup wi...
Tool Invocation action of KisAbstractInputAction.