QLightSensor Class

QLightSensor クラスは、QSensor の便利なラッパーです。詳細...

ヘッダー #include <QLightSensor>
CMake: find_package(Qt6 REQUIRED COMPONENTS Sensors)
target_link_libraries(mytarget PRIVATE Qt6::Sensors)
qmake: QT += sensors
継承: QSensor

プロパティ

パブリック機能

QLightSensor(QObject *parent = nullptr)
virtual ~QLightSensor()
qreal fieldOfView() const
QLightReading *reading() const
void setFieldOfView(qreal fieldOfView)

シグナル

void fieldOfViewChanged(qreal fieldOfView)

詳細説明

唯一の動作上の違いは、このクラスが型を適切に設定することである。

また、このクラスはQSensorReading の代わりにQLightReading を返すreading() 関数を備えている。

センサーの動作の詳細については、QLightReading を参照してください。

QLightReadingも参照して ください。

プロパティのドキュメント

[read-only] fieldOfView : const qreal

このプロパティは、視野を示す値を保持する。

これはセンサーの視野を表す角度である。

すべての光センサーが視野の取得をサポートしているわけではありません。このプロパティをサポートしていないセンサーでは、値は 0 になります。視野がサポートされているかどうかは、QSensor::isFeatureSupported() とQSensor::FieldOfView フラグで確認できます。

アクセス関数

qreal fieldOfView() const

通知シグナル:

void fieldOfViewChanged(qreal fieldOfView)

メンバー関数ドキュメント

[explicit] QLightSensor::QLightSensor(QObject *parent = nullptr)

parent の子としてセンサーを構築する。

[virtual noexcept] QLightSensor::~QLightSensor()

センサーを破壊する。センサーがまだ停止していなければ停止する。

QLightReading *QLightSensor::reading() const

このセンサーの読み取りクラスを返します。

QSensor::reading()も参照

void QLightSensor::setFieldOfView(qreal fieldOfView)

視野をfieldOfView に設定する。 これはバックエンドから呼び出される。

fieldOfView()も参照

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