Qt3DInput::QInputDeviceIntegration Class

class Qt3DInput::QInputDeviceIntegration

用于定义游戏控制器等新输入法的抽象基类。更多

头文件: #include <QInputDeviceIntegration>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3dinput)
target_link_libraries(mytarget PRIVATE Qt6::3dinput)
qmake: QT += 3dinput
继承: QObject
状态:已废弃

公共函数

virtual Qt3DInput::QAbstractPhysicalDevice *createPhysicalDevice(const QString &name) = 0
void initialize(Qt3DInput::QInputAspect *aspect)
virtual QAbstractPhysicalDeviceBackendNode *physicalDevice(Qt3DCore::QNodeId id) const = 0
virtual QList<Qt3DCore::QNodeId> physicalDevices() const = 0

保护函数

QInputDeviceIntegration(QObject *parent = nullptr)
Qt3DInput::QInputAspect *inputAspect() const
void registerBackendType(const QMetaObject &metaObject, const Qt3DCore::QBackendNodeMapperPtr &functor)

详细说明

成员函数文档

[explicit protected] QInputDeviceIntegration::QInputDeviceIntegration(QObject *parent = nullptr)

创建一个新的 QInputDeviceIntegration,parent

[pure virtual] Qt3DInput::QAbstractPhysicalDevice *QInputDeviceIntegration::createPhysicalDevice(const QString &name)

创建由name 标识的物理设备。

如果无法识别,则返回 nullptr

void QInputDeviceIntegration::initialize(Qt3DInput::QInputAspect *aspect)

通过aspect 创建集成后,由 InputAspect 对象调用。

[protected] Qt3DInput::QInputAspect *QInputDeviceIntegration::inputAspect() const

QInputDeviceIntegration::inputAspect 返回与 InputDeviceIntegration 关联的 Input Aspect

[pure virtual] QAbstractPhysicalDeviceBackendNode *QInputDeviceIntegration::physicalDevice(Qt3DCore::QNodeId id) const

如果给定的id 与此QInputDeviceIntegration 相关,则返回该QAbstractPhysicalDevice

[pure virtual] QList<Qt3DCore::QNodeId> QInputDeviceIntegration::physicalDevices() const

返回与此QInputDeviceIntegration 关联的物理设备的节点 ID 列表。

[protected] void QInputDeviceIntegration::registerBackendType(const QMetaObject &metaObject, const Qt3DCore::QBackendNodeMapperPtr &functor)

通过metaObjectfunctor 为该前端实现注册相应的后端类。

© 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.