Make qDebug output for QTabletEvent similar to that for QMouseEvent
Reuse operator<<(QPointingDevice*) and move the button state right after the event type. Now it's easier to follow when a QTabletEvent is not accepted and a mouse event is synthesized: qt.quick.pointer QQuickWindowPrivate::deliverPointerEvent - delivering QTabletEvent(TabletPress LeftButton pos=100,100 z=3 xTilt=25 yTilt=35 pressure=0.5 dev=QPointingDevice("Wacom Intuos3 6x8 Pen stylus" Stylus id=13 seat=30002 ptrType=Pen caps=Position|Pressure|MouseEmulation|Hover|XTilt|YTilt uniqueId=499602d2)) qt.quick.pointer QQuickWindowPrivate::deliverPointerEvent - delivering QMouseEvent(MouseButtonPress LeftButton pos=100,100 scn=100,100 gbl=3739,1029 dev=QPointingDevice("Wacom Intuos3 6x8 Pen stylus" Stylus id=13 seat=30002 ptrType=Pen caps=Position|Pressure|MouseEmulation|Hover|XTilt|YTilt uniqueId=499602d2)) Change-Id: If22f1c07d32f595d0444513b49635218c08a300d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
2f1c087573
commit
94dfb18865
@ -3896,23 +3896,20 @@ static void formatTabletEvent(QDebug d, const QTabletEvent *e)
|
||||
|
||||
d << eventClassName(type) << '(';
|
||||
QtDebugUtils::formatQEnum(d, type);
|
||||
d << " deviceType=";
|
||||
QtDebugUtils::formatQEnum(d, e->deviceType());
|
||||
d << " pointerType=";
|
||||
QtDebugUtils::formatQEnum(d, e->pointerType());
|
||||
d << " uniqueId=" << e->pointingDevice()->uniqueId().numericId()
|
||||
<< " pos=" << e->position()
|
||||
<< " z=" << e->z()
|
||||
<< " xTilt=" << e->xTilt()
|
||||
<< " yTilt=" << e->yTilt()
|
||||
<< " ";
|
||||
d << ' ';
|
||||
QtDebugUtils::formatQFlags(d, e->buttons());
|
||||
d << " pos=";
|
||||
QtDebugUtils::formatQPoint(d, e->position());
|
||||
d << " z=" << e->z()
|
||||
<< " xTilt=" << e->xTilt()
|
||||
<< " yTilt=" << e->yTilt();
|
||||
if (type == QEvent::TabletPress || type == QEvent::TabletMove)
|
||||
d << " pressure=" << e->pressure();
|
||||
if (e->device()->hasCapability(QInputDevice::Capability::Rotation))
|
||||
d << " rotation=" << e->rotation();
|
||||
if (e->deviceType() == QInputDevice::DeviceType::Airbrush)
|
||||
d << " tangentialPressure=" << e->tangentialPressure();
|
||||
d << " dev=" << e->device() << ')';
|
||||
}
|
||||
|
||||
# endif // QT_CONFIG(tabletevent)
|
||||
|
Loading…
Reference in New Issue
Block a user