QGyroscopeReading
Since: 1.2
#include <QtSensors/QGyroscopeReading>
More information will be added here shortly. For now, you'll find more extensive information about this class in the Qt reference for QGyroscopeReading
QtSensors
The QGyroscopeReading class represents one reading from the gyroscope sensor.
Overview
Inheritance
QSensorReading | ||
QGyroscopeReading |
Properties Index
Public Functions Index
void | setX (qreal x) |
void | setY (qreal y) |
void | setZ (qreal z) |
qreal | x () const |
qreal | y () const |
qreal | z () const |
void | setTimestamp (qtimestamp timestamp)![]() |
qtimestamp | timestamp () const ![]() |
QVariant | value (int index) const ![]() |
int | valueCount () const ![]() |
Protected Functions Index
Only has inherited protected functions
virtual void | copyValuesFrom (QSensorReading *other)![]() |
QScopedPointer< QSensorReadingPrivate > * | d_ptr ()![]() |
QSensorReading (QObject *parent, QSensorReadingPrivate *d)![]() |
Properties
qreal
the angular velocity around the x axis.
Measured as degrees per second.
qreal
the angular velocity around the y axis.
{QGyroscopeReading Units}
1.2
qreal
the angular velocity around the z axis.
{QGyroscopeReading Units}
1.2
Public Functions
void
Sets the angular velocity around the x axis to x.
1.2
void
Sets the angular velocity around the y axis to y.
1.2
void
Sets the angular velocity around the z axis to z.
1.2
qreal
qreal
qreal
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)
© 2013 Digia Plc and/or its subsidiaries. Documentation contributions included herein are the copyrights of their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Documentation sources may be obtained from www.qt-project.org.
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. Privacy Policy