50#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
51 switch (event->pointerType()) {
52 case QTabletEvent::UnknownPointer: {
53 return Pointer::Unknown;
56 case QTabletEvent::Pen: {
60 case QTabletEvent::Cursor: {
61 return Pointer::Cursor;
64 case QTabletEvent::Eraser: {
65 return Pointer::Eraser;
68 return Pointer::Unknown;
71 QPointingDevice::PointerType pointer =
event->pointerType();
73 case (QPointingDevice::PointerType::Unknown): {
74 return Pointer::Unknown;
76 case QPointingDevice::PointerType::Generic:{
77 return Pointer::Generic;
79 case QPointingDevice::PointerType::Finger:{
80 return Pointer::Finger;
82 case QPointingDevice::PointerType::Pen:{
85 case QPointingDevice::PointerType::Eraser:{
86 return Pointer::Eraser;
89 case QPointingDevice::PointerType::Cursor:{
90 return Pointer::Cursor;
92 case QPointingDevice::PointerType::AllPointerTypes:{
93 return Pointer::AllPointerTypes;
96 return Pointer::Unknown;
103#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
104 switch (event->deviceType()) {
105 case QTabletEvent::NoDevice: {
106 return InputDevice::Unknown;
109 case QTabletEvent::Puck: {
110 return InputDevice::Puck;
113 case QTabletEvent::Stylus: {
114 return InputDevice::Stylus;
117 case QTabletEvent::Airbrush: {
118 return InputDevice::Airbrush;
120 case QTabletEvent::RotationStylus: {
123 return InputDevice::Stylus;
126 return InputDevice::Unknown;
130 QInputDevice::DeviceType deviceType =
event->deviceType();
132 case QInputDevice::DeviceType::Unknown: {
133 return InputDevice::Unknown;
136 case QInputDevice::DeviceType::Mouse:{
137 return InputDevice::Mouse;
140 case QInputDevice::DeviceType::TouchScreen:
142 return InputDevice::TouchScreen;
145 case QInputDevice::DeviceType::TouchPad:
147 return InputDevice::TouchPad;
150 case QInputDevice::DeviceType::Puck:
152 return InputDevice::Puck;
155 case QInputDevice::DeviceType::Stylus:
157 return InputDevice::Stylus;
160 case QInputDevice::DeviceType::Airbrush:
162 return InputDevice::Airbrush;
165 case QInputDevice::DeviceType::Keyboard:
167 return InputDevice::Keyboard;
170 case QInputDevice::DeviceType::AllDevices:
172 return InputDevice::AllDevices;
175 return InputDevice::Unknown;