Q3DInputHandler Class
기본 휠 마우스 기반 입력 핸들러입니다. 더 보기...
Header: | #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) |
알림 신호:
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.
© 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.