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 | |
27 | QT_BEGIN_NAMESPACE |
28 | |
29 | namespace QSSGSceneDesc { |
30 | struct Scene; |
31 | struct Node; |
32 | struct Animation; |
33 | } |
34 | |
35 | namespace QSSGMesh { |
36 | class Mesh; |
37 | } |
38 | |
39 | class QDir; |
40 | |
41 | namespace QSSGQmlUtilities { |
42 | |
43 | QString Q_QUICK3DASSETUTILS_EXPORT qmlComponentName(const QString &name); |
44 | QString Q_QUICK3DASSETUTILS_EXPORT colorToQml(const QColor &color); |
45 | QString Q_QUICK3DASSETUTILS_EXPORT variantToQml(const QVariant &variant); |
46 | QString Q_QUICK3DASSETUTILS_EXPORT sanitizeQmlId(const QString &id); |
47 | QString Q_QUICK3DASSETUTILS_EXPORT sanitizeQmlSourcePath(const QString &source, bool removeParentDirectory = false); |
48 | QString Q_QUICK3DASSETUTILS_EXPORT stripParentDirectory(const QString &filePath); |
49 | |
50 | void Q_QUICK3DASSETUTILS_EXPORT writeQml(const QSSGSceneDesc::Scene &scene, QTextStream &stream, const QDir &outdir, const QJsonObject &optionsObject = QJsonObject()); |
51 | void Q_QUICK3DASSETUTILS_EXPORT writeQmlComponent(const QSSGSceneDesc::Node &node, QTextStream &stream, const QDir &outDir); |
52 | |
53 | Q_REQUIRED_RESULT QString Q_QUICK3DASSETUTILS_EXPORT getMeshSourceName(const QByteArrayView &name); |
54 | |
55 | void Q_QUICK3DASSETUTILS_EXPORT createTimelineAnimation(const QSSGSceneDesc::Animation &anim, QObject *parent, bool isEnabled = true, bool useBinaryKeyframe = true); |
56 | |
57 | } |
58 | |
59 | |
60 | QT_END_NAMESPACE |
61 | |
62 | #endif // QSSGQMLUTILITIES_P_H |
63 | |