QAbstract3DInputHandler Class
입력 핸들러 구현을 위한 기본 클래스입니다. 더 보기...
| 헤더: | #include <QAbstract3DInputHandler> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS DataVisualization) target_link_libraries(mytarget PRIVATE Qt6::DataVisualization) |
| qmake: | QT += datavisualization |
| 출시일: | QtDataVisualization 1.0 |
| QML에서: | AbstractInputHandler3D |
| 상속: | QObject |
| 상속받는 클래스: | |
| 상태: | 사용 중단 |
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
공개 유형
| enum | InputView { InputViewNone, InputViewOnPrimary, InputViewOnSecondary } |
속성
- inputPosition : QPoint
- inputView : InputView
- scene : Q3DScene*
공개 함수
| virtual | ~QAbstract3DInputHandler() |
| QPoint | inputPosition() const |
| QAbstract3DInputHandler::InputView | inputView() const |
| virtual void | mouseDoubleClickEvent(QMouseEvent *event) |
| virtual void | mouseMoveEvent(QMouseEvent *event, const QPoint &mousePos) |
| virtual void | mousePressEvent(QMouseEvent *event, const QPoint &mousePos) |
| virtual void | mouseReleaseEvent(QMouseEvent *event, const QPoint &mousePos) |
| Q3DScene * | scene() const |
| void | setInputPosition(const QPoint &position) |
| void | setInputView(QAbstract3DInputHandler::InputView inputView) |
| void | setScene(Q3DScene *scene) |
| virtual void | touchEvent(QTouchEvent *event) |
| virtual void | wheelEvent(QWheelEvent *event) |
신호
| void | inputViewChanged(QAbstract3DInputHandler::InputView view) |
| void | positionChanged(const QPoint &position) |
| void | sceneChanged(Q3DScene *scene) |
보호된 함수
| QAbstract3DInputHandler(QObject *parent = nullptr) | |
| int | prevDistance() const |
| QPoint | previousInputPos() const |
| void | setPrevDistance(int distance) |
| void | setPreviousInputPos(const QPoint &position) |
상세 설명
QAbstract3DInputHandler는 입력 이벤트를 받아 이를 카메라 및 조명 움직임으로 변환하는 다양한 입력 처리 구현체들이 상속받는 기본 클래스입니다. 또한 입력 핸들러는 원시 입력 이벤트를 씬 내의 슬라이싱 및 선택 이벤트로 변환합니다.
멤버 유형 문서
enum QAbstract3DInputHandler::InputView
마우스 및 터치 기반 입력 핸들러를 위한 사전 정의된 입력 뷰.
| 상수 | 값 | 설명 |
|---|---|---|
QAbstract3DInputHandler::InputViewNone | 0 | 뷰에 마우스나 터치가 위치하지 않은 상태입니다. |
QAbstract3DInputHandler::InputViewOnPrimary | 1 | 마우스 또는 터치 입력이 주 뷰 영역에서 수신되었습니다. inputView 가 InputViewOnPrimary가 되었을 때 보조 뷰가 표시되어 있는 경우, 보조 뷰가 닫힙니다. |
QAbstract3DInputHandler::InputViewOnSecondary | 2 | 보조 뷰 영역에서 마우스 또는 터치 입력이 수신되었습니다. |
속성 설명
inputPosition : QPoint
이 속성은 처리된 입력 이벤트를 기준으로 마지막 입력 위치를 저장합니다.
액세스 함수:
| QPoint | inputPosition() const |
| void | setInputPosition(const QPoint &position) |
알림 신호:
| void | positionChanged(const QPoint &position) |
inputView : InputView
이 속성은 처리된 입력 이벤트를 기반으로 현재 열거된 입력 뷰를 저장합니다.
InputView 열거형 값 중 하나입니다.
뷰가 변경되면 inputViewChanged 신호가 발생합니다.
액세스 함수:
| QAbstract3DInputHandler::InputView | inputView() const |
| void | setInputView(QAbstract3DInputHandler::InputView inputView) |
알림 신호:
| void | inputViewChanged(QAbstract3DInputHandler::InputView view) |
InputView도 참조하십시오 .
scene : Q3DScene*
이 속성은 이 추상 입력 핸들러가 제어하는 3D 씬을 보관합니다.
하나의 입력 핸들러는 하나의 씬만 제어할 수 있습니다. 입력 핸들러에 씬을 할당한다고 해서 씬의 소유권이 이전되는 것은 아닙니다.
액세스 함수:
| Q3DScene * | scene() const |
| void | setScene(Q3DScene *scene) |
알림 신호:
| void | sceneChanged(Q3DScene *scene) |
멤버 함수 문서
[explicit protected] QAbstract3DInputHandler::QAbstract3DInputHandler(QObject *parent = nullptr)
기본 클래스를 생성합니다. 선택 사항인 ` parent ` 매개변수를 지정할 수 있으며, 이 경우 해당 매개변수는 ` QObject ` 생성자로 전달됩니다.
[virtual noexcept] QAbstract3DInputHandler::~QAbstract3DInputHandler()
기초 클래스를 삭제합니다.
[virtual] void QAbstract3DInputHandler::mouseDoubleClickEvent(QMouseEvent *event)
마우스 더블 클릭 이벤트를 처리하려면 이 메서드를 재정의하십시오. 마우스 더블 클릭 이벤트는 ` event`에서 발생합니다.
[virtual] void QAbstract3DInputHandler::mouseMoveEvent(QMouseEvent *event, const QPoint &mousePos)
마우스 이동 이벤트를 처리하려면 이 메서드를 재정의하십시오. 마우스 이동 이벤트는 ` event `에 전달되며, 마우스 위치는 ` mousePos`에 전달됩니다.
[virtual] void QAbstract3DInputHandler::mousePressEvent(QMouseEvent *event, const QPoint &mousePos)
마우스 클릭 이벤트를 처리하려면 이 메서드를 재정의하십시오. 마우스 클릭 이벤트는 ` event `에, 마우스 위치는 ` mousePos`에 전달됩니다.
[virtual] void QAbstract3DInputHandler::mouseReleaseEvent(QMouseEvent *event, const QPoint &mousePos)
마우스 해제 이벤트를 처리하려면 이 메서드를 재정의하십시오. 마우스 해제 이벤트는 ` event `에 전달되며, 마우스 위치는 ` mousePos`에 전달됩니다.
[protected] int QAbstract3DInputHandler::prevDistance() const
입력된 두 위치 간의 맨해튼 거리를 반환합니다.
setPrevDistance()도 참조하십시오 .
[protected] QPoint QAbstract3DInputHandler::previousInputPos() const
이전 입력 위치를 반환합니다.
setPreviousInputPos()도 참조하십시오 .
[protected] void QAbstract3DInputHandler::setPrevDistance(int distance)
마지막 두 입력 위치 사이의 distance (맨해튼 거리)를 설정합니다.
prevDistance()도 참조하십시오 .
[protected] void QAbstract3DInputHandler::setPreviousInputPos(const QPoint &position)
이전 입력 위치를 position 에서 지정한 지점으로 설정합니다.
previousInputPos()도 참조하십시오 .
[virtual] void QAbstract3DInputHandler::touchEvent(QTouchEvent *event)
터치 입력 이벤트를 처리하려면 이 메서드를 재정의하십시오. 터치 이벤트는 ` event`에 전달됩니다.
[virtual] void QAbstract3DInputHandler::wheelEvent(QWheelEvent *event)
휠 이벤트를 처리하려면 이 메서드를 재정의하십시오. 휠 이벤트는 ` event`에 전달됩니다.
© 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.