summaryrefslogtreecommitdiffstats
path: root/src/core/aspects
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@theqtcompany.com>2016-04-20 14:25:09 +0300
committerTomi Korpipää <tomi.korpipaa@theqtcompany.com>2016-04-21 09:33:12 +0000
commit5e93098f1d1095f004ddf0e836d05f6f253deb14 (patch)
tree80262a449429d56d8e7a5d3e0aea01832ef5db83 /src/core/aspects
parent719e0c203d5e502e1ba2cf54da9ac3ee78f9d6f2 (diff)
Added the rest of Qt3DCore doc skeletons
Change-Id: I6898bdc24821276d44fdf5f42170143b7a0cbfd9 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com> Reviewed-by: Pasi Keränen <pasi.keranen@theqtcompany.com> Reviewed-by: Antti Määttä <antti.maatta@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/core/aspects')
-rw-r--r--src/core/aspects/qabstractaspect.cpp84
-rw-r--r--src/core/aspects/qaspectengine.cpp70
2 files changed, 109 insertions, 45 deletions
diff --git a/src/core/aspects/qabstractaspect.cpp b/src/core/aspects/qabstractaspect.cpp
index 83e105cef..fe04b322b 100644
--- a/src/core/aspects/qabstractaspect.cpp
+++ b/src/core/aspects/qabstractaspect.cpp
@@ -69,7 +69,7 @@ QAbstractAspectPrivate *QAbstractAspectPrivate::get(QAbstractAspect *aspect)
}
/*!
- *
+ * \internal
* Called in the context of the main thread
*/
void QAbstractAspectPrivate::onEngineAboutToShutdown()
@@ -77,36 +77,55 @@ void QAbstractAspectPrivate::onEngineAboutToShutdown()
}
/*!
- \class Qt3DCore::QAbstractAspect
- \inmodule Qt3DCore
- \brief QAbstractAspect is the base class for aspects that provide a vertical slice of behavior.
-*/
+ * \class Qt3DCore::QAbstractAspect
+ * \inherits QObject
+ * \inmodule Qt3DCore
+ * \brief QAbstractAspect is the base class for aspects that provide a vertical slice of behavior.
+ */
+
+/*!
+ * \fn void QAbstractAspect::registerBackendType(const QBackendNodeMapperPtr &functor)
+ * Registers backend with \a functor.
+ */
+
+/*!
+ * \internal
+ * \fn void registerBackendType(const QBackendNodeMapperPtr &functor)
+ * This is a workaround to fix an erroneous qdoc warning. KEEP IT INTERNAL
+ */
+
+/*!
+ * Constructs a new QAbstractAspect with \a parent
+ */
QAbstractAspect::QAbstractAspect(QObject *parent)
: QObject(*new QAbstractAspectPrivate, parent)
{
}
/*!
- \typedef Qt3DCore::QAspectJobPtr
- \relates Qt3DCore::QAbstractAspect
-
- A shared pointer for QAspectJob.
-*/
+ * \typedef Qt3DCore::QAspectJobPtr
+ * \relates Qt3DCore::QAbstractAspect
+ *
+ * A shared pointer for QAspectJob.
+ */
/*!
- \typedef Qt3DCore::QBackendNodeMapperPtr
- \relates Qt3DCore::QAbstractAspect
-
- A shared pointer for QBackendNodeMapper.
-*/
+ * \typedef Qt3DCore::QBackendNodeMapperPtr
+ * \relates Qt3DCore::QAbstractAspect
+ *
+ * A shared pointer for QBackendNodeMapper.
+ */
/*!
- \internal
-*/
+ * \internal
+ */
QAbstractAspect::QAbstractAspect(QAbstractAspectPrivate &dd, QObject *parent)
: QObject(dd, parent)
{
}
+/*!
+ * \return root entity node id.
+ */
QNodeId QAbstractAspect::rootEntityId() const Q_DECL_NOEXCEPT
{
Q_D(const QAbstractAspect);
@@ -114,8 +133,8 @@ QNodeId QAbstractAspect::rootEntityId() const Q_DECL_NOEXCEPT
}
/*!
- Registers backend.
-*/
+ * Registers backend with \a obj and \a functor.
+ */
void QAbstractAspect::registerBackendType(const QMetaObject &obj, const QBackendNodeMapperPtr &functor)
{
Q_D(QAbstractAspect);
@@ -323,25 +342,24 @@ QVector<QAspectJobPtr> QAbstractAspectPrivate::jobsToExecute(qint64 time)
}
/*!
- Called in the context of the aspect thread once the aspect has been registered.
- This provides an opportunity for the aspect to do any initialization tasks that
- require to be in the aspect thread context such as creating QObject subclasses that
- must have affinity with this thread.
-
- \sa onUnregistered
-*/
+ * Called in the context of the aspect thread once the aspect has been registered.
+ * This provides an opportunity for the aspect to do any initialization tasks that
+ * require to be in the aspect thread context such as creating QObject subclasses that
+ * must have affinity with this thread.
+ *
+ * \sa onUnregistered
+ */
void QAbstractAspect::onRegistered()
{
}
/*!
- Called in the context of the aspect thread during unregistration
-
- of the aspect. This gives the aspect a chance to do any final pieces of
- cleanup that it would not do when just changing to a new scene.
-
- \sa onRegistered
-*/
+ * Called in the context of the aspect thread during unregistration
+ * of the aspect. This gives the aspect a chance to do any final pieces of
+ * cleanup that it would not do when just changing to a new scene.
+ *
+ * \sa onRegistered
+ */
void QAbstractAspect::onUnregistered()
{
}
diff --git a/src/core/aspects/qaspectengine.cpp b/src/core/aspects/qaspectengine.cpp
index 769973632..b6a6e2840 100644
--- a/src/core/aspects/qaspectengine.cpp
+++ b/src/core/aspects/qaspectengine.cpp
@@ -77,9 +77,11 @@ QAspectEnginePrivate::QAspectEnginePrivate()
}
/*!
- Used to init the scene tree when the Qt3D aspect is first started. Basically
- sets the scene/change arbiter on the items and store the entity - component
- pairs in the scene
+ * \internal
+ *
+ * Used to init the scene tree when the Qt3D aspect is first started. Basically,
+ * sets the scene/change arbiter on the items and stores the entity - component
+ * pairs in the scene
*/
void QAspectEnginePrivate::initNode(QNode *node)
{
@@ -105,6 +107,24 @@ void QAspectEnginePrivate::generateCreationChanges(QNode *root)
m_creationChanges = generator.creationChanges();
}
+/*!
+ * \class Qt3DCore::QAspectEngine
+ * \inherits QObject
+ * \inmodule Qt3DCore
+ *
+ * TODO
+ */
+
+/*!
+ * \typedef Qt3DCore::QEntityPtr
+ * \relates Qt3DCore::QAspectEngine
+ *
+ * A shared pointer for QEntity.
+ */
+
+/*!
+ * Constructs a new QAspectEngine with \a parent.
+ */
QAspectEngine::QAspectEngine(QObject *parent)
: QObject(*new QAspectEnginePrivate, parent)
{
@@ -121,6 +141,9 @@ QAspectEngine::QAspectEngine(QObject *parent)
d->m_aspectThread->waitForStart(QThread::HighestPriority);
}
+/*!
+ * Destroys the engine.
+ */
QAspectEngine::~QAspectEngine()
{
Q_D(QAspectEngine);
@@ -157,12 +180,12 @@ void QAspectEnginePrivate::initialize()
}
/*!
- \internal
-
- Called when we unset the root entity. Causes the QAspectManager's simulation
- loop to be exited. The main loop should keep processing events ready
- to start up the simulation again with a new root entity.
-*/
+ * \internal
+ *
+ * Called when we unset the root entity. Causes the QAspectManager's simulation
+ * loop to be exited. The main loop should keep processing events ready
+ * to start up the simulation again with a new root entity.
+ */
void QAspectEnginePrivate::shutdown()
{
qCDebug(Aspects) << Q_FUNC_INFO;
@@ -174,9 +197,9 @@ void QAspectEnginePrivate::shutdown()
}
/*!
- Registers a new \a aspect to the AspectManager. The QAspectEngine takes
- ownership of the aspect and will delete it when the aspect is unregistered.
-*/
+ * Registers a new \a aspect to the AspectManager. The QAspectEngine takes
+ * ownership of the aspect and will delete it when the aspect is unregistered.
+ */
// Called in the main thread
void QAspectEngine::registerAspect(QAbstractAspect *aspect)
{
@@ -208,6 +231,9 @@ void QAspectEngine::registerAspect(const QString &name)
}
}
+/*!
+ * Unregisters and deletes the given \a aspect.
+ */
void QAspectEngine::unregisterAspect(QAbstractAspect *aspect)
{
Q_D(QAspectEngine);
@@ -233,6 +259,9 @@ void QAspectEngine::unregisterAspect(QAbstractAspect *aspect)
aspect->deleteLater();
}
+/*!
+ * Unregisters and deletes the aspect with the given \a name.
+ */
void QAspectEngine::unregisterAspect(const QString &name)
{
Q_D(QAspectEngine);
@@ -246,12 +275,23 @@ void QAspectEngine::unregisterAspect(const QString &name)
unregisterAspect(aspect);
}
+/*!
+ * \return the aspects owned by the aspect engine.
+ */
QVector<QAbstractAspect *> QAspectEngine::aspects() const
{
Q_D(const QAspectEngine);
return d->m_aspects;
}
+/*!
+ * Executes the given \a command on aspect engine. Valid commands are:
+ * \list
+ * \li "list aspects"
+ * \endlist
+ *
+ * \return the reply for the command.
+ */
QVariant QAspectEngine::executeCommand(const QString &command)
{
Q_D(QAspectEngine);
@@ -283,6 +323,9 @@ QVariant QAspectEngine::executeCommand(const QString &command)
return QVariant();
}
+/*!
+ * Sets the \a root entity for the aspect engine.
+ */
void QAspectEngine::setRootEntity(QEntityPtr root)
{
qCDebug(Aspects) << Q_FUNC_INFO << "root =" << root;
@@ -339,6 +382,9 @@ void QAspectEngine::setRootEntity(QEntityPtr root)
d->m_aspectThread->aspectManager()->enterSimulationLoop();
}
+/*!
+ * \return the root entity of the aspect engine.
+ */
QEntityPtr QAspectEngine::rootEntity() const
{
Q_D(const QAspectEngine);