QAbstractAspect Class

( Qt3DCore::QAbstractAspect )

QAbstractAspect is the base class for aspects that provide a vertical slice of behavior. 更多...

頭: #include <Qt3DCore/QAbstractAspect>
qmake: QT += 3dcore
繼承: QObject
繼承者: Qt3DAnimation::QAnimationAspect , Qt3DInput::QInputAspect , Qt3DLogic::QLogicAspect ,和 Qt3DRender::QRenderAspect

公共函數

QAbstractAspect (QObject * parent = nullptr)
void scheduleSingleShotJob (const Qt3DCore::QAspectJobPtr & job )

靜態公共成員

const QMetaObject staticMetaObject

保護函數

void registerBackendType (const Qt3DCore::QBackendNodeMapperPtr & functor )
void registerBackendType (const QMetaObject & obj , const Qt3DCore::QBackendNodeMapperPtr & functor )
Qt3DCore::QNodeId rootEntityId () const
void unregisterBackendType ()
void unregisterBackendType ( const QMetaObject & )
typedef QAspectJobPtr
typedef QBackendNodeMapperPtr

QT3D_REGISTER_ASPECT ( name , AspectType )

額外繼承成員

詳細描述

QAbstractAspect is the base class for aspects that provide a vertical slice of behavior.

成員函數文檔編製

QAbstractAspect:: QAbstractAspect ( QObject * parent = nullptr)

構造新的 QAbstractAspect with parent

[protected] void QAbstractAspect:: registerBackendType (const Qt3DCore::QBackendNodeMapperPtr & functor )

Registers backend with functor .

[protected] void QAbstractAspect:: registerBackendType (const QMetaObject & obj , const Qt3DCore::QBackendNodeMapperPtr & functor )

Registers backend with obj and functor .

[protected] Qt3DCore::QNodeId QAbstractAspect:: rootEntityId () const

Returns root entity node id.

void QAbstractAspect:: scheduleSingleShotJob (const Qt3DCore::QAspectJobPtr & job )

[protected] void QAbstractAspect:: unregisterBackendType ()

[protected] void QAbstractAspect:: unregisterBackendType ( const QMetaObject & )

相關非成員

typedef Qt3DCore:: QAspectJobPtr

共享指針為 QAspectJob .

typedef Qt3DCore:: QBackendNodeMapperPtr

共享指針為 QBackendNodeMapper .

宏文檔編製

QT3D_REGISTER_ASPECT ( name , AspectType )

Convenience macro for registering AspectType for instantiation by the currently set Qt3DCore::QAspectFactory. This makes it possible to create an instance of AspectType in the aspect thread by later passing name to Qt3DCore::QAspectEngine::registerAspect (const QString &name).

注意: It is also possible to register a new aspect without using this macro by instead using Qt3DCore::QAspectEngine::registerAspect (QAbstractAspect *aspect) which will handle moving a previously created aspect instance to the aspect thread context.

KDAB has published a few articles about writing custom Qt3D aspects on their blog . These provide an excellent starting point if you wish to learn more about it.