QOrientationReading Class
QOrientationReading 클래스는 방향 센서의 판독값 하나를 나타냅니다. 더 보기...
Header: | #include <QOrientationReading> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Sensors) target_link_libraries(mytarget PRIVATE Qt6::Sensors) |
qmake: | QT += sensors |
상속합니다: | QSensorReading |
공용 유형
enum | Orientation { Undefined, TopUp, TopDown, LeftUp, RightUp, …, FaceDown } |
속성
- orientation : const Orientation
공공 기능
QOrientationReading::Orientation | orientation() const |
void | setOrientation(QOrientationReading::Orientation orientation) |
상세 설명
방향 센서는 기기의 방향을 보고합니다. UI 수준 아래에서 작동하기 때문에 UI가 어떻게 회전되는지 보고하거나 알 수 없습니다. 가장 중요한 것은 이 센서는 디바이스가 세로 모드인지 가로 모드인지 감지하는 데 사용할 수 없다는 것입니다.
이 센서는 기기의 특정 면이 위를 향하고 있음을 감지하는 데 유용합니다.
Q방향 판독 단위
방향 센서는 QOrientationReading::Orientation 열거형에 있는 사전 정의된 값을 사용하여 디바이스의 방향을 반환합니다.
멤버 유형 문서
enum QOrientationReading::Orientation
이 열거형은 디바이스의 방향을 나타냅니다.
각 값의 의미를 설명하려면 다음 다이어그램을 참조하는 것이 도움이 됩니다.
여기에는 방향이 순서대로 표시되어 있습니다: 위쪽, 아래쪽, 왼쪽, 오른쪽, 위쪽, 아래쪽, 아래쪽.
상수 | 값 | 설명 |
---|---|---|
QOrientationReading::Undefined | 0 | 방향을 알 수 없습니다. |
QOrientationReading::TopUp | 1 | 디바이스의 상단 가장자리가 위쪽을 향하고 있습니다. |
QOrientationReading::TopDown | 2 | 장치의 상단 가장자리가 아래를 가리키고 있습니다. |
QOrientationReading::LeftUp | 3 | 장치의 왼쪽 가장자리가 위를 향하고 있습니다. |
QOrientationReading::RightUp | 4 | 장치의 오른쪽 가장자리가 위를 향하고 있습니다. |
QOrientationReading::FaceUp | 5 | 장치의 앞면이 위를 향하고 있습니다. |
QOrientationReading::FaceDown | 6 | 장치의 앞면이 아래를 향하고 있습니다. |
방향 센서는 UI가 아닌 장치의 방향을 보고한다는 점에 유의해야 합니다. UI가 회전한다고 해서 기기의 방향이 바뀌지 않습니다. 즉, 이 센서는 디바이스가 세로 모드인지 가로 모드인지 감지하는 데 사용할 수 없습니다.
속성 문서
[read-only]
orientation : const Orientation
이 속성은 디바이스의 방향을 보유합니다.
단위는 장치의 방향을 설명하는 열거형입니다.
함수에 액세스합니다:
QOrientationReading::Orientation | orientation() const |
QOrientationReading Units 를참조하세요 .
멤버 함수 문서
void QOrientationReading::setOrientation(QOrientationReading::Orientation orientation)
orientation 를 읽도록 설정합니다.
orientation()도 참조하세요 .
© 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.