QMagnetometer Class
QMagnetometer 클래스는 QSensor 을 편리하게 감싸는 래퍼입니다. 더 보기...
헤더: | #include <QMagnetometer> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Sensors) target_link_libraries(mytarget PRIVATE Qt6::Sensors) |
qmake: | QT += sensors |
상속합니다: | QSensor |
속성
- returnGeoValues : bool
공공 기능
QMagnetometer(QObject *parent = nullptr) | |
virtual | ~QMagnetometer() |
QMagnetometerReading * | reading() const |
bool | returnGeoValues() const |
void | setReturnGeoValues(bool returnGeoValues) |
신호
void | returnGeoValuesChanged(bool returnGeoValues) |
상세 설명
유일한 동작상의 차이점은 이 클래스가 유형을 올바르게 설정한다는 것입니다.
이 클래스에는 QSensorReading 대신 QMagnetometerReading 을 반환하는 reading() 함수도 있습니다.
센서 작동 방식에 대한 자세한 내용은 QMagnetometerReading 을 참조하세요.
QMagnetometerReading 를참조하세요 .
속성 문서
returnGeoValues : bool
이 프로퍼티에는 지자기 값을 반환할지 여부를 나타내는 값이 들어 있습니다.
지자기 자속 밀도를 반환하려면 true로 설정합니다. 원시 자속 밀도를 반환하려면 false(기본값)로 설정합니다.
start()를 호출하기 전에 이 속성을 설정해야 합니다.
함수에 액세스합니다:
bool | returnGeoValues() const |
void | setReturnGeoValues(bool returnGeoValues) |
알림 신호:
void | returnGeoValuesChanged(bool returnGeoValues) |
멤버 함수 문서
[explicit]
QMagnetometer::QMagnetometer(QObject *parent = nullptr)
parent 의 자식으로 센서를 구성합니다.
[virtual noexcept]
QMagnetometer::~QMagnetometer()
센서를 파괴합니다. 센서가 아직 중지되지 않은 경우 센서를 중지합니다.
QMagnetometerReading *QMagnetometer::reading() const
이 센서의 판독 클래스를 반환합니다.
QSensor::reading()도 참조하세요 .
© 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.