QAbstractAspect Class
(Qt3DCore::QAbstractAspect)QAbstractAspect is the base class for aspects that provide a vertical slice of behavior. More...
| Header: | #include <Qt3DCore/QAbstractAspect> |
| qmake: | QT += 3dcore |
| Inherits: | QObject |
| Inherited By: | Qt3DAnimation::QAnimationAspect, Qt3DInput::QInputAspect, Qt3DLogic::QLogicAspect, and Qt3DRender::QRenderAspect |
Public Functions
| QAbstractAspect(QObject *parent = nullptr) |
- 30 public functions inherited from QObject
Protected Functions
| void | registerBackendType(const Qt3DCore::QBackendNodeMapperPtr &functor) |
| void | registerBackendType(const QMetaObject &obj, const Qt3DCore::QBackendNodeMapperPtr &functor) |
| Qt3DCore::QNodeId | rootEntityId() const |
- 9 protected functions inherited from QObject
Related Non-Members
| typedef | QAspectJobPtr |
| typedef | QBackendNodeMapperPtr |
| typedef | QObjectList |
| QList<T> | qFindChildren(const QObject *obj, const QRegExp ®Exp) |
| T | qobject_cast(QObject *object) |
| T | qobject_cast(const QObject *object) |
Macros
| QT3D_REGISTER_ASPECT(name, AspectType) | |
| QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
| Q_CLASSINFO(Name, Value) | |
| Q_DISABLE_COPY(Class) | |
| Q_DISABLE_COPY_MOVE(Class) | |
| Q_DISABLE_MOVE(Class) | |
| Q_EMIT | |
| Q_ENUM(...) | |
| Q_ENUM_NS(...) | |
| Q_FLAG(...) | |
| Q_FLAG_NS(...) | |
| Q_GADGET | |
| Q_INTERFACES(...) | |
| Q_INVOKABLE | |
| Q_NAMESPACE | |
| Q_OBJECT | |
| Q_PROPERTY(...) | |
| Q_REVISION | |
| Q_SET_OBJECT_NAME(Object) | |
| Q_SIGNAL | |
| Q_SIGNALS | |
| Q_SLOT | |
| Q_SLOTS |
Additional Inherited Members
- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 2 signals inherited from QObject
- 9 static public members inherited from QObject
Detailed Description
Member Function Documentation
QAbstractAspect::QAbstractAspect(QObject *parent = nullptr)
Constructs a new 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.
Related Non-Members
typedef QAbstractAspect::QAspectJobPtr
A shared pointer for QAspectJob.
typedef QAbstractAspect::QBackendNodeMapperPtr
A shared pointer for QBackendNodeMapper.
Macro Documentation
QAbstractAspect::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).
Note: 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.