Changeset View
Changeset View
Standalone View
Standalone View
debug_console.h
Show All 17 Lines | |||||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | #ifndef KWIN_DEBUG_CONSOLE_H | 20 | #ifndef KWIN_DEBUG_CONSOLE_H | ||
21 | #define KWIN_DEBUG_CONSOLE_H | 21 | #define KWIN_DEBUG_CONSOLE_H | ||
22 | 22 | | |||
23 | #include <kwin_export.h> | 23 | #include <kwin_export.h> | ||
24 | #include <config-kwin.h> | 24 | #include <config-kwin.h> | ||
25 | #include "input.h" | 25 | #include "input.h" | ||
26 | #include "input_event_spy.h" | ||||
26 | 27 | | |||
27 | #include <QAbstractItemModel> | 28 | #include <QAbstractItemModel> | ||
28 | #include <QStyledItemDelegate> | 29 | #include <QStyledItemDelegate> | ||
29 | #include <QVector> | 30 | #include <QVector> | ||
30 | 31 | | |||
31 | class QTextEdit; | 32 | class QTextEdit; | ||
32 | 33 | | |||
33 | namespace Ui | 34 | namespace Ui | ||
▲ Show 20 Lines • Show All 87 Lines • ▼ Show 20 Line(s) | 119 | public: | |||
121 | 122 | | |||
122 | int columnCount(const QModelIndex &parent) const override; | 123 | int columnCount(const QModelIndex &parent) const override; | ||
123 | QVariant data(const QModelIndex &index, int role) const override; | 124 | QVariant data(const QModelIndex &index, int role) const override; | ||
124 | QModelIndex index(int row, int column, const QModelIndex & parent) const override; | 125 | QModelIndex index(int row, int column, const QModelIndex & parent) const override; | ||
125 | int rowCount(const QModelIndex &parent) const override; | 126 | int rowCount(const QModelIndex &parent) const override; | ||
126 | QModelIndex parent(const QModelIndex &child) const override; | 127 | QModelIndex parent(const QModelIndex &child) const override; | ||
127 | }; | 128 | }; | ||
128 | 129 | | |||
129 | class DebugConsoleFilter : public InputEventFilter | 130 | class DebugConsoleFilter : public InputEventSpy | ||
130 | { | 131 | { | ||
131 | public: | 132 | public: | ||
132 | explicit DebugConsoleFilter(QTextEdit *textEdit); | 133 | explicit DebugConsoleFilter(QTextEdit *textEdit); | ||
133 | virtual ~DebugConsoleFilter(); | 134 | virtual ~DebugConsoleFilter(); | ||
134 | 135 | | |||
135 | bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override; | 136 | void pointerEvent(MouseEvent *event) override; | ||
136 | bool wheelEvent(QWheelEvent *event) override; | 137 | void wheelEvent(WheelEvent *event) override; | ||
137 | bool keyEvent(QKeyEvent *event) override; | 138 | void keyEvent(KeyEvent *event) override; | ||
138 | bool touchDown(quint32 id, const QPointF &pos, quint32 time) override; | 139 | void touchDown(quint32 id, const QPointF &pos, quint32 time) override; | ||
139 | bool touchMotion(quint32 id, const QPointF &pos, quint32 time) override; | 140 | void touchMotion(quint32 id, const QPointF &pos, quint32 time) override; | ||
140 | bool touchUp(quint32 id, quint32 time) override; | 141 | void touchUp(quint32 id, quint32 time) override; | ||
141 | 142 | | |||
142 | bool pinchGestureBegin(int fingerCount, quint32 time) override; | 143 | void pinchGestureBegin(int fingerCount, quint32 time) override; | ||
143 | bool pinchGestureUpdate(qreal scale, qreal angleDelta, const QSizeF &delta, quint32 time) override; | 144 | void pinchGestureUpdate(qreal scale, qreal angleDelta, const QSizeF &delta, quint32 time) override; | ||
144 | bool pinchGestureEnd(quint32 time) override; | 145 | void pinchGestureEnd(quint32 time) override; | ||
145 | bool pinchGestureCancelled(quint32 time) override; | 146 | void pinchGestureCancelled(quint32 time) override; | ||
146 | 147 | | |||
147 | bool swipeGestureBegin(int fingerCount, quint32 time) override; | 148 | void swipeGestureBegin(int fingerCount, quint32 time) override; | ||
148 | bool swipeGestureUpdate(const QSizeF &delta, quint32 time) override; | 149 | void swipeGestureUpdate(const QSizeF &delta, quint32 time) override; | ||
149 | bool swipeGestureEnd(quint32 time) override; | 150 | void swipeGestureEnd(quint32 time) override; | ||
150 | bool swipeGestureCancelled(quint32 time) override; | 151 | void swipeGestureCancelled(quint32 time) override; | ||
151 | 152 | | |||
152 | private: | 153 | private: | ||
153 | QTextEdit *m_textEdit; | 154 | QTextEdit *m_textEdit; | ||
154 | }; | 155 | }; | ||
155 | 156 | | |||
156 | #if HAVE_INPUT | 157 | #if HAVE_INPUT | ||
157 | 158 | | |||
158 | namespace LibInput | 159 | namespace LibInput | ||
Show All 26 Lines |