From: Friedemann Kleint Date: Thu, 26 Mar 2015 11:11:44 +0000 (+0100) Subject: qtdiag: Add information on touch devices. X-Git-Tag: v5.5.90+alpha1~22^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1fc8f80066aa7131d97ca40c8aada27e7d871379;p=platform%2Fupstream%2Fqttools.git qtdiag: Add information on touch devices. Change-Id: Ibe28292df577bf12311b91952df9034b9636589a Reviewed-by: Alex Blasche --- diff --git a/src/qtdiag/qtdiag.cpp b/src/qtdiag/qtdiag.cpp index d5869c0..b710be8 100644 --- a/src/qtdiag/qtdiag.cpp +++ b/src/qtdiag/qtdiag.cpp @@ -43,6 +43,7 @@ # include #endif // QT_NO_OPENGL #include +#include #ifdef NETWORK_DIAG # include @@ -385,6 +386,33 @@ QString qtDiag(unsigned flags) << "\n\n"; } + const QList touchDevices = QTouchDevice::devices(); + if (!touchDevices.isEmpty()) { + str << "Touch devices: " << touchDevices.size() << '\n'; + foreach (const QTouchDevice *device, touchDevices) { + str << " " << (device->type() == QTouchDevice::TouchScreen ? "TouchScreen" : "TouchPad") + << " \"" << device->name() << "\", max " << device->maximumTouchPoints() + << " touch points, capabilities:"; + const QTouchDevice::Capabilities capabilities = device->capabilities(); + if (capabilities & QTouchDevice::Position) + str << " Position"; + if (capabilities & QTouchDevice::Area) + str << " Area"; + if (capabilities & QTouchDevice::Pressure) + str << " Pressure"; + if (capabilities & QTouchDevice::Velocity) + str << " Velocity"; + if (capabilities & QTouchDevice::RawPositions) + str << " RawPositions"; + if (capabilities & QTouchDevice::NormalizedPosition) + str << " NormalizedPosition"; + if (capabilities & QTouchDevice::MouseEmulation) + str << " MouseEmulation"; + str << '\n'; + } + str << "\n\n"; + } + #ifndef QT_NO_OPENGL dumpGlInfo(str, flags & QtDiagGlExtensions); str << "\n\n";