Sunday, November 25, 2012

state of QSensor and Qt's sensor gestures

I wanted my next post to include some videos demonstrating QSensors and QSensorGestures. I got sidelined by learning BlackBerry Cascades development.


I am happy to report that Qt5's QSensor and QSensorGestures work very well on BB10.



The qt-project, in cooperation with Qt copyright holders Digia, have recently opened up Qt Mobility project and included that code in the Open Governance model that Qt is currently developed under.

This means that I can contribute to qt-mobility again since Nokia closed the Brisbane office.

There are a number of high profile projects that use Qt 4 and Qt Mobility, namely Jolla Mobile and BlackBerry 10.

One of the first community committed patches was me backporting QSensorGesture to Qt Mobility.
You can get the code here:
http://qt.gitorious.org/qt-mobility


There is one change in the signals being generated. I decided to remove the runtime generated signals such as 'shake()' and 'whip()' that use QMetaObjectBuilder. So now there is only 'detected(QString)' signal. The QML API remains the same, with an additional 1.3 version.

On top of that, I added a freefall gesture, as well as moving the irProximity sensor to it's proper place with all the other QSensors.

As for Qt 5...

QSensors unfortunately will not be part of the Qt 5 release package. On top of that, you wont be able to currently find the documentation at qt-project.org nor build QSensors using the normal 'make module-qtsensors'. So, it's a bit like it fell off the face of the Earth.

But fear not, it's still there in git. Still being worked on and improved.