QMagnetometerReading
#include <QtSensors/QMagnetometerReading>
QtSensors
1.0
Inheritance
| QSensorReading | ||
| QMagnetometerReading | ||
Properties Index
| qreal | x [read-only] |
| qreal | y [read-only] |
| qreal | z [read-only] |
| qreal | calibrationLevel [read-only] |
| QtMobility::qtimestamp | timestamp [read-only] |
Public Functions Index
| QMagnetometerReading (QObject *parent=0) | |
| virtual | ~QMagnetometerReading () |
| virtual void | copyValuesFrom (QSensorReading *other) |
| qreal | x () const |
| void | setX (qreal x) |
| qreal | y () const |
| void | setY (qreal y) |
| qreal | z () const |
| void | setZ (qreal z) |
| qreal | calibrationLevel () const |
| void | setCalibrationLevel (qreal calibrationLevel) |
| void | setTimestamp (qtimestamp timestamp) |
| qtimestamp | timestamp () const |
| QVariant | value (int index) const |
| int | valueCount () const |
Protected Functions Index
Only has inherited protected functions
| QScopedPointer< QSensorReadingPrivate > * | d_ptr () |
| QSensorReading (QObject *parent, QSensorReadingPrivate *d) |
Properties
qreal
the raw magnetic flux density on the X axis.
{QMagnetometerReading Units}
1.0
qreal
the raw magnetic flux density on the Y axis.
{QMagnetometerReading Units}
1.0
qreal
the raw magnetic flux density on the Z axis.
{QMagnetometerReading Units}
1.0
qreal
the accuracy of the reading.
Measured as a value from 0 to 1 with higher values being better.
{QMagnetometerReading Units}, {http://wiki.forum.nokia.com/index.php/CS001671_-_Calibrating_the_magnetometer_sensor}{CS001671 - Calibrating the magnetometer sensor}
1.0
QtMobility::qtimestamp
the timestamp of the reading.
Returns the timestamp of the reading.
1.0
,1.0
Public Functions
virtual
Destructor.
virtual void
qreal
void
Sets the raw magnetic flux density on the X axis to x.
1.0
qreal
void
Sets the raw magnetic flux density on the Y axis to y.
1.0
qreal
void
Sets the raw magnetic flux density on the Z axis to z.
1.0
qreal
void
Sets the accuracy of the reading to calibrationLevel.
1.0
void 
Sets the timestamp of the reading.
1.0
QVariant 
Returns the value of the property at index.
Note that this function is slower than calling the data function directly.
Here is an example of getting a property via the different mechanisms available.
Accessing directly provides the best performance but requires compile-time knowledge of the data you are accessing.
QAccelerometerReading *reading = ...; qreal x = reading->x();
You can also access a property by name. To do this you must call QObject::property().
qreal x = reading->property("x").value<qreal>();
Finally, you can access values via numeric index.
qreal x = reading->value(0).value<qreal>();
Note that value() can only access properties declared with Q_PROPERTY() in sub-classes of QSensorReading.
valueCount(), QObject::property()
1.0
int 
Returns the number of extra properties that the reading has.
Note that this does not count properties declared in QSensorReading.
1.0
Protected Functions
(Only has inherited protected functions)
QScopedPointer< QSensorReadingPrivate > * 
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia. Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.