Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquick3dparticleabstractshape.cpp
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5
7#include <QtQuick3D/private/qquick3dnode_p.h>
8
10
11/*!
12 \qmltype ParticleAbstractShape3D
13 \inherits QtObject
14 \inqmlmodule QtQuick3D.Particles3D
15 \brief Abstract base type of particle shapes.
16 \since 6.2
17
18 The ParticleAbstractShape3D is an abstract base type of shapes like \l ParticleShape3D
19 and \l ParticleModelShape3D. Shapes can be used to provide start and end positions
20 for the particles.
21*/
22QQuick3DParticleAbstractShape::QQuick3DParticleAbstractShape(QObject *parent)
23 : QObject(parent)
24{
25}
26
27void QQuick3DParticleAbstractShape::componentComplete()
28{
29 if (!parentNode())
30 qWarning() << "Shape requires parent Node to function correctly!";
31}
32
33QQuick3DNode *QQuick3DParticleAbstractShape::parentNode()
34{
35 QQuick3DNode *node = qobject_cast<QQuick3DNode *>(parent());
36 if (!m_parentNode || m_parentNode != node)
37 m_parentNode = node;
38 return m_parentNode;
39}
40
41QT_END_NAMESPACE
Combined button and popup list for selecting options.