1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QSSGQMLUTILITIES_P_H
5#define QSSGQMLUTILITIES_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtQuick3DAssetUtils/private/qtquick3dassetutilsglobal_p.h>
19
20#include <QString>
21#include <QColor>
22#include <QVariant>
23#include <QHash>
24#include <QTextStream>
25#include <QtCore/QJsonObject>
26
27QT_BEGIN_NAMESPACE
28
29namespace QSSGSceneDesc {
30struct Scene;
31struct Node;
32struct Animation;
33}
34
35namespace QSSGMesh {
36class Mesh;
37}
38
39class QDir;
40
41namespace QSSGQmlUtilities {
42
43QString Q_QUICK3DASSETUTILS_EXPORT qmlComponentName(const QString &name);
44QString Q_QUICK3DASSETUTILS_EXPORT colorToQml(const QColor &color);
45QString Q_QUICK3DASSETUTILS_EXPORT variantToQml(const QVariant &variant);
46QString Q_QUICK3DASSETUTILS_EXPORT sanitizeQmlId(const QString &id);
47QString Q_QUICK3DASSETUTILS_EXPORT sanitizeQmlSourcePath(const QString &source, bool removeParentDirectory = false);
48QString Q_QUICK3DASSETUTILS_EXPORT stripParentDirectory(const QString &filePath);
49
50void Q_QUICK3DASSETUTILS_EXPORT writeQml(const QSSGSceneDesc::Scene &scene, QTextStream &stream, const QDir &outdir, const QJsonObject &optionsObject = QJsonObject());
51void Q_QUICK3DASSETUTILS_EXPORT writeQmlComponent(const QSSGSceneDesc::Node &node, QTextStream &stream, const QDir &outDir);
52
53Q_REQUIRED_RESULT QString Q_QUICK3DASSETUTILS_EXPORT getMeshSourceName(const QByteArrayView &name);
54
55void Q_QUICK3DASSETUTILS_EXPORT createTimelineAnimation(const QSSGSceneDesc::Animation &anim, QObject *parent, bool isEnabled = true, bool useBinaryKeyframe = true);
56
57}
58
59
60QT_END_NAMESPACE
61
62#endif // QSSGQMLUTILITIES_P_H
63

source code of qtquick3d/src/assetutils/qssgqmlutilities_p.h