Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
4#ifndef QSSGASSETIMPORTMANAGER_H
5#define QSSGASSETIMPORTMANAGER_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 <QtQuick3DAssetImport/private/qtquick3dassetimportglobal_p.h>
19
20#include <QtCore/QObject>
21#include <QtCore/QVector>
22#include <QtCore/QMap>
23#include <QtCore/QDir>
24#include <QtCore/QString>
25#include <QtCore/QList>
26#include <QtCore/qjsonobject.h>
27
29
31class QQuick3DNode;
32namespace QSSGSceneDesc { struct Scene; }
33
43
44class Q_QUICK3DASSETIMPORT_EXPORT QSSGAssetImportManager : public QObject
45{
47public:
48 explicit QSSGAssetImportManager(QObject *parent = nullptr);
50
51 enum class ImportState : quint8
52 {
53 Success,
54 IoError,
55 Unsupported
56 };
57
58 using PluginOptionMaps = QHash<QString, QJsonObject>;
59
60 // ### Temp API
61 ImportState importFile(const QString &filename,
62 const QDir &outputPath,
63 QString *error = nullptr);
64 ImportState importFile(const QString &filename,
65 const QDir &outputPath,
66 const QJsonObject &options = QJsonObject(),
67 QString *error = nullptr);
68 ImportState importFile(const QUrl &url,
70 QString *error = nullptr);
71 ImportState importFile(const QUrl &url,
73 const QJsonObject &options = QJsonObject(),
74 QString *error = nullptr);
75 QJsonObject getOptionsForFile(const QString &filename);
76 PluginOptionMaps getAllOptions() const;
77 QHash<QString, QStringList> getSupportedExtensions() const;
78 QList<QSSGAssetImporterPluginInfo> getImporterPluginInfos() const;
79
80private:
81 QVector<QSSGAssetImporter *> m_assetImporters;
82 QMap<QString, QSSGAssetImporter *> m_extensionsMap;
83};
84
86
87#endif // QSSGASSETIMPORTMANAGER_H
\inmodule QtCore
Definition qdir.h:20
\inmodule QtCore\reentrant
Definition qjsonobject.h:20
\inmodule QtCore
Definition qobject.h:103
QHash< QString, QJsonObject > PluginOptionMaps
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qurl.h:94
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
@ Success
Definition main.cpp:3325
#define Q_OBJECT
unsigned char quint8
Definition qtypes.h:46
QUrl url("example.com")
[constructor-url-reference]
QGraphicsScene scene
[0]