Q3DInputHandler Class
기본 휠 마우스 기반 입력 핸들러. 더 보기...
| 헤더: | #include <Q3DInputHandler> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS DataVisualization) target_link_libraries(mytarget PRIVATE Qt6::DataVisualization) |
| qmake: | QT += datavisualization |
| 출시일: | QtDataVisualization 1.0 |
| QML에서: | InputHandler3D |
| 상속: | QAbstract3DInputHandler |
| 상속받는 클래스: | |
| 상태: | 사용 중단 |
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
속성
(since QtDataVisualization 1.2)rotationEnabled : bool(since QtDataVisualization 1.2)selectionEnabled : bool(since QtDataVisualization 1.2)zoomAtTargetEnabled : bool(since QtDataVisualization 1.2)zoomEnabled : bool
공개 함수
| Q3DInputHandler(QObject *parent = nullptr) | |
| virtual | ~Q3DInputHandler() |
| bool | isRotationEnabled() const |
| bool | isSelectionEnabled() const |
| bool | isZoomAtTargetEnabled() const |
| bool | isZoomEnabled() const |
| void | setRotationEnabled(bool enable) |
| void | setSelectionEnabled(bool enable) |
| void | setZoomAtTargetEnabled(bool enable) |
| void | setZoomEnabled(bool enable) |
재구현된 공용 함수
| virtual void | mouseMoveEvent(QMouseEvent *event, const QPoint &mousePos) override |
| virtual void | mousePressEvent(QMouseEvent *event, const QPoint &mousePos) override |
| virtual void | mouseReleaseEvent(QMouseEvent *event, const QPoint &mousePos) override |
| virtual void | wheelEvent(QWheelEvent *event) override |
신호
| void | rotationEnabledChanged(bool enable) |
| void | selectionEnabledChanged(bool enable) |
| void | zoomAtTargetEnabledChanged(bool enable) |
| void | zoomEnabledChanged(bool enable) |
상세 설명
Q3DInputHandler는 휠 마우스 유형의 입력 장치에 대한 기본 입력 핸들러입니다.
기본 입력 핸들러는 다음과 같은 기능을 제공합니다:
| 마우스 동작 | 동작 |
|---|---|
| 오른쪽 버튼을 누른 상태에서 드래그 | Q3DCamera 에 설정된 한계 범위 내에서 그래프를 회전합니다. |
| 왼쪽 클릭 | 커서 아래의 항목을 선택하거나, 선택된 항목이 없는 경우 선택을 해제합니다. ' selection mode'에 따라 보조 뷰가 열릴 수 있습니다. |
| 마우스 휠 | Q3DCamera 에 설정된 허용 확대/축소 범위 내에서 확대/축소합니다. |
| 보조 뷰가 표시되어 있을 때 기본 뷰에서 마우스 왼쪽 버튼을 클릭합니다. | 보조 뷰를 닫습니다. 참고: 보조 뷰는 Q3DBars 및 Q3DSurface 그래프에서만 사용할 수 있습니다. |
이 클래스의 해당 속성을 사용하여 회전, 확대/축소 및 선택을 각각 개별적으로 비활성화할 수 있습니다.
속성 문서
[since QtDataVisualization 1.2] rotationEnabled : bool
이 속성은 해당 입력 핸들러가 그래프 회전을 허용하는지 여부를 나타냅니다.
기본값은 ' true'입니다.
이 열거형은 QtDataVisualization 1.2에서 도입되었습니다.
액세스 함수:
| bool | isRotationEnabled() const |
| void | setRotationEnabled(bool enable) |
알림 신호:
| void | rotationEnabledChanged(bool enable) |
[since QtDataVisualization 1.2] selectionEnabled : bool
이 속성은 해당 입력 핸들러가 그래프에서 항목을 선택할 수 있도록 허용하는지 여부를 나타냅니다.
기본값은 ` true`입니다.
이 열거형은 QtDataVisualization 1.2에서 도입되었습니다.
액세스 함수:
| bool | isSelectionEnabled() const |
| void | setSelectionEnabled(bool enable) |
알림 신호:
| void | selectionEnabledChanged(bool enable) |
[since QtDataVisualization 1.2] zoomAtTargetEnabled : bool
이 속성은 확대/축소 후 그래프의 확대된 지점이 동일한 위치에 유지되도록 카메라 대상을 변경해야 하는지 여부를 지정합니다.
기본값은 ` true`입니다.
이 열거형은 QtDataVisualization 1.2에서 도입되었습니다.
액세스 함수:
| bool | isZoomAtTargetEnabled() const |
| void | setZoomAtTargetEnabled(bool enable) |
Notifier 신호:
| void | zoomAtTargetEnabledChanged(bool enable) |
[since QtDataVisualization 1.2] zoomEnabled : bool
이 속성은 해당 입력 핸들러가 그래프 확대/축소를 허용하는지 여부를 나타냅니다.
기본값은 ` true`입니다.
이 열거형은 QtDataVisualization 1.2에서 도입되었습니다.
액세스 함수:
| bool | isZoomEnabled() const |
| void | setZoomEnabled(bool enable) |
알림 신호:
| void | zoomEnabledChanged(bool enable) |
멤버 함수 문서
[explicit] Q3DInputHandler::Q3DInputHandler(QObject *parent = nullptr)
기본 마우스 입력 핸들러를 생성합니다. 선택 사항인 ` parent ` 매개변수를 지정할 수 있으며, 이 경우 해당 매개변수는 ` QObject ` 생성자에 전달됩니다.
[virtual noexcept] Q3DInputHandler::~Q3DInputHandler()
입력 핸들러를 제거합니다.
[override virtual] void Q3DInputHandler::mouseMoveEvent(QMouseEvent *event, const QPoint &mousePos)
재구현: QAbstract3DInputHandler::mouseMoveEvent(QMouseEvent *event, const QPoint &mousePos).
마우스 이동 이벤트 처리를 변경하려면 이 함수를 재정의하십시오. 마우스 이동 이벤트는 ` event `에, 마우스 위치는 ` mousePos`에 전달됩니다.
[override virtual] void Q3DInputHandler::mousePressEvent(QMouseEvent *event, const QPoint &mousePos)
QAbstract3DInputHandler::mousePressEvent(QMouseEvent *event, const QPoint &mousePos)를 재구현합니다.
마우스 클릭 이벤트 처리를 변경하려면 이 함수를 오버라이드하십시오. 마우스 클릭 이벤트는 ` event `에, 마우스 위치는 ` mousePos`에 전달됩니다.
[override virtual] void Q3DInputHandler::mouseReleaseEvent(QMouseEvent *event, const QPoint &mousePos)
QAbstract3DInputHandler::mouseReleaseEvent(QMouseEvent *event, const QPoint &mousePos)를 재구현합니다.
마우스 릴리스 이벤트 처리를 변경하려면 이 메서드를 재정의하십시오. 마우스 릴리스 이벤트는 ` event `에, 마우스 위치는 ` mousePos`에 전달됩니다.
[override virtual] void Q3DInputHandler::wheelEvent(QWheelEvent *event)
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.