12#include <QRegularExpression> 
   13#include <QtCore/qdir.h> 
   14#include <QtCore/qfile.h> 
   15#include <QtCore/qbuffer.h> 
   17#include <QtGui/qimage.h> 
   18#include <QtGui/qimagereader.h> 
   20#include <QtQuick3DUtils/private/qssgmesh_p.h> 
   21#include <QtQuick3DUtils/private/qssgassert_p.h> 
   23#include <QtQuick3DRuntimeRender/private/qssgrenderbuffermanager_p.h> 
   25#ifdef QT_QUICK3D_ENABLE_RT_ANIMATIONS 
   26#include <QtCore/QCborStreamWriter> 
   27#include <QtQuickTimeline/private/qquicktimeline_p.h> 
   57    for (
int i = 0; 
i < 
n; ++
i)
 
   69    if (nameCopy[0].isLower())
 
   70        nameCopy[0] = nameCopy[0].
toUpper();
 
   83    case QMetaType::Float: {
 
   87    case QMetaType::QVector2D: {
 
   93    case QMetaType::QVector3D: {
 
  100    case QMetaType::QVector4D: {
 
  108    case QMetaType::QColor: {
 
  112    case QMetaType::QQuaternion: {
 
  146        while (
i < 
len && idCopy[
i].isUpper()) {
 
  264    if (removeParentDirectory)
 
  281    return m_properties[
type];
 
  288    if (m_properties.contains(
type)) {
 
  307        const auto name = 
property.name();
 
  308        const auto value = 
property.read(
object);
 
  311    return propertiesMap;
 
  314PropertyMap::PropertyMap()
 
  323        m_properties.insert(QSSGSceneDesc::Node::RuntimeType::PrincipledMaterial, 
getObjectPropertiesMap(&principledMaterial));
 
  327        m_properties.insert(QSSGSceneDesc::Node::RuntimeType::SpecularGlossyMaterial, 
getObjectPropertiesMap(&specularGlossyMaterial));
 
  331        m_properties.insert(QSSGSceneDesc::Node::RuntimeType::CustomMaterial, 
getObjectPropertiesMap(&customMaterial));
 
  339        m_properties.insert(QSSGSceneDesc::Node::RuntimeType::ImageCube, 
getObjectPropertiesMap(&cubeMapTexture));
 
  351        m_properties.insert(QSSGSceneDesc::Node::RuntimeType::OrthographicCamera, 
getObjectPropertiesMap(&orthographicCamera));
 
  355        m_properties.insert(QSSGSceneDesc::Node::RuntimeType::PerspectiveCamera, 
getObjectPropertiesMap(&perspectiveCamera));
 
  359        m_properties.insert(QSSGSceneDesc::Node::RuntimeType::DirectionalLight, 
getObjectPropertiesMap(&directionalLight));
 
  405template<QSSGSceneDesc::Material::RuntimeType T>
 
  406const char *
qmlElementName() { 
static_assert(!std::is_same_v<
decltype(T), 
decltype(T)>, 
"Unknown type"); 
return nullptr; }
 
  434    case RuntimeType::Node:
 
  435        return qmlElementName<RuntimeType::Node>();
 
  436    case RuntimeType::PrincipledMaterial:
 
  437        return qmlElementName<RuntimeType::PrincipledMaterial>();
 
  438    case RuntimeType::SpecularGlossyMaterial:
 
  439        return qmlElementName<RuntimeType::SpecularGlossyMaterial>();
 
  440    case RuntimeType::CustomMaterial:
 
  441        return qmlElementName<RuntimeType::CustomMaterial>();
 
  442    case RuntimeType::Image2D:
 
  443        return qmlElementName<RuntimeType::Image2D>();
 
  444    case RuntimeType::ImageCube:
 
  445        return qmlElementName<RuntimeType::ImageCube>();
 
  446    case RuntimeType::TextureData:
 
  447        return qmlElementName<RuntimeType::TextureData>();
 
  448    case RuntimeType::Model:
 
  449        return qmlElementName<RuntimeType::Model>();
 
  450    case RuntimeType::OrthographicCamera:
 
  451        return qmlElementName<RuntimeType::OrthographicCamera>();
 
  452    case RuntimeType::PerspectiveCamera:
 
  453        return qmlElementName<RuntimeType::PerspectiveCamera>();
 
  454    case RuntimeType::DirectionalLight:
 
  455        return qmlElementName<RuntimeType::DirectionalLight>();
 
  456    case RuntimeType::PointLight:
 
  457        return qmlElementName<RuntimeType::PointLight>();
 
  458    case RuntimeType::SpotLight:
 
  459        return qmlElementName<RuntimeType::SpotLight>();
 
  460    case RuntimeType::Skeleton:
 
  461        return qmlElementName<RuntimeType::Skeleton>();
 
  462    case RuntimeType::Joint:
 
  463        return qmlElementName<RuntimeType::Joint>();
 
  464    case RuntimeType::Skin:
 
  465        return qmlElementName<RuntimeType::Skin>();
 
  466    case RuntimeType::MorphTarget:
 
  467        return qmlElementName<RuntimeType::MorphTarget>();
 
  469        return "UNKNOWN_TYPE";
 
  524    case QMetaType::Bool:
 
  526    case QMetaType::Char:
 
  527    case QMetaType::SChar:
 
  528    case QMetaType::UChar:
 
  529    case QMetaType::Char16:
 
  530    case QMetaType::Char32:
 
  531    case QMetaType::QChar:
 
  532    case QMetaType::Short:
 
  533    case QMetaType::UShort:
 
  535    case QMetaType::UInt:
 
  536    case QMetaType::Long:
 
  537    case QMetaType::ULong:
 
  538    case QMetaType::LongLong:
 
  539    case QMetaType::ULongLong:
 
  541    case QMetaType::Float:
 
  542    case QMetaType::Double:
 
  544    case QMetaType::QByteArray:
 
  545    case QMetaType::QString:
 
  547    case QMetaType::QDate:
 
  548    case QMetaType::QTime:
 
  549    case QMetaType::QDateTime:
 
  551    case QMetaType::QUrl:
 
  553    case QMetaType::QRect:
 
  554    case QMetaType::QRectF:
 
  556    case QMetaType::QSize:
 
  557    case QMetaType::QSizeF:
 
  559    case QMetaType::QPoint:
 
  560    case QMetaType::QPointF:
 
  564    case QMetaType::QColor:
 
  566    case QMetaType::QMatrix4x4:
 
  568    case QMetaType::QVector2D:
 
  570    case QMetaType::QVector3D:
 
  572    case QMetaType::QVector4D:
 
  574    case QMetaType::QQuaternion:
 
  576    case QMetaType::QFont:
 
  597    static constexpr const char *
typeNames[] = {
 
  611    constexpr uint nameCount = 
sizeof(
typeNames)/
sizeof(
const char*);
 
  612    const bool nodeHasName = (node.name.size() > 0);
 
  625            g_idMap->
insert(sanitizedName, &node);
 
  626            g_nodeNameMap->insert(&node, sanitizedName);
 
  627            return sanitizedName;
 
  630        sanitizedName = 
QStringLiteral(
"%1%2").arg(sanitizedName).arg(
id++);
 
  631    } 
while (--attempts);
 
  633    return sanitizedName;
 
  645            if (
const auto oIt = g_idOthers->constFind(sanitizedName); oIt == g_idOthers->constEnd()) {
 
  646                g_idOthers->insert(sanitizedName);
 
  647                return sanitizedName;
 
  651        sanitizedName = 
QStringLiteral(
"%1%2").arg(sanitizedName).arg(++
id);
 
  652    } 
while (--attempts);
 
  654    return sanitizedName;
 
  667static const char *
indent() { 
return "    "; }
 
  706    output.stream << 
"import QtQuick\n" 
  707                  << 
"import QtQuick3D\n\n";
 
  709        output.stream << 
"import QtQuick.Timeline\n\n";
 
  747    case QMetaType::QVector2D: {
 
  748        const auto vec2 = qvariant_cast<QVector2D>(
var);
 
  751    case QMetaType::QVector3D: {
 
  752        const auto vec3 = qvariant_cast<QVector3D>(
var);
 
  757    case QMetaType::QVector4D: {
 
  758        const auto vec4 = qvariant_cast<QVector4D>(
var);
 
  764    case QMetaType::QColor: {
 
  765        const auto color = qvariant_cast<QColor>(
var);
 
  768    case QMetaType::QQuaternion: {
 
  769        const auto &quat = qvariant_cast<QQuaternion>(
var);
 
  775    case QMetaType::QMatrix4x4: {
 
  776        const auto mat44 = qvariant_cast<QMatrix4x4>(
var);
 
  783    case QMetaType::Float:
 
  784    case QMetaType::Double:
 
  786    case QMetaType::Char:
 
  787    case QMetaType::Long:
 
  788    case QMetaType::LongLong:
 
  789    case QMetaType::ULong:
 
  790    case QMetaType::ULongLong:
 
  791    case QMetaType::Bool:
 
  793    case QMetaType::QUrl: 
 
  822    const auto &mesh = 
scene.meshStorage.at(meshNode.
idx);
 
  825    if (!outdir.
exists(meshFolder) && !outdir.
mkdir(meshFolder)) {
 
  826        qDebug() << 
"Failed to create meshes folder at" << outdir;
 
  836    if (mesh.save(&
file) == 0) {
 
  840    return {meshSourceName, 
QString()};
 
  860    if (!
output.outdir.exists(mapsFolder) && !
output.outdir.mkdir(mapsFolder)) {
 
  861        qDebug() << 
"Failed to create maps folder at" << 
output.outdir;
 
  881    case QMetaType::QVector2D: {
 
  883        if (
match.hasMatch()) {
 
  885            if (comp.size() == 2) {
 
  892    case QMetaType::QVector3D: {
 
  894        if (
match.hasMatch()) {
 
  896            if (comp.size() == 3) {
 
  904    case QMetaType::QVector4D: {
 
  906        if (
match.hasMatch()) {
 
  908            if (comp.size() == 4) {
 
  917    case QMetaType::QQuaternion: {
 
  919        if (
match.hasMatch()) {
 
  921            if (comp.size() == 4) {
 
  940    if (mt.
id() != QMetaType::QQuaternion)
 
  966    result.isDynamicProperty = 
property.type == QSSGSceneDesc::Property::Type::Dynamic;
 
  970    if (valueAsString.
size() > 0) {
 
  971        result.value = valueAsString;
 
  979        if (enumValue.
size() > 0) {
 
  983    } 
else if (
value.metaType().id() == qMetaTypeId<QSSGSceneDesc::Flag>()) {
 
  985        if (element.
size() > 0) {
 
  986            const auto flag = qvariant_cast<QSSGSceneDesc::Flag>(
value);
 
  987            QByteArray keysString = flag.me.valueToKeys(
int(flag.value));
 
  988            if (keysString.
size() > 0) {
 
  989                keysString.
prepend(element + 
'.');
 
  990                QByteArray replacement(
" | " + element + 
'.');
 
  991                keysString.
replace(
'|', replacement);
 
  996    } 
else if (
value.metaType().id() == qMetaTypeId<QSSGSceneDesc::NodeList *>()) {
 
  997        const auto *
list = qvariant_cast<QSSGSceneDesc::NodeList *>(
value);
 
 1018    } 
else if (
value.metaType().id() == qMetaTypeId<QSSGSceneDesc::ListView *>()) {
 
 1019        const auto &
list = *qvariant_cast<QSSGSceneDesc::ListView *>(
value);
 
 1028            char *vptr = 
reinterpret_cast<char *
>(
list.
data);
 
 1049    } 
else if (
value.metaType().id() == qMetaTypeId<QSSGSceneDesc::Node *>()) {
 
 1050        if (
const auto node = qvariant_cast<QSSGSceneDesc::Node *>(
value)) {
 
 1058            if (node->runtimeType == QSSGSceneDesc::Node::RuntimeType::TextureData) {
 
 1066    } 
else if (
value.metaType() == QMetaType::fromType<QSSGSceneDesc::Mesh *>()) {
 
 1067        if (
const auto meshNode = qvariant_cast<const QSSGSceneDesc::Mesh *>(
value)) {
 
 1068            Q_ASSERT(meshNode->nodeType == QSSGSceneDesc::Node::Type::Mesh);
 
 1070            const auto &
scene = *meshNode->scene;
 
 1072            result.notValidReason = notValidReason;
 
 1073            if (!meshSourceName.isEmpty()) {
 
 1078    } 
else if (
value.metaType() == QMetaType::fromType<QUrl>()) {
 
 1084                result.notValidReason = notValidReason;
 
 1085                if (!relpath.isEmpty()) {
 
 1091            if (!
path.isEmpty()) {
 
 1096    } 
else if (
target.runtimeType == QSSGSceneDesc::Material::RuntimeType::CustomMaterial) {
 
 1098        if (
value.metaType().id() == qMetaTypeId<QSSGSceneDesc::Texture *>()) {
 
 1099            if (
const auto texture = qvariant_cast<QSSGSceneDesc::Texture *>(
value)) {
 
 1106    } 
else if (
value.metaType() == QMetaType::fromType<QString>()) {
 
 1142        const auto &
property = *
it;
 
 1146            if (
result.isDynamicProperty) {
 
 1149                if (
result.expandedProperties.size() > 1) {
 
 1150                    for (
const auto &va : 
result.expandedProperties)
 
 1156        } 
else if (!
result.isDynamicProperty) {
 
 1158            if (!
result.notValidReason.isEmpty())
 
 1169    Q_ASSERT(
transform.nodeType == QSSGSceneDesc::Node::Type::Transform && 
transform.runtimeType == QSSGSceneDesc::Node::RuntimeType::Node);
 
 1178    if (material.
runtimeType == QSSGSceneDesc::Model::RuntimeType::SpecularGlossyMaterial) {
 
 1180    } 
else if (material.
runtimeType == Model::RuntimeType::PrincipledMaterial) {
 
 1182    } 
else if (material.
runtimeType == Material::RuntimeType::CustomMaterial) {
 
 1184    } 
else if (material.
runtimeType == Material::RuntimeType::SpecularGlossyMaterial) {
 
 1205    if (
camera.runtimeType == Camera::RuntimeType::PerspectiveCamera)
 
 1207    else if (
camera.runtimeType == Camera::RuntimeType::OrthographicCamera)
 
 1218    if (
texture.runtimeType == Texture::RuntimeType::Image2D)
 
 1220    else if (
texture.runtimeType == Texture::RuntimeType::ImageCube)
 
 1246    const auto ext = (
fmt.length() != 3) ? u
".png"_s
 
 1249    return QString(textureFolder + sanitizedName + 
ext);
 
 1261    const bool isCompressed = ((textureData.
flgs & 
quint8(QSSGSceneDesc::TextureData::Flags::Compressed)) != 0);
 
 1264    if (!outdir.
exists(mapsFolder) && !outdir.
mkdir(mapsFolder))
 
 1275        const auto &texData = textureData.
data;
 
 1276        const auto &
size = textureData.
sz;
 
 1279        if (!
image.save(imagePath))
 
 1283    return textureSourceName;
 
 1297    if (!textureSourcePath.
isEmpty()) {
 
 1309    if (light.
runtimeType == Light::RuntimeType::DirectionalLight)
 
 1311    else if (light.
runtimeType == Light::RuntimeType::SpotLight)
 
 1313    else if (light.
runtimeType == Light::RuntimeType::PointLight)
 
 1346        case Node::Type::Skin:
 
 1349        case Node::Type::MorphTarget:
 
 1352        case Node::Type::Skeleton:
 
 1355        case Node::Type::Texture:
 
 1356            if (node.
runtimeType == Node::RuntimeType::Image2D)
 
 1358            else if (node.
runtimeType == Node::RuntimeType::ImageCube)
 
 1360            else if (node.
runtimeType == Node::RuntimeType::TextureData)
 
 1365        case Node::Type::Material:
 
 1368        case Node::Type::Mesh:
 
 1379    const bool skipBlockEnd = (node.
runtimeType == Node::RuntimeType::TextureData || node.
nodeType == Node::Type::Mesh);
 
 1395        case Node::Type::Skeleton:
 
 1398        case Node::Type::Joint:
 
 1401        case Node::Type::Light:
 
 1404        case Node::Type::Transform:
 
 1407        case Node::Type::Camera:
 
 1410        case Node::Type::Model:
 
 1418    for (
const auto &cld : node.
children) {
 
 1427    const bool skipBlockEnd = (node.
runtimeType == Node::RuntimeType::TextureData || node.
nodeType == Node::Type::Mesh);
 
 1436    auto sortedResources = resources;
 
 1438        using RType = QSSGSceneDesc::Node::RuntimeType;
 
 1439        if (a->runtimeType == RType::TextureData && b->runtimeType != RType::TextureData)
 
 1441        if (a->runtimeType == RType::ImageCube && (b->runtimeType != RType::TextureData && b->runtimeType != RType::ImageCube))
 
 1443        if (a->runtimeType == RType::Image2D && (b->runtimeType != RType::TextureData && b->runtimeType != RType::Image2D))
 
 1448    for (
const auto &
res : std::as_const(sortedResources))
 
 1454#ifdef QT_QUICK3D_ENABLE_RT_ANIMATIONS 
 1459    writer.
append(
"QTimelineKeyframes");
 
 1461    const int keyframesDataVersion = 1;
 
 1462    writer.
append(keyframesDataVersion);
 
 1463    writer.
append(
int(
channel.keys.at(0)->getValueQMetaType()));
 
 1468    bool isQuaternion = 
false;
 
 1470        isQuaternion = 
true;
 
 1504    indent(
output) << 
"objectName: \"" << objectName << 
"\"\n";
 
 1530            if (useBinaryKeyframes && 
channel->keys.size() != 1) {
 
 1533                if (!
output.outdir.exists(animFolder) && !
output.outdir.mkdir(animFolder)) {
 
 1569        const auto end = options.constEnd();
 
 1577        return value.toBool(defaultValue);
 
 1580    auto root = 
scene.root;
 
 1586        options = 
it->toObject();
 
 1596    const bool useBinaryKeyframes = 
checkBooleanOption(
"useBinaryKeyframes"_L1, options);
 
 1611    for (
const auto &cld : root->children)
 
 1618    for (
const auto &cld : 
scene.animations) {
 
 1630#ifdef QT_QUICK3D_ENABLE_RT_ANIMATIONS 
 1631    auto timeline = 
new QQuickTimeline(
parent);
 
 1632    auto timelineKeyframeGroup = timeline->keyframeGroups();
 
 1634        auto keyframeGroup = 
new QQuickKeyframeGroup(timeline);
 
 1635        keyframeGroup->setTargetObject(
channel->target->obj);
 
 1639        if (useBinaryKeyframes) {
 
 1643            keyframeGroup->setKeyframeData(keyframeData);
 
 1645            auto keyframes = keyframeGroup->keyframes();
 
 1647                auto keyframe = 
new QQuickKeyframe(keyframeGroup);
 
 1648                keyframe->setFrame(
key->time);
 
 1649                keyframe->setValue(
key->getValue());
 
 1650                keyframes.append(&keyframes, keyframe);
 
 1653        (qobject_cast<QQmlParserStatus *>(keyframeGroup))->componentComplete();
 
 1654        timelineKeyframeGroup.append(&timelineKeyframeGroup, keyframeGroup);
 
 1656    timeline->setEndFrame(anim.
length);
 
 1657    timeline->setEnabled(isEnabled);
 
 1659    auto timelineAnimation = 
new QQuickTimelineAnimation(timeline);
 
 1660    timelineAnimation->setObjectName(anim.
name);
 
 1661    timelineAnimation->setDuration(
int(anim.
length));
 
 1662    timelineAnimation->setFrom(0.0f);
 
 1663    timelineAnimation->setTo(anim.
length);
 
 1664    timelineAnimation->setLoops(QQuickTimelineAnimation::Infinite);
 
 1665    timelineAnimation->setTargetObject(timeline);
 
 1667    (qobject_cast<QQmlParserStatus *>(timeline))->componentComplete();
 
 1669    timelineAnimation->setRunning(
true);
 
 1684    if (node.
runtimeType == Material::RuntimeType::CustomMaterial) {
 
static void processNode(const SceneInfo &sceneInfo, const aiNode &source, QSSGSceneDesc::Node &parent, const NodeMap &nodeMap, AnimationNodeMap &animationNodes)
static bool checkBooleanOption(const QString &optionName, const QJsonObject &options)
IOBluetoothL2CAPChannel * channel
QByteArray & prepend(char c)
This is an overloaded member function, provided for convenience. It differs from the above function o...
qsizetype size() const noexcept
Returns the number of bytes in this byte array.
bool isEmpty() const noexcept
Returns true if the byte array has size 0; otherwise returns false.
QByteArray & replace(qsizetype index, qsizetype len, const char *s, qsizetype alen)
This is an overloaded member function, provided for convenience. It differs from the above function o...
\inmodule QtCore\reentrant
void startArray()
Starts a CBOR Array with indeterminate length in the CBOR stream.
void append(quint64 u)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool endArray()
Terminates the array started by either overload of startArray() and returns true if the correct numbe...
static constexpr QChar fromLatin1(char c) noexcept
Converts the Latin-1 character c to its equivalent QChar.
constexpr bool isNumber() const noexcept
Returns true if the character is a number (Number_* categories, not just 0-9); otherwise returns fals...
The QColor class provides colors based on RGB, HSV or CMYK values.
bool mkdir(const QString &dirName) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString path() const
Returns the path.
static QChar separator()
Returns the native directory separator: "/" under Unix and "\\" under Windows.
bool exists() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void close() override
Calls QFileDevice::flush() and closes the file.
\inmodule QtCore \reentrant
QString fileName() const
Returns the name of the file, excluding the path.
QString canonicalFilePath() const
Returns the canonical path including the file name, i.e.
bool isRelative() const
Returns true if the file path is relative, otherwise returns false (i.e.
bool exists() const
Returns true if the file exists; otherwise returns false.
bool open(OpenMode flags) override
Opens the file using OpenMode mode, returning true if successful; otherwise false.
bool copy(const QString &newName)
Copies the file named fileName() to newName.
bool exists() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
qint64 write(const char *data, qint64 len)
Writes at most maxSize bytes of data from data to the device.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr QLatin1Char at(qsizetype i) const
bool isEmpty() const noexcept
qsizetype count() const noexcept
The QQuaternion class represents a quaternion consisting of a vector and scalar.
\qmltype TextureData \inherits Object3D \inqmlmodule QtQuick3D \instantiates QQuick3DTextureData
\inmodule QtCore \reentrant
\inmodule QtCore \reentrant
bool isValid() const
Returns true if the regular expression is a valid regular expression (that is, it contains no syntax ...
QRegularExpressionMatch match(const QString &subject, qsizetype offset=0, MatchType matchType=NormalMatch, MatchOptions matchOptions=NoMatchOption) const
Attempts to match the regular expression against the given subject string, starting at the position o...
bool isDefaultValue(QSSGSceneDesc::Node::RuntimeType type, const char *property, const QVariant &value)
PropertiesMap propertiesForType(QSSGSceneDesc::Node::RuntimeType type)
static PropertyMap * instance()
QVariant getDefaultValue(QSSGSceneDesc::Node::RuntimeType type, const char *property)
QHash< QByteArray, QVariant > PropertiesMap
const_iterator constEnd() const noexcept
const_iterator constFind(const T &value) const
iterator insert(const T &value)
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
QString & replace(qsizetype i, qsizetype len, QChar after)
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static QString fromLocal8Bit(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
qsizetype size() const
Returns the number of characters in this string.
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString arg(qlonglong a, int fieldwidth=0, int base=10, QChar fillChar=u' ') const
bool isUpper() const
Returns true if the string is uppercase, that is, it's identical to its toUpper() folding.
const QChar at(qsizetype i) const
Returns the character at the given index position in the string.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QString toLower() const &
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString & append(QChar c)
QString & remove(qsizetype i, qsizetype len)
Removes n characters from the string, starting at the given position index, and returns a reference t...
QByteArray toUtf8() const &
QString & prepend(QChar c)
QString toUpper() const &
qsizetype length() const
Returns the number of characters in this string.
QString fileName(ComponentFormattingOptions options=FullyDecoded) const
bool isEmpty() const
Returns true if the URL has no data; otherwise returns false.
QString toString(FormattingOptions options=FormattingOptions(PrettyDecoded)) const
Returns a string representation of the URL.
QString path(ComponentFormattingOptions options=FullyDecoded) const
Returns the path of the URL.
double toDouble(bool *ok=nullptr) const
Returns the variant as a double if the variant has userType() \l QMetaType::Double,...
QString toString() const
Returns the variant as a QString if the variant has a userType() including, but not limited to:
int typeId() const
Returns the storage type of the value stored in the variant.
QMetaType metaType() const
The QVector2D class represents a vector or vertex in 2D space.
The QVector3D class represents a vector or vertex in 3D space.
The QVector4D class represents a vector or vertex in 4D space.
QSet< QString >::iterator it
static const struct @480 keywords[]
const char * qmlElementName< QSSGSceneDesc::Camera::RuntimeType::PointLight >()
static const char * blockEnd()
QString builtinQmlType(const QVariant &var)
QString colorToQml(const QColor &color)
static void generateKeyframeData(const QSSGSceneDesc::Animation::Channel &channel, QByteArray &keyframeData)
QString getMeshSourceName(const QByteArrayView &name)
static QString getIdForNode(const QSSGSceneDesc::Node &node)
const char * qmlElementName< QSSGSceneDesc::Material::RuntimeType::PrincipledMaterial >()
const char * qmlElementName< QSSGSceneDesc::Node::RuntimeType::Node >()
QString asString(const QVariant &var)
const char * qmlElementName< QSSGSceneDesc::Material::RuntimeType::PerspectiveCamera >()
const char * qmlElementName< QSSGSceneDesc::Material::RuntimeType::CustomMaterial >()
const char * qmlElementName< QSSGSceneDesc::Node::RuntimeType::Skin >()
QString variantToQml(const QVariant &variant)
static QString getTextureFolder()
const char * qmlElementName< QSSGSceneDesc::Camera::RuntimeType::SpotLight >()
static PropertyMap::PropertiesMap getObjectPropertiesMap(QObject *object)
static QString getAnimationFolder()
const char * qmlElementName< QSSGSceneDesc::Texture::RuntimeType::TextureData >()
static QString getAnimationExtension()
static ValueToQmlResult valueToQml(const QSSGSceneDesc::Node &target, const QSSGSceneDesc::Property &property, OutputContext &output)
QString insertTabs(int n)
static QString getMeshExtension()
static const char * blockBegin()
QString stripParentDirectory(const QString &filePath)
static void writeQml(const QSSGSceneDesc::Node &transform, OutputContext &output)
static QStringList expandComponents(const QString &value, QMetaType mt)
void writeQmlForResources(const QSSGSceneDesc::Scene::ResourceNodes &resources, OutputContext &output)
const char * qmlElementName()
void writeQmlComponent(const QSSGSceneDesc::Node &node, QTextStream &stream, const QDir &outDir)
const char * qmlElementName< QSSGSceneDesc::Node::RuntimeType::Model >()
void createTimelineAnimation(const QSSGSceneDesc::Animation &anim, QObject *parent, bool isEnabled, bool useBinaryKeyframes)
static QString outputTextureAsset(const QSSGSceneDesc::TextureData &textureData, const QDir &outdir)
static const char * comment()
static QString toQuotedString(const QString &text)
QString sanitizeQmlId(const QString &id)
static QString getIdForAnimation(const QByteArray &inName)
static QString getMeshFolder()
static void writeImportHeader(OutputContext &output, bool hasAnimation=false)
static QStringList expandComponentsPartially(const QString &value, QMetaType mt)
static void writeNodeProperties(const QSSGSceneDesc::Node &node, OutputContext &output)
static std::pair< QString, QString > copyTextureAsset(const QUrl &texturePath, OutputContext &output)
static std::pair< QString, QString > meshAssetName(const QSSGSceneDesc::Scene &scene, const QSSGSceneDesc::Mesh &meshNode, const QDir &outdir)
static const char * getQmlElementName(const QSSGSceneDesc::Node &node)
const char * qmlElementName< QSSGSceneDesc::Skeleton::RuntimeType::Skeleton >()
static const char * typeNames[]
static const char * indent()
QString getAnimationSourceName(const QString &id, const QString &property, qsizetype index)
const char * qmlElementName< QSSGSceneDesc::Joint::RuntimeType::Joint >()
static constexpr QByteArrayView qml_basic_types[]
const char * qmlElementName< QSSGSceneDesc::Texture::RuntimeType::Image2D >()
static void writeQmlForResourceNode(const QSSGSceneDesc::Node &node, OutputContext &output)
QString qmlComponentName(const QString &name)
const char * qmlElementName< QSSGSceneDesc::Material::RuntimeType::SpecularGlossyMaterial >()
QString getTextureSourceName(const QString &name, const QString &fmt)
const char * qmlElementName< QSSGSceneDesc::Node::RuntimeType::MorphTarget >()
void writeQmlForAnimation(const QSSGSceneDesc::Animation &anim, qsizetype index, OutputContext &output, bool useBinaryKeyframes=true)
const char * qmlElementName< QSSGSceneDesc::Material::RuntimeType::OrthographicCamera >()
const char * qmlElementName< QSSGSceneDesc::Camera::RuntimeType::DirectionalLight >()
const char * qmlElementName< QSSGSceneDesc::Texture::RuntimeType::ImageCube >()
static QString indentString(OutputContext &output)
QString sanitizeQmlSourcePath(const QString &source, bool removeParentDirectory)
static void writeQmlForNode(const QSSGSceneDesc::Node &node, OutputContext &output)
Combined button and popup list for selecting options.
static const QCssKnownValue properties[NumProperties - 1]
static int writeProperty(QObject *obj, const QByteArray &property_name, QVariant value, int propFlags=QDBusConnection::ExportAllProperties)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
constexpr const T & qMin(const T &a, const T &b)
constexpr const T & qMax(const T &a, const T &b)
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLuint GLsizei const GLchar * message
GLsizei GLsizei GLchar * source
GLuint GLenum GLenum transform
GLsizei const GLchar *const  * path
#define QSSG_ASSERT(cond, action)
QLatin1StringView QLatin1String
#define QStringLiteral(str)
static bool match(const uchar *found, uint foundLen, const char *target, uint targetLen)
unsigned long long quint64
QVideoFrameFormat::PixelFormat fmt
QT_BEGIN_NAMESPACE typedef uchar * output
QSqlQueryModel * model
[16]
QFileInfo fi("c:/temp/foo")
[newstuff]
QTextStream out(stdout)
[7]
QUrl url("example.com")
[constructor-url-reference]
obj metaObject() -> className()
\inmodule QtCore \reentrant
@ DesignStudioWorkarounds
QSSGQmlScopedIndent(OutputContext &out)
QStringList expandedProperties
static Q_REQUIRED_RESULT constexpr bool isTexture(Type type) Q_DECL_NOTHROW
static Q_REQUIRED_RESULT constexpr bool isResource(Type type) Q_DECL_NOTHROW
QSSGRenderGraphObject::Type RuntimeType
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent