このページでは

QAmbientLightReading Class

QAmbientLightReading クラスは、環境光センサーからの 1 回の読み取り結果を表します。詳細...

ヘッダー: #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 }

プロパティ

公開関数

QAmbientLightReading::LightLevel lightLevel() const
void setLightLevel(QAmbientLightReading::LightLevel lightLevel)

詳細な説明

QAmbientLightReading 単位

環境光センサーは、QAmbientLightReading::LightLevel 列挙型に含まれる事前定義された値を使用して、環境光の強度を返します。

メンバ型のドキュメント

enum QAmbientLightReading::LightLevel

この列挙型は、周囲の照度を表します。

定数値説明
QAmbientLightReading::Undefined0照度レベルが不明です。
QAmbientLightReading::Dark1照度が不明です。暗いです。
QAmbientLightReading::Twilight2やや暗い。
QAmbientLightReading::Light3明るい(例:室内照明など)。
QAmbientLightReading::Bright4明るい(例:日陰)。
QAmbientLightReading::Sunny5非常に明るい(例:直射日光)。

物件の資料

[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.