Qt3DInput::QAbstractPhysicalDevice Class
class Qt3DInput::QAbstractPhysicalDeviceQAbstractPhysicalDevice 是 Qt3d 用于与任意输入设备交互的基类。更多内容...
| 头文件: | #include <qabstractphysicaldevice.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dinput) target_link_libraries(mytarget PRIVATE Qt6::3dinput) |
| qmake: | QT += 3dinput |
| 在 QML 中: | AbstractPhysicalDevice |
| 继承自: | Qt3DCore::QNode |
| 被继承自: | |
| 状态: | 已弃用 |
该类已弃用。我们强烈建议不要在新代码中使用它。
公共函数
| QAbstractPhysicalDevice(Qt3DCore::QNode *parent = nullptr) | |
| void | addAxisSetting(Qt3DInput::QAxisSetting *axisSetting) |
| virtual int | axisCount() const |
| virtual int | axisIdentifier(const QString &name) const |
| virtual QStringList | axisNames() const |
| QList<Qt3DInput::QAxisSetting *> | axisSettings() const |
| virtual int | buttonCount() const |
| virtual int | buttonIdentifier(const QString &name) const |
| virtual QStringList | buttonNames() const |
| void | removeAxisSetting(Qt3DInput::QAxisSetting *axisSetting) |
成员函数文档
[explicit] QAbstractPhysicalDevice::QAbstractPhysicalDevice(Qt3DCore::QNode *parent = nullptr)
使用parent 创建一个新的QAbstractPhysicalDevice实例。
void QAbstractPhysicalDevice::addAxisSetting(Qt3DInput::QAxisSetting *axisSetting)
将轴设置axisSetting 添加到该设备中。
[virtual] int QAbstractPhysicalDevice::axisCount() const
返回该设备拥有的轴数。
[virtual] int QAbstractPhysicalDevice::axisIdentifier(const QString &name) const
返回轴name 的整数标识符;如果该轴在该设备上不存在,则返回-1。
[virtual] QStringList QAbstractPhysicalDevice::axisNames() const
返回一个包含设备轴名称的列表。
QList<Qt3DInput::QAxisSetting *> QAbstractPhysicalDevice::axisSettings() const
返回与该设备关联的轴设置。
[virtual] int QAbstractPhysicalDevice::buttonCount() const
返回该设备拥有的按钮数量。
[virtual] int QAbstractPhysicalDevice::buttonIdentifier(const QString &name) const
返回按钮name 的整数标识符;如果该按钮在该设备上不存在,则返回-1。
[virtual] QStringList QAbstractPhysicalDevice::buttonNames() const
返回一个包含设备按钮名称的列表。
void QAbstractPhysicalDevice::removeAxisSetting(Qt3DInput::QAxisSetting *axisSetting)
从该设备中删除轴设置axisSetting 。
© 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.