Changeset View
Changeset View
Standalone View
Standalone View
cursor.h
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | |||||
50 | * system specific subclass. So far only an X11 backend is implemented which uses query pointer to | 50 | * system specific subclass. So far only an X11 backend is implemented which uses query pointer to | ||
51 | * fetch the position and warp pointer to set the position. It uses a timer based mouse polling and | 51 | * fetch the position and warp pointer to set the position. It uses a timer based mouse polling and | ||
52 | * can provide X11 cursors through the XCursor library. | 52 | * can provide X11 cursors through the XCursor library. | ||
53 | **/ | 53 | **/ | ||
54 | class KWIN_EXPORT Cursor : public QObject | 54 | class KWIN_EXPORT Cursor : public QObject | ||
55 | { | 55 | { | ||
56 | Q_OBJECT | 56 | Q_OBJECT | ||
57 | public: | 57 | public: | ||
58 | virtual ~Cursor(); | 58 | ~Cursor() override; | ||
59 | void startMousePolling(); | 59 | void startMousePolling(); | ||
60 | void stopMousePolling(); | 60 | void stopMousePolling(); | ||
61 | /** | 61 | /** | ||
62 | * @brief Enables tracking changes of cursor images. | 62 | * @brief Enables tracking changes of cursor images. | ||
63 | * | 63 | * | ||
64 | * After enabling cursor change tracking the signal @link cursorChanged will be emitted | 64 | * After enabling cursor change tracking the signal @link cursorChanged will be emitted | ||
65 | * whenever a change to the cursor image is recognized. | 65 | * whenever a change to the cursor image is recognized. | ||
66 | * | 66 | * | ||
▲ Show 20 Lines • Show All 158 Lines • ▼ Show 20 Line(s) | |||||
225 | * Does not support warping of cursor. | 225 | * Does not support warping of cursor. | ||
226 | * | 226 | * | ||
227 | */ | 227 | */ | ||
228 | class InputRedirectionCursor : public Cursor | 228 | class InputRedirectionCursor : public Cursor | ||
229 | { | 229 | { | ||
230 | Q_OBJECT | 230 | Q_OBJECT | ||
231 | public: | 231 | public: | ||
232 | explicit InputRedirectionCursor(QObject *parent); | 232 | explicit InputRedirectionCursor(QObject *parent); | ||
233 | virtual ~InputRedirectionCursor(); | 233 | ~InputRedirectionCursor() override; | ||
234 | protected: | 234 | protected: | ||
235 | virtual void doSetPos(); | 235 | void doSetPos() override; | ||
236 | virtual void doStartCursorTracking(); | 236 | void doStartCursorTracking() override; | ||
237 | virtual void doStopCursorTracking(); | 237 | void doStopCursorTracking() override; | ||
238 | private Q_SLOTS: | 238 | private Q_SLOTS: | ||
239 | void slotPosChanged(const QPointF &pos); | 239 | void slotPosChanged(const QPointF &pos); | ||
240 | void slotPointerButtonChanged(); | 240 | void slotPointerButtonChanged(); | ||
241 | void slotModifiersChanged(Qt::KeyboardModifiers mods, Qt::KeyboardModifiers oldMods); | 241 | void slotModifiersChanged(Qt::KeyboardModifiers mods, Qt::KeyboardModifiers oldMods); | ||
242 | private: | 242 | private: | ||
243 | Qt::MouseButtons m_currentButtons; | 243 | Qt::MouseButtons m_currentButtons; | ||
244 | friend class Cursor; | 244 | friend class Cursor; | ||
245 | }; | 245 | }; | ||
Show All 29 Lines |