Qt3DInput::QMouseDevice Class
class Qt3DInput::QMouseDevice마우스 이벤트를 연결된 ` MouseHandler ` 객체에 위임합니다. 더 보기...
| 헤더: | #include <qmousedevice.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dinput) target_link_libraries(mytarget PRIVATE Qt6::3dinput) |
| qmake: | QT += 3dinput |
| QML에서: | MouseDevice |
| 상속: | Qt3DInput::QAbstractPhysicalDevice |
| 상태: | 사용 중단됨 |
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
공개 유형
| enum | Axis { X, Y, WheelX, WheelY } |
속성
- sensitivity : float
- updateAxesContinuously : bool
공개 함수
| QMouseDevice(Qt3DCore::QNode *parent = nullptr) | |
| float | sensitivity() const |
| bool | updateAxesContinuously() const |
재구현된 공용 함수
| virtual int | axisCount() const override |
| virtual int | axisIdentifier(const QString &name) const override |
| virtual QStringList | axisNames() const override |
| virtual int | buttonCount() const override |
| virtual int | buttonIdentifier(const QString &name) const override |
| virtual QStringList | buttonNames() const override |
공개 슬롯
| void | setSensitivity(float value) |
| void | setUpdateAxesContinuously(bool updateAxesContinuously) |
신호
| void | sensitivityChanged(float value) |
| void | updateAxesContinuouslyChanged(bool updateAxesContinuously) |
상세 설명
QMouseDevice는 물리적 마우스 장치에서 발생하는 마우스 이벤트를 QMouseHandler 객체로 전달합니다. 마우스의 감도는 QMouseDevice::sensitivity 속성을 통해 제어할 수 있으며, 이 속성은 마우스의 물리적 움직임에 반응하여 논리적 마우스 좌표가 변경되는 속도를 지정합니다.
QMouseHandler도 참조하십시오 .
멤버 유형 설명서
enum QMouseDevice::Axis
마우스 축.
| 상수 | 값 |
|---|---|
Qt3DInput::QMouseDevice::X | 0 |
Qt3DInput::QMouseDevice::Y | 1 |
Qt3DInput::QMouseDevice::WheelX | 2 |
Qt3DInput::QMouseDevice::WheelY | 3 |
Qt3DInput::QAnalogAxisInput::setAxis도 참조하십시오 .
속성 설명서
sensitivity : float
마우스 장치의 감도를 저장합니다. 기본값은 0.1입니다.
액세스 함수:
| float | sensitivity() const |
| void | setSensitivity(float value) |
알림 신호:
| void | sensitivityChanged(float value) |
updateAxesContinuously : bool
true 인 경우, 마우스 버튼이 눌려 있는지 여부와 관계없이 축이 변경될 때마다 축이 업데이트됩니다. 그렇지 않은 경우, 마우스 버튼 중 하나가 눌려 있을 때만 축이 업데이트됩니다.
기본값은 ` false`입니다.
액세스 함수:
| bool | updateAxesContinuously() const |
| void | setUpdateAxesContinuously(bool updateAxesContinuously) |
Notifier 신호:
| void | updateAxesContinuouslyChanged(bool updateAxesContinuously) |
멤버 함수 문서
[explicit] QMouseDevice::QMouseDevice(Qt3DCore::QNode *parent = nullptr)
parent 를 상위 장치로 하는 새로운 QMouseDevice 인스턴스를 생성합니다.
[override virtual] int QMouseDevice::axisCount() const
QAbstractPhysicalDevice::axisCount() const를 재구현합니다.
축의 개수를 반환합니다.
참고: 현재는 항상 4를 반환합니다.
[override virtual] int QMouseDevice::axisIdentifier(const QString &name) const
QAbstractPhysicalDevice::axisIdentifier(const QString &name) const를 재구현합니다.
name 축을 축 식별자로 변환합니다.
[override virtual] QStringList QMouseDevice::axisNames() const
QAbstractPhysicalDevice::axisNames() const를 재구현합니다.
축의 이름을 반환합니다.
참고: 현재는 항상 StringList["X", "Y"]를 반환합니다.
[override virtual] int QMouseDevice::buttonCount() const
QAbstractPhysicalDevice::buttonCount() const를 재구현합니다.
버튼 개수를 반환합니다.
참고: 현재는 항상 3을 반환합니다.
[override virtual] int QMouseDevice::buttonIdentifier(const QString &name) const
QAbstractPhysicalDevice::buttonIdentifier(const QString &name) const를 재구현합니다.
지정된 name 에 해당하는 버튼 식별자를 반환합니다. 가능한 반환 값은 QMouseEvent::Buttons 에 설명되어 있습니다.
[override virtual] QStringList QMouseDevice::buttonNames() const
QAbstractPhysicalDevice::buttonNames() const를 재구현합니다.
버튼의 이름을 반환합니다.
참고: 현재는 항상 StringList["Left", "Right", "Center"]를 반환합니다.
© 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.