summaryrefslogtreecommitdiffstats
path: root/tests/manual/qtabletevent/device_information/tabletwidget.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/qtabletevent/device_information/tabletwidget.h')
-rw-r--r--tests/manual/qtabletevent/device_information/tabletwidget.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/manual/qtabletevent/device_information/tabletwidget.h b/tests/manual/qtabletevent/device_information/tabletwidget.h
index 404be1289f..d05b89a74e 100644
--- a/tests/manual/qtabletevent/device_information/tabletwidget.h
+++ b/tests/manual/qtabletevent/device_information/tabletwidget.h
@@ -31,6 +31,7 @@
#include <QWidget>
#include <QTabletEvent>
+#include <QPointingDevice>
#include <QShortcut>
// a widget showing the information of the last tablet event
@@ -42,12 +43,18 @@ protected:
bool eventFilter(QObject *obj, QEvent *ev);
void tabletEvent(QTabletEvent *event);
void paintEvent(QPaintEvent *event);
+ const char *deviceTypeToString(QInputDevice::DeviceType t);
+ const char *pointerTypeToString(QPointingDevice::PointerType t);
+ QString pointerCapabilitiesToString(QPointingDevice::Capabilities c);
const char *buttonToString(Qt::MouseButton b);
QString buttonsToString(Qt::MouseButtons bs);
QString modifiersToString(Qt::KeyboardModifiers m);
private:
void resetAttributes() {
- mType = mDev = mPointerType = mXT = mYT = mZ = 0;
+ mDev = QInputDevice::DeviceType::Unknown;
+ mPointerType = QPointingDevice::PointerType::Unknown;
+ mCaps = {};
+ mType = mXT = mYT = mZ = 0;
mPress = mTangential = mRot = 0.0;
mPos = mGPos = QPoint();
mHiResGlobalPos = QPointF();
@@ -56,7 +63,10 @@ private:
int mType;
QPoint mPos, mGPos;
QPointF mHiResGlobalPos;
- int mDev, mPointerType, mXT, mYT, mZ;
+ QInputDevice::DeviceType mDev;
+ QPointingDevice::PointerType mPointerType;
+ QPointingDevice::Capabilities mCaps;
+ int mXT, mYT, mZ;
Qt::MouseButton mButton;
Qt::MouseButtons mButtons;
Qt::KeyboardModifiers mModifiers;