66 type == QEvent::TabletEnterProximity ?
"TabletEnterProximity" :
67 type == QEvent::TabletLeaveProximity ?
"TabletLeaveProximity" :
68 type == QEvent::Enter ?
"Enter" :
69 type == QEvent::Leave ?
"Leave" :
70 type == QEvent::FocusIn ?
"FocusIn" :
71 type == QEvent::FocusOut ?
"FocusOut" :
72 type == QEvent::Wheel ?
"Wheel" :
73 type == QEvent::KeyPress ?
"KeyPress" :
74 type == QEvent::KeyRelease ?
"KeyRelease" :
75 type == QEvent::ShortcutOverride ?
"ShortcutOverride" :
76 type == QMouseEvent::MouseButtonPress ?
"MouseButtonPress" :
77 type == QMouseEvent::MouseButtonRelease ?
"MouseButtonRelease" :
78 type == QMouseEvent::MouseButtonDblClick ?
"MouseButtonDblClick" :
79 type == QMouseEvent::MouseMove ?
"MouseMove" :
80 type == QTabletEvent::TabletMove ?
"TabletMove" :
81 type == QTabletEvent::TabletPress ?
"TabletPress" :
82 type == QTabletEvent::TabletRelease ?
"TabletRelease" :
83 type == QTouchEvent::TouchBegin ?
"TouchBegin" :
84 type == QTouchEvent::TouchUpdate ?
"TouchUpdate" :
85 type == QTouchEvent::TouchEnd ?
"TouchEnd" :
86 type == QTouchEvent::TouchCancel ?
"TouchCancel" :
87 type == QTouchEvent::NativeGesture ?
"NativeGesture" :
199 QTextStream s(&
string);
203#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
204 s << (ev.device()->type() ?
"TouchPad" :
"TouchScreen") <<
" ";
206 if (ev.deviceType() == QInputDevice::DeviceType::TouchPad) {
209 else if (ev.deviceType() == QInputDevice::DeviceType::TouchScreen) {
214 for (
const auto& touchpoint: ev.touchPoints()) {
215 s <<
"id: " << touchpoint.id() <<
" ";
216 s <<
"hires: " << qSetFieldWidth(8) << touchpoint.screenPos().x() << qSetFieldWidth(0) <<
"," << qSetFieldWidth(8) << touchpoint.screenPos().y() << qSetFieldWidth(0) <<
" ";
217 s <<
"prs: " << touchpoint.pressure() <<
" ";
218 s <<
"rot: "<< touchpoint.rotation() <<
" ";
219 s <<
"state: 0x" << Qt::hex << touchpoint.state() <<
"; ";
312#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
314 event.deviceType() == QTabletEvent::NoDevice ?
"NoDevice" :
315 event.deviceType() == QTabletEvent::Puck ?
"Puck" :
316 event.deviceType() == QTabletEvent::Stylus ?
"Stylus" :
317 event.deviceType() == QTabletEvent::Airbrush ?
"Airbrush" :
318 event.deviceType() == QTabletEvent::FourDMouse ?
"FourDMouse" :
319 event.deviceType() == QTabletEvent::XFreeEraser ?
"XFreeEraser" :
320 event.deviceType() == QTabletEvent::RotationStylus ?
"RotationStylus" :
323 QInputDevice::DeviceType deviceType =
event.deviceType();
326 deviceType == QInputDevice::DeviceType::Puck ?
"Puck" :
327 deviceType == QInputDevice::DeviceType::Stylus ?
"Stylus" :
328 deviceType == QInputDevice::DeviceType::Airbrush ?
"Airbrush" :
334#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
336 event.pointerType() == QTabletEvent::UnknownPointer ?
"UnknownPointer" :
337 event.pointerType() == QTabletEvent::Pen ?
"Pen" :
338 event.pointerType() == QTabletEvent::Cursor ?
"Cursor" :
339 event.pointerType() == QTabletEvent::Eraser ?
"Eraser" :
342 QPointingDevice::PointerType pointerType =
event.pointerType();
344 pointerType == QPointingDevice::PointerType::Pen ?
"Pen" :
345 pointerType == QPointingDevice::PointerType::Cursor ?
"Cursor" :
346 pointerType == QPointingDevice::PointerType::Eraser ?
"Eraser" :