19 #ifndef MOUSE_TOUCH_ADAPTOR_H
20 #define MOUSE_TOUCH_ADAPTOR_H
22 #include <QtCore/QAbstractNativeEventFilter>
30 class MouseTouchAdaptor :
public QObject,
public QAbstractNativeEventFilter {
33 virtual ~MouseTouchAdaptor();
35 static MouseTouchAdaptor* instance();
38 bool nativeEventFilter(
const QByteArray & eventType,
void *message,
long *result)
override;
40 Q_PROPERTY(
bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
43 void setEnabled(
bool value);
46 void enabledChanged(
bool value);
51 bool handleButtonPress(xcb_button_press_event_t *pressEvent);
52 bool handleButtonRelease(xcb_button_release_event_t *releaseEvent);
53 bool handleMotionNotify(xcb_motion_notify_event_t *event);
54 QWindow *findQWindowWithXWindowID(WId windowId);
56 QTouchDevice *m_touchDevice;
57 bool m_leftButtonIsPressed;
62 #endif // MOUSE_TOUCH_ADAPTOR_H