summaryrefslogtreecommitdiffstats
path: root/examples/multitouch/knobs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/multitouch/knobs')
-rw-r--r--examples/multitouch/knobs/knob.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/multitouch/knobs/knob.cpp b/examples/multitouch/knobs/knob.cpp
index d568167..b62d5b8 100644
--- a/examples/multitouch/knobs/knob.cpp
+++ b/examples/multitouch/knobs/knob.cpp
@@ -42,7 +42,7 @@
#include "knob.h"
#include <QBrush>
-#include <QGraphicsSceneTouchEvent>
+#include <QTouchEvent>
Knob::Knob()
: QGraphicsEllipseItem(-50, -50, 100, 100)
@@ -62,15 +62,15 @@ Knob::Knob()
bool Knob::sceneEvent(QEvent *event)
{
switch (event->type()) {
- case QEvent::GraphicsSceneTouchBegin:
- case QEvent::GraphicsSceneTouchUpdate:
- case QEvent::GraphicsSceneTouchEnd:
+ case QEvent::TouchBegin:
+ case QEvent::TouchUpdate:
+ case QEvent::TouchEnd:
{
- QGraphicsSceneTouchEvent *touchEvent = static_cast<QGraphicsSceneTouchEvent *>(event);
+ QTouchEvent *touchEvent = static_cast<QTouchEvent *>(event);
if (touchEvent->touchPoints().count() == 2) {
- const QGraphicsSceneTouchEvent::TouchPoint &touchPoint1 = touchEvent->touchPoints().first();
- const QGraphicsSceneTouchEvent::TouchPoint &touchPoint2 = touchEvent->touchPoints().last();
+ const QTouchEvent::TouchPoint &touchPoint1 = touchEvent->touchPoints().first();
+ const QTouchEvent::TouchPoint &touchPoint2 = touchEvent->touchPoints().last();
QLineF line1(touchPoint1.lastScenePos(), touchPoint2.lastScenePos());
QLineF line2(touchPoint1.scenePos(), touchPoint2.scenePos());