File indexing completed on 2024-05-19 05:37:51
0001 /* 0002 SPDX-FileCopyrightText: 2007 Fredrik Höglund <fredrik@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-only 0005 */ 0006 0007 #pragma once 0008 0009 #include <QPoint> 0010 #include <QTimerEvent> 0011 0012 #include <Plasma5Support/DataEngine> 0013 0014 #include <config-X11.h> 0015 0016 #ifdef HAVE_XFIXES 0017 class CursorNotificationHandler; 0018 #endif 0019 0020 class MouseEngine : public Plasma5Support::DataEngine 0021 { 0022 Q_OBJECT 0023 0024 public: 0025 MouseEngine(QObject *parent); 0026 ~MouseEngine() override; 0027 0028 QStringList sources() const override; 0029 0030 protected: 0031 void init(); 0032 void timerEvent(QTimerEvent *) override; 0033 0034 private Q_SLOTS: 0035 void updateCursorName(const QString &name); 0036 0037 private: 0038 QPoint lastPosition; 0039 int timerId; 0040 #ifdef HAVE_XFIXES 0041 CursorNotificationHandler *handler; 0042 #endif 0043 };