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;
37class KRITAUI_EXPORT KisInputManager : public QObject
38{
39 Q_OBJECT
40
41public:
45 KisInputManager(QObject *parent);
46
50 ~KisInputManager() override;
51
52 void addTrackedCanvas(KisCanvas2 *canvas);
53 void removeTrackedCanvas(KisCanvas2 *canvas);
54
55 void registerPopupWidget(KisPopupWidgetInterface *popupWidget);
56
57 void toggleTabletLogger();
58
67 void setupAsEventFilter(QObject *receiver);
68
72 bool eventFilter(QObject* object, QEvent* event ) override;
73
79 void attachPriorityEventFilter(QObject *filter, int priority = 0);
80
85 void detachPriorityEventFilter(QObject *filter);
86
90 KisCanvas2 *canvas() const;
91
95 QPointer<KisToolProxy> toolProxy() const;
96
97private Q_SLOTS:
98 void slotAboutToChangeTool();
99 void slotToolChanged();
100 void slotTextModeChanged();
101 void profileChanged();
102 void slotCompressedMoveEvent();
103 void deregisterPopupWidget();
104 void slotConfigChanged();
105
106private:
107 bool startTouch(bool &retval);
108 void endTouch();
109
110 bool eventFilterImpl(QEvent * event);
111 template <class Event>
112 bool compressMoveEventCommon(Event *event);
113
114private:
115 class Private;
116 Private* const d;
117};
118
119#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...