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 : const 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 : const LightLevel
该属性包含环境光照度。
该值代表环境光线,来自QAmbientLightReading::LightLevel 。
访问功能:
QAmbientLightReading::LightLevel | lightLevel() const |
另请参见 QAmbientLightReading Units 。
成员函数文档
void QAmbientLightReading::setLightLevel(QAmbientLightReading::LightLevel lightLevel)
将环境光照度设置为lightLevel 。
另请参阅 lightLevel() 。
© 2025 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.