5#ifndef QMLTYPESCREATOR_P_H
6#define QMLTYPESCREATOR_P_H
22#include <QtCore/qstring.h>
23#include <QtCore/qset.h>
32 bool generate(
const QString &outFileName);
34 void setOwnTypes(QList<MetaType> ownTypes) { m_ownTypes = std::move(ownTypes); }
35 void setForeignTypes(QList<MetaType> foreignTypes) { m_foreignTypes = std::move(foreignTypes); }
36 void setReferencedTypes(QList<QAnyStringView> referencedTypes) { m_referencedTypes = std::move(referencedTypes); }
37 void setModule(QByteArray module) { m_module = std::move(module); }
38 void setVersion(QTypeRevision version) { m_version = version; }
39 void setUsingDeclarations(QList<UsingDeclaration> usingDeclarations) { m_usingDeclarations = std::move(usingDeclarations);}
45 void writeType(QAnyStringView type);
46 void writeProperties(
const Property::Container &properties);
47 void writeMethods(
const Method::Container &methods, QLatin1StringView type);
48 void writeEnums(
const Enum::Container &enums);
49 void writeComponents();
50 void writeRootMethods(
const MetaType &classDef);
53 QQmlJSStreamWriter m_qml;
54 QList<MetaType> m_ownTypes;
55 QList<MetaType> m_foreignTypes;
56 QList<QAnyStringView> m_referencedTypes;
57 QList<UsingDeclaration> m_usingDeclarations;
60 bool m_generatingJSRoot =
false;
bool generatePluginTypes(const QString &pluginTypesFile, bool generatingJSRoot=false)
void setModuleNameAndNamespace(const QString &module, const QString &targetNamespace)
static bool argumentsFromCommandLineAndFile(QStringList &allArguments, const QStringList &arguments)
void setIncludes(const QList< QString > &includes)
static int runExtract(const QString &baseName, const QString &nameSpace, const MetaTypesJsonProcessor &processor)
void setTypes(const QList< MetaType > &types, const QList< MetaType > &foreignTypes)
void write(QTextStream &os, QAnyStringView outFileName) const
void setModuleVersions(QTypeRevision moduleVersion, const QList< quint8 > &pastMajorVersions, bool followForeignVersioning)
void setUsingDeclarations(const QList< UsingDeclaration > &usingDeclarations)
void setReferencedTypes(const QList< QAnyStringView > &referencedTypes)
void setGeneratingJSRoot(bool jsroot)
void setUsingDeclarations(QList< UsingDeclaration > usingDeclarations)
void setForeignTypes(QList< MetaType > foreignTypes)
bool generate(const QString &outFileName)
void setModule(QByteArray module)
void setOwnTypes(QList< MetaType > ownTypes)
void setVersion(QTypeRevision version)
void setReferencedTypes(QList< QAnyStringView > referencedTypes)
Combined button and popup list for selecting options.
static QString registrationVarName(const QString &module)
bool operator<(const ExclusiveVersionRange &x, const ExclusiveVersionRange &y)
True if x was removed before y was introduced.
QString conflictingVersionToString(const ExclusiveVersionRange &r)
bool operator==(const ExclusiveVersionRange &x, const ExclusiveVersionRange &y)
True when x and y share a common version.