QMouseDevice Class
class Qt3DInput::QMouseDevice첨부된 MouseHandler 개체에 마우스 이벤트를 위임합니다. 더 보기...
Header: | #include <QMouseDevice> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dinput) target_link_libraries(mytarget PRIVATE Qt6::3dinput) |
qmake: | QT += 3dinput |
QML에서: | MouseDevice |
상속합니다: | Qt3DInput::QAbstractPhysicalDevice |
상태: | Deprecated |
공용 유형
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) |
알림 신호:
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"]를 반환합니다.
© 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.