diff options
Diffstat (limited to 'src/platformsupport/input/evdevtouch/qevdevtouchhandler_p.h')
-rw-r--r-- | src/platformsupport/input/evdevtouch/qevdevtouchhandler_p.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler_p.h b/src/platformsupport/input/evdevtouch/qevdevtouchhandler_p.h index 8e7dfe59bb..ca9756d5de 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler_p.h +++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler_p.h @@ -66,16 +66,22 @@ class QEvdevTouchScreenHandler : public QObject Q_OBJECT public: - explicit QEvdevTouchScreenHandler(const QString &device, const QString &spec = QString(), QObject *parent = 0); + explicit QEvdevTouchScreenHandler(const QString &device, const QString &spec = QString(), QObject *parent = Q_NULLPTR); ~QEvdevTouchScreenHandler(); + QTouchDevice *touchDevice() const; + private slots: void readData(); private: + void registerTouchDevice(); + void unregisterTouchDevice(); + QSocketNotifier *m_notify; int m_fd; QEvdevTouchScreenData *d; + QTouchDevice *m_device; #if !defined(QT_NO_MTDEV) mtdev *m_mtdev; #endif @@ -83,16 +89,24 @@ private: class QEvdevTouchScreenHandlerThread : public QDaemonThread { + Q_OBJECT public: - explicit QEvdevTouchScreenHandlerThread(const QString &device, const QString &spec, QObject *parent = 0); + explicit QEvdevTouchScreenHandlerThread(const QString &device, const QString &spec, QObject *parent = Q_NULLPTR); ~QEvdevTouchScreenHandlerThread(); void run() Q_DECL_OVERRIDE; - QEvdevTouchScreenHandler *handler() { return m_handler; } + + bool isTouchDeviceRegistered() const; + +signals: + void touchDeviceRegistered(); private: + Q_INVOKABLE void notifyTouchDeviceRegistered(); + QString m_device; QString m_spec; QEvdevTouchScreenHandler *m_handler; + bool m_touchDeviceRegistered; }; QT_END_NAMESPACE |