QSubtreeEnabler 类

class Qt3DRender ::QSubtreeEnabler

启用或禁用框架图形节点的整个子树。 更多...

头: #include <QSubtreeEnabler>
CMake: find_package(Qt6 COMPONENTS 3drender REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
Since: Qt 5.14
实例化: SubtreeEnabler
继承: Qt3DRender::QFrameGraphNode

公共类型

enum Enablement { Persistent, SingleShot }

特性

公共函数

Qt3DRender::QSubtreeEnabler::Enablement enablement () const
void requestUpdate ()
void setEnablement (Qt3DRender::QSubtreeEnabler::Enablement enablement )

信号

void enablementChanged (Qt3DRender::QSubtreeEnabler::Enablement enablement )

详细描述

While QFrameGraphNodes can be individually enabled and disabled via the enabled property, this can become tedious when an entire path needs to be turned on or off. QSubtreeEnabler is a convenience node that makes this use case trivial, allowing all of its children to be controlled by a single switch.

QSubtreeEnabler is enabled by default.

成员类型文档编制

enum QSubtreeEnabler:: Enablement

Specifies whether subtree enablement is persistent or transient.

常量 描述
Qt3DRender::QSubtreeEnabler::Persistent 0 The value of enabled is persistent. This is the default.
Qt3DRender::QSubtreeEnabler::SingleShot 1 The value of enabled will last for a single frame and then be reset to false. This might be used for a subtree drawing to an FBO, for example, to only update the FBO when the relevant portions of the scene changed.

特性文档编制

enablement : Enablement

控制子树启用是持久还是瞬时。

访问函数:

Qt3DRender::QSubtreeEnabler::Enablement enablement () const
void setEnablement (Qt3DRender::QSubtreeEnabler::Enablement enablement )

通知程序信号:

void enablementChanged (Qt3DRender::QSubtreeEnabler::Enablement enablement )

成员函数文档编制

[invokable] void QSubtreeEnabler:: requestUpdate ()

Requests that the subtree be enabled.

方便方法旨在用于 SingleShot enablement.

注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .