Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qssgassetimportmanager_p.h
Go to the documentation of this file.
1
// Copyright (C) 2019 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
6
#
ifndef
QSSGASSETIMPORTMANAGER_H
7
#
define
QSSGASSETIMPORTMANAGER_H
8
9
//
10
// W A R N I N G
11
// -------------
12
//
13
// This file is not part of the Qt API. It exists purely as an
14
// implementation detail. This header file may change from version to
15
// version without notice, or even be removed.
16
//
17
// We mean it.
18
//
19
20
#
include
<
QtQuick3DAssetImport
/
private
/
qtquick3dassetimportglobal_p
.
h
>
21
22
#
include
<
QtCore
/
QObject
>
23
#
include
<
QtCore
/
QVector
>
24
#
include
<
QtCore
/
QMap
>
25
#
include
<
QtCore
/
QDir
>
26
#
include
<
QtCore
/
QString
>
27
#
include
<
QtCore
/
QList
>
28
#
include
<
QtCore
/
qjsonobject
.
h
>
29
30
QT_BEGIN_NAMESPACE
31
32
class
QSSGAssetImporter;
33
class
QQuick3DNode;
34
namespace
QSSGSceneDesc
{
struct
Scene; }
35
36
struct
QSSGAssetImporterPluginInfo
37
{
38
QString
name
;
39
QStringList
inputExtensions
;
40
QString
outputExtension
;
41
QString
type
;
42
QJsonObject
importOptions
;
43
QString
typeDescription
;
44
};
45
46
class
Q_QUICK3DASSETIMPORT_EXPORT
QSSGAssetImportManager
:
public
QObject
47
{
48
Q_OBJECT
49
public
:
50
explicit
QSSGAssetImportManager(QObject *parent =
nullptr
);
51
~QSSGAssetImportManager();
52
53
enum
class
ImportState : quint8
54
{
55
Success,
56
IoError,
57
Unsupported
58
};
59
60
using
PluginOptionMaps = QHash<QString, QJsonObject>;
61
62
// ### Temp API
63
ImportState importFile(
const
QString &filename,
64
const
QDir &outputPath,
65
QString *error =
nullptr
);
66
ImportState importFile(
const
QString &filename,
67
const
QDir &outputPath,
68
const
QJsonObject &options = QJsonObject(),
69
QString *error =
nullptr
);
70
ImportState importFile(
const
QUrl &url,
71
QSSGSceneDesc::Scene &scene,
72
QString *error =
nullptr
);
73
ImportState importFile(
const
QUrl &url,
74
QSSGSceneDesc::Scene &scene,
75
const
QJsonObject &options = QJsonObject(),
76
QString *error =
nullptr
);
77
QJsonObject getOptionsForFile(
const
QString &filename);
78
PluginOptionMaps getAllOptions()
const
;
79
QHash<QString, QStringList> getSupportedExtensions()
const
;
80
QList<QSSGAssetImporterPluginInfo> getImporterPluginInfos()
const
;
81
82
private
:
83
QVector<QSSGAssetImporter *> m_assetImporters;
84
QMap<QString, QSSGAssetImporter *> m_extensionsMap;
85
};
86
87
QT_END_NAMESPACE
88
89
#
endif
// QSSGASSETIMPORTMANAGER_H
QSSGAssetImportManager
Definition
qssgassetimportmanager_p.h:47
QSSGSceneDesc
Definition
qssgassetimporter_p.h:32
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QSSGAssetImporterPluginInfo
Definition
qssgassetimportmanager_p.h:37
QSSGAssetImporterPluginInfo::outputExtension
QString outputExtension
Definition
qssgassetimportmanager_p.h:40
QSSGAssetImporterPluginInfo::importOptions
QJsonObject importOptions
Definition
qssgassetimportmanager_p.h:42
QSSGAssetImporterPluginInfo::type
QString type
Definition
qssgassetimportmanager_p.h:41
QSSGAssetImporterPluginInfo::inputExtensions
QStringList inputExtensions
Definition
qssgassetimportmanager_p.h:39
QSSGAssetImporterPluginInfo::name
QString name
Definition
qssgassetimportmanager_p.h:38
QSSGAssetImporterPluginInfo::typeDescription
QString typeDescription
Definition
qssgassetimportmanager_p.h:43
qtquick3d
src
assetimport
qssgassetimportmanager_p.h
Generated on
for Qt by
1.18.0