diff options
author | Andrew Inwood <ainwood@blackberry.com> | 2014-03-13 18:58:15 -0400 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-20 15:27:32 +0100 |
commit | 971fc95eca1d9db93aa4bdb75793dfe83e4a97db (patch) | |
tree | cb3bc54a3d1fab5c98558c5179a6f09da4db2a46 /src/sensors | |
parent | 14293dcb7002b185b49ec1ad802055eee63f2473 (diff) | |
download | qtsensors-971fc95eca1d9db93aa4bdb75793dfe83e4a97db.tar.gz |
Implement QAccelerometer accelerationModev5.3.0-beta1
The Qt API does not expose Linear Accel and Gravity as separate sensor types,
they are different versions of QAccelerometer, accessed by modifying the
accelerationMode property. The possible values are Combined, User, and Gravity, which
correspond to Acceleration, Linear Acceleration, and Gravity respectively. When
constructing the accelerometer backend, the accelerationMode must be queried. The
backend must also connect to the accelerationModeChanged signal from the QAccelerometer.
I think that the existing implementation of QSensors on Android assumes that there is a
one-to-one correspondence between QSensors and AndroidSensorTypes. To fix this assumption,
I promoted the m_type attribute of androidcommonsensor.h from private to protected so
that a sensor backend can update the Android sensor being used.
Task-number: QTBUG-30531
Change-Id: I842d2485109542f74731d179e2720ea55fa248cc
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
Diffstat (limited to 'src/sensors')
0 files changed, 0 insertions, 0 deletions