5

I want to retrieve events from a Wacom Bamboo and use them for Zoom, Pan and Rotate behavior in a Qt Quick 2 application.

Looking at photosurface example, it seems they are doing something like:

  MouseArea
  {
    id: dragArea
    hoverEnabled: true
    anchors.fill: parent

    onWheel:
    {
      if (wheel.modifiers & Qt.ControlModifier)
      {
         ...
      }
      else
      {
         ...
      }
    }
  }

However, wheel event does not provide enough information to determine the gesture performed. And photosurface example does not work correctly with Wacom Bamboo.

So, what is the correct way to integrate a Wacom device with a Qt Quick 2 application?

If no solution exists on the Qt Quick 2 site, is then possible to integrate a Wacom device with a C++ Qt Widget Application?

ADDITIONAL INFORMATION

PAN

enter image description here

The events I get are (changing values are surrounded by "<< >>", specific values with respect to other gestures are surrounded by "== =="):

wheel.buttons: 0
wheel.modifiers: == 0 ==
wheel.pixelDelta: QPoint(0, 0)
wheel.angleDelta: QPoint(0, << 21 >>)
wheel.x: 205
wheel.y: 279

Here, only one value changed for both vertical and horizontal pan.

ZOOM

enter image description here

The events I get are (changing values are surrounded by "<< >>", specific values with respect to other gestures are surrounded by "== =="):

Here, the same value is changing. Note that pinch gesture is sent as a "Ctrl + mouse wheel" event

wheel.buttons: 0
wheel.modifiers: == 67108864 ==
wheel.pixelDelta: QPoint(0, 0)
wheel.angleDelta: QPoint(0, << 40 >>)
wheel.x: 323
wheel.y: 291

ROTATE I get the exact same values as for the ZOOM gesture...

Korchkidu
  • 4,908
  • 8
  • 49
  • 69
  • 2
    I am not sure if this works with wacom bamboo, but: http://qt-project.org/doc/qt-4.8/qtabletevent.html , moreover: http://qt-project.org/doc/qt-4.8/qtouchevent.html . The latter can return a set of touch points, allowing you to detect personalized pan, resize and rotate gestures. – Herbert Apr 03 '14 at 19:26
  • This is not working correctly. It seems Qt only uses the OS events while more fine-grained Wacom events management is required. In this case, connecting to the Wacom device with their SDK is needed unfortunately. – Korchkidu Jul 03 '14 at 06:45
  • I'm very sorry, it was just what I found on Google, no first hand experience. I know that fetching fine grained touchpad events is hard, but I do remember that linux has a multitouch api: https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt This is for Symantech or Elantech clickpads, I'm not too sure if Wacom is compatible. My point is, if there is such an api, there probably also is an input device in /dev/ giving you access to this api, allowing you to write you own "event generators." But this is just a non-expert talking :P – Herbert Jul 03 '14 at 08:01
  • Maybe the links in this google search (no hate) may also help you: https://www.google.nl/search?q=Multi-touch+(MT)+Protocol&oq=Multi-touch+(MT)+Protocol&aqs=chrome..69i57j0.701j0j7&sourceid=chrome&es_sm=91&ie=UTF-8#q=Multi-touch+(MT)+Protocol+Wacom – Herbert Jul 03 '14 at 08:05
  • This actually what we end up using: the Wacom SDK. It is pretty easy actually. Thanks for your help. – Korchkidu Jul 03 '14 at 08:15
  • Awesome :) Good luck! – Herbert Jul 03 '14 at 09:50
  • Do MultiPointTouchArea's (http://doc.qt.io/qt-5/qml-qtquick-multipointtoucharea.html) work? – vpicaver Jan 29 '15 at 21:05
  • There's also PinchArea (http://doc.qt.io/qt-5/qml-qtquick-pincharea.html). I'm not sure if they work with Wacom devices, but it would be cool if they did. – vpicaver Jan 29 '15 at 21:07

0 Answers0