QAmbientLightReading Class
QAmbientLightReading 类表示环境光传感器的一次读数。更多内容...
| 头文件: | #include <QAmbientLightReading> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Sensors) target_link_libraries(mytarget PRIVATE Qt6::Sensors) |
| qmake: | QT += sensors |
| 继承自: | QSensorReading |
公共类型
| enum | LightLevel { Undefined, Dark, Twilight, Light, Bright, Sunny } |
属性
- lightLevel : LightLevel
公共函数
| QAmbientLightReading::LightLevel | lightLevel() const |
| void | setLightLevel(QAmbientLightReading::LightLevel lightLevel) |
成员类型文档
enum QAmbientLightReading::LightLevel
此枚举表示环境光照强度。
| 常量 | 值 | 描述 |
|---|---|---|
QAmbientLightReading::Undefined | 0 | 光照水平未知。 |
QAmbientLightReading::Dark | 1 | 环境很暗。 |
QAmbientLightReading::Twilight | 2 | 光线较暗。 |
QAmbientLightReading::Light | 3 | 光线较暗(例如:室内灯光)。 |
QAmbientLightReading::Bright | 4 | 光线很亮(例如:阴凉处)。 |
QAmbientLightReading::Sunny | 5 | 非常明亮(例如:直射阳光)。 |
物业文件
[read-only] lightLevel : LightLevel
该属性存储环境光强度。
该值代表环境光强度,数据源自QAmbientLightReading::LightLevel 。
访问函数:
| QAmbientLightReading::LightLevel | lightLevel() const |
另请参阅 QAmbientLightReading Units 。
成员函数文档
void QAmbientLightReading::setLightLevel(QAmbientLightReading::LightLevel lightLevel)
将环境光强度设置为lightLevel 。
另请参阅 lightLevel()。
© 2026 The Qt Company Ltd. 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. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.