summaryrefslogtreecommitdiffstats
path: root/tests/manual/qtabletevent/device_information
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-09-25 14:02:04 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-09-25 14:02:04 +0200
commita1ad9a74ebb3c556c5f70f7e03be68b09598ac53 (patch)
tree615a96db418219a57a745a5899e39a9ac90744ec /tests/manual/qtabletevent/device_information
parent6d78b7a0c46ea04f4bb771d960e2f7dff1362341 (diff)
parent462f355e4fb16cc7a1838fa2dda0f763eee58c84 (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts: src/corelib/io/io.pri src/corelib/io/qdatastream.cpp src/corelib/io/qdatastream.h src/network/socket/qabstractsocket.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h src/widgets/styles/qgtkstyle.cpp tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro tests/auto/dbus/qdbusconnection/qdbusconnection.pro tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp Change-Id: I347549a024eb5bfa986699e0a11f96cc55c797a7
Diffstat (limited to 'tests/manual/qtabletevent/device_information')
-rw-r--r--tests/manual/qtabletevent/device_information/tabletwidget.cpp3
-rw-r--r--tests/manual/qtabletevent/device_information/tabletwidget.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/manual/qtabletevent/device_information/tabletwidget.cpp b/tests/manual/qtabletevent/device_information/tabletwidget.cpp
index e35cee65e8..2462bb3701 100644
--- a/tests/manual/qtabletevent/device_information/tabletwidget.cpp
+++ b/tests/manual/qtabletevent/device_information/tabletwidget.cpp
@@ -73,6 +73,7 @@ bool TabletWidget::eventFilter(QObject *, QEvent *ev)
mRot = event->rotation();
mButton = event->button();
mButtons = event->buttons();
+ mTimestamp = event->timestamp();
if (isVisible())
update();
break;
@@ -84,6 +85,7 @@ bool TabletWidget::eventFilter(QObject *, QEvent *ev)
mType = event->type();
mPos = event->pos();
mGPos = event->globalPos();
+ mTimestamp = event->timestamp();
}
default:
break;
@@ -122,6 +124,7 @@ void TabletWidget::paintEvent(QPaintEvent *)
eventInfo << QString("Global position: %1 %2").arg(QString::number(mGPos.x()), QString::number(mGPos.y()));
eventInfo << QString("Local position: %1 %2").arg(QString::number(mPos.x()), QString::number(mPos.y()));
+ eventInfo << QString("Timestamp: %1").arg(QString::number(mTimestamp));
if (mType == QEvent::TabletEnterProximity || mType == QEvent::TabletLeaveProximity
|| mType == QEvent::TabletMove || mType == QEvent::TabletPress
|| mType == QEvent::TabletRelease) {
diff --git a/tests/manual/qtabletevent/device_information/tabletwidget.h b/tests/manual/qtabletevent/device_information/tabletwidget.h
index 2861eb4814..95631be57b 100644
--- a/tests/manual/qtabletevent/device_information/tabletwidget.h
+++ b/tests/manual/qtabletevent/device_information/tabletwidget.h
@@ -65,6 +65,7 @@ private:
qreal mPress, mTangential, mRot;
qint64 mUnique;
bool mMouseToo;
+ ulong mTimestamp;
};
#endif // TABLETWIDGET_H