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" :
185 QTextStream s(&
string);
189#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
190 s << (ev.device()->type() ?
"TouchPad" :
"TouchScreen") <<
" ";
192 if (ev.deviceType() == QInputDevice::DeviceType::TouchPad) {
195 else if (ev.deviceType() == QInputDevice::DeviceType::TouchScreen) {
200 for (
const auto& touchpoint: ev.touchPoints()) {
201 s <<
"id: " << touchpoint.id() <<
" ";
202 s <<
"hires: " << qSetFieldWidth(8) << touchpoint.screenPos().x() << qSetFieldWidth(0) <<
"," << qSetFieldWidth(8) << touchpoint.screenPos().y() << qSetFieldWidth(0) <<
" ";
203 s <<
"prs: " << touchpoint.pressure() <<
" ";
204 s <<
"rot: "<< touchpoint.rotation() <<
" ";
205 s <<
"state: 0x" << Qt::hex << touchpoint.state() <<
"; ";
258#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
260 event.deviceType() == QTabletEvent::NoDevice ?
"NoDevice" :
261 event.deviceType() == QTabletEvent::Puck ?
"Puck" :
262 event.deviceType() == QTabletEvent::Stylus ?
"Stylus" :
263 event.deviceType() == QTabletEvent::Airbrush ?
"Airbrush" :
264 event.deviceType() == QTabletEvent::FourDMouse ?
"FourDMouse" :
265 event.deviceType() == QTabletEvent::XFreeEraser ?
"XFreeEraser" :
266 event.deviceType() == QTabletEvent::RotationStylus ?
"RotationStylus" :
269 QInputDevice::DeviceType deviceType =
event.deviceType();
272 deviceType == QInputDevice::DeviceType::Puck ?
"Puck" :
273 deviceType == QInputDevice::DeviceType::Stylus ?
"Stylus" :
274 deviceType == QInputDevice::DeviceType::Airbrush ?
"Airbrush" :
280#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
282 event.pointerType() == QTabletEvent::UnknownPointer ?
"UnknownPointer" :
283 event.pointerType() == QTabletEvent::Pen ?
"Pen" :
284 event.pointerType() == QTabletEvent::Cursor ?
"Cursor" :
285 event.pointerType() == QTabletEvent::Eraser ?
"Eraser" :
288 QPointingDevice::PointerType pointerType =
event.pointerType();
290 pointerType == QPointingDevice::PointerType::Pen ?
"Pen" :
291 pointerType == QPointingDevice::PointerType::Cursor ?
"Cursor" :
292 pointerType == QPointingDevice::PointerType::Eraser ?
"Eraser" :