Qt3DCore::QAspectJob Class
class Qt3DCore::QAspectJob在方面中执行的任务的基类。更多...
| 头文件: | #include <Qt3DCore/QAspectJob> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3DCore) target_link_libraries(mytarget PRIVATE Qt6::3DCore) |
| qmake: | QT += 3dcore |
| 状态: | 已弃用 |
该类已弃用。我们强烈建议不要在新代码中使用它。
公共函数
| void | addDependency(QWeakPointer<Qt3DCore::QAspectJob> dependency) |
| const std::vector<QWeakPointer<Qt3DCore::QAspectJob>> & | dependencies() const |
| virtual bool | isRequired() |
| virtual void | postFrame(Qt3DCore::QAspectEngine *aspectEngine) |
| void | removeDependency(QWeakPointer<Qt3DCore::QAspectJob> dependency) |
| virtual void | run() = 0 |
成员函数文档
void QAspectJob::addDependency(QWeakPointer<Qt3DCore::QAspectJob> dependency)
将dependency 添加到方面任务中。
const std::vector<QWeakPointer<Qt3DCore::QAspectJob>> &QAspectJob::dependencies() const
返回切面任务的依赖关系。
[virtual] bool QAspectJob::isRequired()
如果任务确实有工作要做,则应返回 true(默认值)。如果返回 false,则该任务将不会被排入计划(但其依赖项仍会被排入计划)。
[virtual] void QAspectJob::postFrame(Qt3DCore::QAspectEngine *aspectEngine)
当所有任务都完成后,在主线程中调用此方法。此时是将更改推送回前端的合适时机。aspectEngine 是负责运行循环的引擎。
void QAspectJob::removeDependency(QWeakPointer<Qt3DCore::QAspectJob> dependency)
从方面任务中移除指定的dependency 。
[pure virtual] void QAspectJob::run()
执行该作业。该作业由调度器在单独的线程上调用。
© 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.