123456789101112131415161718192021222324252627282930313233343536373839 |
-
- #include <QThread>
- #include <QMutex>
- #include <QStack>
- #include <QCursor>
- #include <QWidget>
- class JMouseMonitorThread : public QThread {
- Q_OBJECT
- public:
- explicit JMouseMonitorThread(QObject* parent = nullptr);
- void setLockCenter(const QPoint center);
- void unlock();
- void stop();
- signals:
- void MouseMovedSlg(const QPoint& delta);
- void RequestCursorMoveSlg(const QPoint& pos);
- protected:
- void run() override;
- private:
- QMutex m_mutex;
- QPoint m_lockCenter;
- bool m_locked;
- bool m_running;
- };
|