QRotationSensor Class
The QRotationSensor class is a convenience wrapper around QSensor. 更多...
头文件: | #include <QRotationSensor> |
qmake: | QT += sensors |
开始支持版本: | Qt 5.1 |
基类: | QSensor |
属性
- hasZ : const bool
公有函数
QRotationSensor(QObject *parent = Q_NULLPTR) | |
virtual | ~QRotationSensor() |
bool | hasZ() const |
QRotationReading * | reading() const |
void | setHasZ(bool hasZ) |
信号
void | hasZChanged(bool hasZ) |
其他继承的成员
- 2 个公有槽函数继承自 QSensor
- 1 个公有槽函数继承自 QObject
- 1 个公有变量继承自 QObject
- 3 个静态公有成员继承自 QSensor
- 10 个静态公有成员继承自 QObject
- 9 个受保护的函数继承自 QObject
- 2 个受保护的变量继承自 QObject
详细描述
The QRotationSensor class is a convenience wrapper around QSensor.
The only behavioural difference is that this class sets the type properly.
This class also features a reading() function that returns a QRotationReading instead of a QSensorReading.
For details about how the sensor works, see QRotationReading.
参见 QRotationReading.
属性
hasZ : const bool
This property holds a value indicating if the z angle is available.
Returns true if z is available. Returns false if z is not available.
访问函数:
bool | hasZ() const |
Notifier signal:
void | hasZChanged(bool hasZ) |
成员函数
QRotationSensor::QRotationSensor(QObject *parent = Q_NULLPTR)
Construct the sensor as a child of parent.
[virtual]
QRotationSensor::~QRotationSensor()
Destroy the sensor. Stops the sensor if it has not already been stopped.
QRotationReading *QRotationSensor::reading() const
Returns the reading class for this sensor.
参见 QSensor::reading().
void QRotationSensor::setHasZ(bool hasZ)
Sets whether the z angle is available to hasZ. This is to be called from the backend. By default the hasZ property is true, so a backend only has to call this if its rotation sensor can not report z angles.
This function was introduced in Qt 5.1.
参见 hasZ().