Name Description Size Coverage
CMakeLists.txt 2331 -
configure.cmake 1516 -
configure.json 570 -
doc -
make_sensor.pl 9740 -
qaccelerometer.cpp ! \class QAccelerometerReading \ingroup sensors_reading \inmodule QtSensors \since 5.1 \brief The QAccelerometerReading class reports on linear acceleration along the X, Y and Z axes. \section1 QAccelerometerReading Units The scale of the values is meters per second squared. The axes are arranged as follows. \image sensors-coordinates2.jpg {Device with positive and negative x, y, and z acceleration axes extending in all six directions} A monoblock device sitting at rest, face up on a desk will experience a force of approximately 9.8 on the Z axis (ie. towards the roof). This is the proper acceleration the device experiences relative to freefall. 7136 -
qaccelerometer.h 1819 -
qaccelerometer_p.h 958 -
qambientlightsensor.cpp ! \class QAmbientLightReading \ingroup sensors_reading \inmodule QtSensors \since 5.1 \brief The QAmbientLightReading class represents one reading from the ambient light sensor. \section1 QAmbientLightReading Units The ambient light sensor returns the intensity of the ambient light using the pre-defined values found in the QAmbientLightReading::LightLevel enum. 3782 -
qambientlightsensor.h 1312 -
qambientlightsensor_p.h 726 -
qambienttemperaturesensor.cpp ! \class QAmbientTemperatureReading \ingroup sensors_reading \inmodule QtSensors \since 5.1 \brief The QAmbientTemperatureReading class holds readings of the ambient temperature. The ambient (room) temperature is the temperature in degree Celsius. 3051 -
qambienttemperaturesensor.h 1211 -
qambienttemperaturesensor_p.h 751 -
qcompass.cpp ! \class QCompassReading \ingroup sensors_reading \inmodule QtSensors \since 5.1 \brief The QCompassReading class represents one reading from a compass. \section1 QCompassReading Units The compass returns the azimuth of the device as degrees from magnetic north in a clockwise direction based on the top of the device, as defined by QScreen::nativeOrientation. There is also a value to indicate the calibration status of the device. If the device is not calibrated the azimuth may not be accurate. Digital compasses are susceptible to magnetic interference and may need calibration after being placed near anything that emits a magnetic force. Accuracy of the compass can be affected by any ferrous materials that are nearby. The calibration status of the device is measured as a number from 0 to 1. A value of 1 is the highest level that the device can support and 0 is the worst. 3960 -
qcompass.h 1186 -
qcompass_p.h 748 -
qgyroscope.cpp ! \class QGyroscopeReading \ingroup sensors_reading \inmodule QtSensors \since 5.1 \brief The QGyroscopeReading class represents one reading from the gyroscope sensor. \section1 QGyroscopeReading Units The reading contains 3 values, measured in degrees per second that define the movement of the device around the x, y and z axes. Unlike QRotationReading, the values represent the current angular velocity rather than a fixed rotation. The measurements are in degrees per second. \image sensors-coordinates3.jpg {Device with curved arrows showing angular velocity around the x, y, and z axes} 3778 -
qgyroscope.h 1182 -
qgyroscope_p.h 742 -
qhumiditysensor.cpp ! \class QHumidityReading \ingroup sensors_reading \inmodule QtSensors \since 5.9 \brief The QHumidityReading class holds readings from the humidity sensor. \section1 QHumidityReading Units The humidity sensor returns the relative humidity as a percentage, and absolute humidity in grams per cubic meter (g/m3). Note that some sensors may not support absolute humidity, 0 will be returned in this case. 3401 -
qhumiditysensor.h 1316 -
qhumiditysensor_p.h 870 -
qirproximitysensor.cpp ! \class QIRProximityReading \ingroup sensors_reading \inmodule QtSensors \since 5.1 \internal \brief The QIRProximityReading class holds readings from the IR proximity sensor. The IR (infra-red) proximity sensor detects proximity by beaming out infra-red light and detecting how much of the light returns. The biggest limitation of this technology is that there is no reliable way to turn the reflectance values into distances unless both the item being detected and the ambient conditions are known. \section2 QIRProximityReading Units The sensor reports reflectance as a decimal fraction in the range of 0 - 1. That is, 0 indicates nothing was detected within the range of the sensor and 1 indicates the infra-red signal returned at the full power level that it was sent at. With some IR sensors, it is quite uncommon to reach the top and the bottom of the value range, and some parts of the range ends might not be obtainable at all. This is due to the behavior of the sensor hardware. With these sensors, the absolute value of reflectance should never be used directly. Instead, applications should react to the relative change of the reading values. Use QProximitySensor if it is only necessary to check if something is close to the device or not. 4076 -
qirproximitysensor.h 1138 -
qirproximitysensor_p.h 725 -
qlidsensor.cpp ! \class QLidReading \ingroup sensors_reading \inmodule QtSensors \since 5.9 \internal \brief The QLidReading class holds readings from the Lid sensor. A normal laptop has what we call a front lid. If the laptop can be converted to a tablet by rotating or closing the lid where the display is out, this is known as a back lid. \section2 QLidReading Units The Lid sensor can detect if a device's lid is closed or not. A lid can be a laptop, a laptop that converts to a tablet, or even a cover for a tablet or phone. 3446 -
qlidsensor.h 1248 -
qlidsensor_p.h 741 -
qlightsensor.cpp ! \class QLightReading \ingroup sensors_reading \inmodule QtSensors \since 5.1 \brief The QLightReading class represents one reading from the light sensor. \section1 QLightReading Units The light sensor returns the intensity of the light in lux. 3508 -
qlightsensor.h 1303 -
qlightsensor_p.h 853 -
qmagnetometer.cpp ! \class QMagnetometerReading \ingroup sensors_reading \inmodule QtSensors \since 5.1 \brief The QMagnetometerReading class represents one reading from the magnetometer. \section1 QMagnetometerReading Units The magnetometer returns magnetic flux density values along 3 axes. The scale of the values is teslas. The axes are arranged as follows. \image sensors-coordinates2.jpg {Device with positive and negative x, y, and z axes extending in all six directions} The magnetometer can report on either raw magnetic flux values or geomagnetic flux values. By default it returns raw magnetic flux values. The QMagnetometer::returnGeoValues property must be set to return geomagnetic flux values. The primary difference between raw and geomagnetic values is that extra processing is done to eliminate local magnetic interference from the geomagnetic values so they represent only the effect of the Earth's magnetic field. This process is not perfect and the accuracy of each reading may change. The image below shows the difference between geomagnetic (on the left) and raw (on the right) readings for a phone that is being subjected to magnetic interference. \image sensors-geo-vs-raw-magnetism.jpg {Diagram comparing geomagnetic readings, with the phone axes aligned to the Magnetic North Pole, against raw readings skewed by a nearby magnet} The accuracy of each reading is measured as a number from 0 to 1. A value of 1 is the highest level that the device can support and 0 is the worst. \section1 Calibration If the device is reporting low accuracy, then calibration might be needed before acceptable measurements can be provided. Basic calibration can usually be done by either rotating your device in a figure of eight, or by rotating the device along each of its three axes. For more information, check your device's documentation on how to calibrate the magnetic sensor. 6596 -
qmagnetometer.h 1702 -
qmagnetometer_p.h 960 -
qorientationsensor.cpp ! \class QOrientationReading \ingroup sensors_reading \inmodule QtSensors \since 5.1 \brief The QOrientationReading class represents one reading from the orientation sensor. The orientation sensor reports the orientation of the device. As it operates below the UI level it does not report on or even know how the UI is rotated. Most importantly this means that this sensor cannot be used to detect if a device is in portrait or landscape mode. This sensor is useful to detect that a particular side of the device is pointing up. \section1 QOrientationReading Units The orientation sensor returns the orientation of the device using the pre-defined values found in the QOrientationReading::Orientation enum. 5078 -
qorientationsensor.h 1331 -
qorientationsensor_p.h 724 -
qpressuresensor.cpp ! \class QPressureReading \ingroup sensors_reading \inmodule QtSensors \since 5.1 \brief The QPressureReading class holds readings from the pressure sensor. \section1 QPressureReading Units The pressure sensor returns atmospheric pressure values in Pascals. 3526 -
qpressuresensor.h 1203 -
qpressuresensor_p.h 744 -
qproximitysensor.cpp ! \class QProximityReading \ingroup sensors_reading \inmodule QtSensors \since 5.1 \brief The QProximityReading class represents one reading from the proximity sensor. \target QProximityReading_Units The proximity sensor can only indicate if an object is close or not. The distance at which an object is considered close is device-specific. This distance may be available in the QSensor::outputRanges property. 3012 -
qproximitysensor.h 1081 -
qproximitysensor_p.h 709 -
qrotationsensor.cpp ! \class QRotationReading \ingroup sensors_reading \inmodule QtSensors \since 5.1 \brief The QRotationReading class represents one reading from the rotation sensor. \section1 QRotationReading Units The rotation reading contains 3 angles, measured in degrees that define the orientation of the device in three-dimensional space. These angles are similar to yaw, pitch and roll but are defined using only right hand rotation with axes as defined by the right hand cartesian coordinate system. \image sensors-rotation.jpg {Device rotated relative to the x, y, and z axes, with the rotated y2 and y1 axes and the rotation angle marked} The three angles are applied to the device in the following order. \list \li Right-handed rotation z (-180, 180]. Starting from the y-axis and incrementing in the counter-clockwise direction. \li Right-handed rotation x [-90, 90]. Starting from the new (once-rotated) y-axis and incrementing towards the z-axis. \li Right-handed rotation y (-180, 180]. Starting from the new (twice-rotated) z-axis and incrementing towards the x-axis. \endlist Here is a visualization showing the order in which angles are applied. \image sensors-rotation-anim.gif {Animation showing the device rotated around the z, x, and then y axes in sequence} The 0 point for the z angle is defined as a fixed, external entity and is device-specific. While magnetic North is typically used as this reference point it may not be. Do not attempt to compare values for the z angle between devices or even on the same device if it has moved a significant distance. If the device cannot detect a fixed, external entity the z angle will always be 0 and the QRotationSensor::hasZ property will be set to false. The 0 point for the x and y angles are defined as when the x and y axes of the device are oriented towards the horizon. Here is an example of how the x value will change with device movement. \image sensors-rotation2.jpg {Device shown in side profile tilting through x angles of 30, 15, 0, -15, and -30 degrees} Here is an example of how the y value will change with device movement. \image sensors-rotation3.jpg {Device shown end-on tilting through y angles of -30, -15, 0, 15, and 30 degrees} Note that when x is 90 or -90, values for z and y achieve rotation around the same axis (due to the order of operations). In this case the y rotation will be 0. 6476 -
qrotationsensor.h 1406 -
qrotationsensor_p.h 880 -
qsensor.cpp ! \typedef qrange \relates QSensor \since 5.1 This type is defined as a QPair. \code typedef QPair<int,int> qrange; \endcode \sa QPair, qrangelist, QSensor::availableDataRates 40132 -
qsensor.h 8285 -
qsensor_p.h 2135 -
qsensorbackend.cpp ! \class QSensorBackend \ingroup sensors_backend \inmodule QtSensors \since 5.1 \brief The QSensorBackend class is a sensor implementation. Sensors on a device will be represented by sub-classes of QSensorBackend. 8884 -
qsensorbackend.h 1628 -
qsensorbackend_p.h 815 -
qsensormanager.cpp 17979 -
qsensormanager.h 1203 -
qsensorplugin.cpp ! \class QSensorPluginInterface \ingroup sensors_backend \inmodule QtSensors \since 5.1 \brief The QSensorPluginInterface class is the pure virtual interface to sensor plugins. The QSensorPluginInterface class is implemented in sensor plugins to register sensor backends with QSensorManager. \sa {Creating a sensor plugin} 1816 -
qsensorplugin.h 844 -
qsensorsglobal.h 341 -
qt_cmdline.cmake 0 -
qtapsensor.cpp ! \class QTapReading \ingroup sensors_reading \inmodule QtSensors \since 5.1 \internal \brief The QTapReading class represents one reading from the tap sensor. \section2 QTapReading Units The tap sensor registers tap events along the 3 axes that originate from the phone. The axes are arranged as follows. \image sensors-coordinates2.jpg {Device with positive and negative x, y, and z tap axes extending in all six directions} By default it returns only double tap events. The QTapSensor::returnDoubleTapEvents property must be set to false to return individual tap events. 6924 -
qtapsensor.h 1959 -
qtapsensor_p.h 895 -
qtiltsensor.cpp ! \class QTiltReading \ingroup sensors_reading \inmodule QtSensors \since 5.1 \brief The QTiltReading class holds readings from the tilt sensor. The tilt sensor reports the angle of tilt in degrees of the device along the X and Y plane. 3279 -
qtiltsensor.h 1172 -
qtiltsensor_p.h 736 -
sensorlog_p.h 1006 -