This commit is contained in:
rattatwinko
2025-05-25 20:42:58 +02:00
commit 8e9b2568b2
4902 changed files with 1152638 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
# Automatically generated configuration for PyQt5.QtQml.
sip-version = "6.8.6"
sip-abi-version = "12.15"
module-tags = ["Qt_5_15_14", "WS_X11"]
module-disabled-features = []

View File

@@ -0,0 +1,72 @@
// QtQmlmod.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%Module(name=PyQt5.QtQml, keyword_arguments="Optional", use_limited_api=True)
%Import QtCore/QtCoremod.sip
%Import QtNetwork/QtNetworkmod.sip
%Copying
Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
This file is part of PyQt5.
This file may be used under the terms of the GNU General Public License
version 3.0 as published by the Free Software Foundation and appearing in
the file LICENSE included in the packaging of this file. Please review the
following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you do not wish to use this file under the terms of the GPL version 3.0
then you may purchase a commercial license. For more information contact
info@riverbankcomputing.com.
This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%End
%DefaultSupertype sip.simplewrapper
%Include qqml.sip
%Include qjsengine.sip
%Include qjsvalue.sip
%Include qjsvalueiterator.sip
%Include qqmlabstracturlinterceptor.sip
%Include qqmlapplicationengine.sip
%Include qqmlcomponent.sip
%Include qqmlcontext.sip
%Include qqmlengine.sip
%Include qqmlerror.sip
%Include qqmlexpression.sip
%Include qqmlextensionplugin.sip
%Include qqmlfileselector.sip
%Include qqmlincubator.sip
%Include qqmllist.sip
%Include qqmlnetworkaccessmanagerfactory.sip
%Include qqmlparserstatus.sip
%Include qqmlproperty.sip
%Include qqmlpropertymap.sip
%Include qqmlpropertyvaluesource.sip
%Include qqmlscriptstring.sip
%Include qmlattachedpropertiesobject.sip
%Include qpyqmllistproperty.sip
%Include qmlregistertype.sip

View File

@@ -0,0 +1,159 @@
// qjsengine.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%ModuleCode
#include <qjsengine.h>
%End
class QJSEngine : public QObject
{
%TypeHeaderCode
#include <qjsengine.h>
%End
%ConvertToSubClassCode
static struct class_graph {
const char *name;
sipTypeDef **type;
int yes, no;
} graph[] = {
{sipName_QJSEngine, &sipType_QJSEngine, 8, 1},
{sipName_QQmlComponent, &sipType_QQmlComponent, -1, 2},
{sipName_QQmlContext, &sipType_QQmlContext, -1, 3},
#if QT_VERSION >= 0x050f00
{sipName_QQmlEngineExtensionPlugin, &sipType_QQmlEngineExtensionPlugin, -1, 4},
#else
{0, 0, -1, 4},
#endif
{sipName_QQmlExpression, &sipType_QQmlExpression, -1, 5},
{sipName_QQmlExtensionPlugin, &sipType_QQmlExtensionPlugin, -1, 6},
#if QT_VERSION >= 0x050200
{sipName_QQmlFileSelector, &sipType_QQmlFileSelector, -1, 7},
#else
{0, 0, -1, 7},
#endif
{sipName_QQmlPropertyMap, &sipType_QQmlPropertyMap, -1, -1},
{sipName_QQmlEngine, &sipType_QQmlEngine, 9, -1},
#if QT_VERSION >= 0x050100
{sipName_QQmlApplicationEngine, &sipType_QQmlApplicationEngine, -1, -1},
#else
{0, 0, -1, -1},
#endif
};
int i = 0;
sipType = NULL;
do
{
struct class_graph *cg = &graph[i];
if (cg->name != NULL && sipCpp->inherits(cg->name))
{
sipType = *cg->type;
i = cg->yes;
}
else
i = cg->no;
}
while (i >= 0);
%End
public:
QJSEngine();
explicit QJSEngine(QObject *parent /TransferThis/);
virtual ~QJSEngine();
QJSValue globalObject() const;
QJSValue evaluate(const QString &program, const QString &fileName = QString(), int lineNumber = 1) /ReleaseGIL/;
QJSValue newObject();
QJSValue newArray(uint length = 0);
QJSValue newQObject(QObject *object /Transfer/);
void collectGarbage();
%If (Qt_5_4_0 -)
void installTranslatorFunctions(const QJSValue &object = QJSValue());
%End
%If (Qt_5_6_0 -)
enum Extension
{
TranslationExtension,
ConsoleExtension,
GarbageCollectionExtension,
AllExtensions,
};
%End
%If (Qt_5_6_0 -)
typedef QFlags<QJSEngine::Extension> Extensions;
%End
%If (Qt_5_6_0 -)
void installExtensions(QJSEngine::Extensions extensions, const QJSValue &object = QJSValue());
%End
%If (Qt_5_8_0 -)
QJSValue newQMetaObject(const QMetaObject *metaObject);
%End
%If (Qt_5_12_0 -)
QJSValue importModule(const QString &fileName);
%End
%If (Qt_5_12_0 -)
QJSValue newErrorObject(QJSValue::ErrorType errorType, const QString &message = QString());
%End
%If (Qt_5_12_0 -)
void throwError(const QString &message);
%End
%If (Qt_5_12_0 -)
void throwError(QJSValue::ErrorType errorType, const QString &message = QString());
%End
%If (Qt_5_14_0 -)
void setInterrupted(bool interrupted);
%End
%If (Qt_5_14_0 -)
bool isInterrupted() const;
%End
%If (Qt_5_15_0 -)
QString uiLanguage() const;
%End
%If (Qt_5_15_0 -)
void setUiLanguage(const QString &language);
%End
signals:
%If (Qt_5_15_0 -)
void uiLanguageChanged();
%End
};
%If (Qt_5_5_0 -)
QJSEngine *qjsEngine(const QObject *);
%End
%If (Qt_5_6_0 -)
QFlags<QJSEngine::Extension> operator|(QJSEngine::Extension f1, QFlags<QJSEngine::Extension> f2);
%End
%ModuleHeaderCode
#include "qpyqml_api.h"
%End
%PostInitialisationCode
qpyqml_post_init(sipModuleDict);
%End

View File

@@ -0,0 +1,100 @@
// qjsvalue.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
typedef QList<QJSValue> QJSValueList;
class QJSValue /TypeHintIn="Union[QJSValue, QJSValue.SpecialValue, bool, int, float, QString]"/
{
%TypeHeaderCode
#include <qjsvalue.h>
%End
%ConvertToTypeCode
if (!sipIsErr)
return qpyqml_canConvertTo_QJSValue(sipPy);
return qpyqml_convertTo_QJSValue(sipPy, sipTransferObj, sipCppPtr, sipIsErr);
%End
public:
enum SpecialValue
{
NullValue,
UndefinedValue,
};
QJSValue(QJSValue::SpecialValue value /Constrained/ = QJSValue::UndefinedValue);
QJSValue(const QJSValue &other);
~QJSValue();
bool isBool() const;
bool isNumber() const;
bool isNull() const;
bool isString() const;
bool isUndefined() const;
bool isVariant() const;
bool isQObject() const;
bool isObject() const;
bool isDate() const;
bool isRegExp() const;
bool isArray() const;
bool isError() const;
QString toString() const;
double toNumber() const;
qint32 toInt() const;
quint32 toUInt() const;
bool toBool() const;
QVariant toVariant() const;
QObject *toQObject() const;
QDateTime toDateTime() const;
bool equals(const QJSValue &other) const;
bool strictlyEquals(const QJSValue &other) const;
QJSValue prototype() const;
void setPrototype(const QJSValue &prototype);
QJSValue property(const QString &name) const;
void setProperty(const QString &name, const QJSValue &value);
bool hasProperty(const QString &name) const;
bool hasOwnProperty(const QString &name) const;
QJSValue property(quint32 arrayIndex) const;
void setProperty(quint32 arrayIndex, const QJSValue &value);
bool deleteProperty(const QString &name);
bool isCallable() const;
QJSValue call(const QJSValueList &args = QJSValueList());
QJSValue callWithInstance(const QJSValue &instance, const QJSValueList &args = QJSValueList());
QJSValue callAsConstructor(const QJSValueList &args = QJSValueList());
%If (Qt_5_12_0 -)
enum ErrorType
{
GenericError,
EvalError,
RangeError,
ReferenceError,
SyntaxError,
TypeError,
URIError,
};
%End
%If (Qt_5_12_0 -)
QJSValue::ErrorType errorType() const;
%End
};

View File

@@ -0,0 +1,39 @@
// qjsvalueiterator.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QJSValueIterator
{
%TypeHeaderCode
#include <qjsvalueiterator.h>
%End
public:
QJSValueIterator(const QJSValue &value);
~QJSValueIterator();
bool hasNext() const;
bool next();
QString name() const;
QJSValue value() const;
private:
QJSValueIterator(const QJSValueIterator &);
};

View File

@@ -0,0 +1,46 @@
// This is the SIP specification of the qmlAttachedPropertiesObject() function.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%ModuleHeaderCode
#include <qqml.h>
%End
QObject *qmlAttachedPropertiesObject(SIP_PYTYPE, QObject *object,
bool create = true);
%MethodCode
QObject *proxy = qpyqml_find_proxy_for(a1);
if (!proxy)
{
sipError = sipErrorFail;
}
else
{
static QHash<PyTypeObject *, int> cache;
int idx = cache.value((PyTypeObject *)a0, -1);
const QMetaObject *mo = pyqt5_qtqml_get_qmetaobject((PyTypeObject *)a0);
sipRes = qmlAttachedPropertiesObject(&idx, proxy, mo, a2);
cache.insert((PyTypeObject *)a0, idx);
}
%End

View File

@@ -0,0 +1,102 @@
// This is the SIP specification of the qmlRegisterType() function.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%ModuleHeaderCode
#include <qpyqml_api.h>
%End
%ModuleCode
// Imports from QtCore.
pyqt5_qtqml_get_qmetaobject_t pyqt5_qtqml_get_qmetaobject;
%End
%PostInitialisationCode
// Imports from QtCore.
pyqt5_qtqml_get_qmetaobject = (pyqt5_qtqml_get_qmetaobject_t)sipImportSymbol(
"pyqt5_get_qmetaobject");
Q_ASSERT(pyqt5_qtqml_get_qmetaobject);
%End
int qmlRegisterRevision(SIP_PYTYPE, int revision, const char *uri, int major,
int minor, SIP_PYTYPE attachedProperties = 0);
%MethodCode
if ((sipRes = qpyqml_register_library_type((PyTypeObject *)a0, a2, a3, a4, 0, a1, (PyTypeObject *)a5)) < 0)
sipError = sipErrorFail;
%End
%If (Qt_5_2_0 -)
int qmlRegisterSingletonType(const QUrl &url, const char *uri, int major,
int minor, const char *qmlName);
%End
int qmlRegisterSingletonType(SIP_PYTYPE, const char *uri, int major, int minor,
const char *typeName, SIP_PYCALLABLE factory /TypeHint="Callable[[QQmlEngine, QJSEngine], Any]"/);
%MethodCode
if ((sipRes = qpyqml_register_singleton_type((PyTypeObject *)a0, a1, a2, a3, a4, a5)) < 0)
sipError = sipErrorFail;
%End
int qmlRegisterType(const QUrl &url, const char *uri, int major, int minor,
const char *qmlName);
int qmlRegisterType(SIP_PYTYPE, SIP_PYTYPE attachedProperties = 0);
%MethodCode
if ((sipRes = qpyqml_register_type((PyTypeObject *)a0, (PyTypeObject *)a1)) < 0)
sipError = sipErrorFail;
%End
int qmlRegisterType(SIP_PYTYPE, const char *uri, int major, int minor,
const char *qmlName, SIP_PYTYPE attachedProperties = 0);
%MethodCode
if ((sipRes = qpyqml_register_library_type((PyTypeObject *)a0, a1, a2, a3, a4, -1, (PyTypeObject *)a5)) < 0)
sipError = sipErrorFail;
%End
int qmlRegisterType(SIP_PYTYPE, int revision, const char *uri, int major,
int minor, const char *qmlName, SIP_PYTYPE attachedProperties = 0);
%MethodCode
if ((sipRes = qpyqml_register_library_type((PyTypeObject *)a0, a2, a3, a4, a5, a1, (PyTypeObject *)a6)) < 0)
sipError = sipErrorFail;
%End
int qmlRegisterUncreatableType(SIP_PYTYPE, const char *uri, int major,
int minor, const char *qmlName, const QString &reason);
%MethodCode
if ((sipRes = qpyqml_register_uncreatable_type((PyTypeObject *)a0, a1, a2, a3, a4, *a5, -1)) < 0)
sipError = sipErrorFail;
%End
int qmlRegisterUncreatableType(SIP_PYTYPE, int revision, const char *uri,
int major, int minor, const char *qmlName, const QString &reason);
%MethodCode
if ((sipRes = qpyqml_register_uncreatable_type((PyTypeObject *)a0, a2, a3, a4, a5, *a6, a1)) < 0)
sipError = sipErrorFail;
%End

View File

@@ -0,0 +1,40 @@
// This is the SIP specification of the QQmlListProperty mapped type.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%MappedType QQmlListProperty<QObject> /TypeHint="QQmlListProperty"/
{
%TypeHeaderCode
#include "qpyqmllistpropertywrapper.h"
%End
%ConvertFromTypeCode
return qpyqml_QQmlListPropertyWrapper_New(sipCpp, 0);
%End
%ConvertToTypeCode
if (sipIsErr == NULL)
return PyObject_IsInstance(sipPy, (PyObject *)qpyqml_QQmlListPropertyWrapper_TypeObject);
*sipCppPtr = ((qpyqml_QQmlListPropertyWrapper *)sipPy)->qml_list_property;
// It isn't a temporary copy.
return 0;
%End
};

View File

@@ -0,0 +1,30 @@
// qqml.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%ModuleCode
#include <qqml.h>
%End
void qmlClearTypeRegistrations();
%If (Qt_5_12_0 -)
int qmlTypeId(const char *uri, int versionMajor, int versionMinor, const char *qmlName);
%End

View File

@@ -0,0 +1,45 @@
// qqmlabstracturlinterceptor.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%If (Qt_5_2_0 -)
class QQmlAbstractUrlInterceptor
{
%TypeHeaderCode
#include <qqmlabstracturlinterceptor.h>
%End
public:
enum DataType
{
QmlFile,
JavaScriptFile,
QmldirFile,
UrlString,
};
QQmlAbstractUrlInterceptor();
virtual ~QQmlAbstractUrlInterceptor();
virtual QUrl intercept(const QUrl &path, QQmlAbstractUrlInterceptor::DataType type) = 0;
};
%End

View File

@@ -0,0 +1,57 @@
// qqmlapplicationengine.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%If (Qt_5_1_0 -)
class QQmlApplicationEngine : public QQmlEngine
{
%TypeHeaderCode
#include <qqmlapplicationengine.h>
%End
public:
QQmlApplicationEngine(QObject *parent /TransferThis/ = 0);
QQmlApplicationEngine(const QUrl &url, QObject *parent /TransferThis/ = 0) /ReleaseGIL/;
QQmlApplicationEngine(const QString &filePath, QObject *parent /TransferThis/ = 0) /ReleaseGIL/;
virtual ~QQmlApplicationEngine();
%If (Qt_5_9_0 -)
QList<QObject *> rootObjects() const;
%End
%If (- Qt_5_9_0)
%If (Qt_5_15_0 -)
QList<QObject *> rootObjects();
%End
%End
public slots:
void load(const QUrl &url) /ReleaseGIL/;
void load(const QString &filePath) /ReleaseGIL/;
void loadData(const QByteArray &data, const QUrl &url = QUrl()) /ReleaseGIL/;
%If (Qt_5_14_0 -)
void setInitialProperties(const QVariantMap &initialProperties);
%End
signals:
void objectCreated(QObject *object, const QUrl &url);
};
%End

View File

@@ -0,0 +1,85 @@
// qqmlcomponent.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlComponent : public QObject
{
%TypeHeaderCode
#include <qqmlcomponent.h>
%End
public:
enum CompilationMode
{
PreferSynchronous,
Asynchronous,
};
QQmlComponent(QQmlEngine *, QObject *parent /TransferThis/ = 0);
QQmlComponent(QQmlEngine *, const QString &fileName, QObject *parent /TransferThis/ = 0) /ReleaseGIL/;
QQmlComponent(QQmlEngine *, const QString &fileName, QQmlComponent::CompilationMode mode, QObject *parent /TransferThis/ = 0) /ReleaseGIL/;
QQmlComponent(QQmlEngine *, const QUrl &url, QObject *parent /TransferThis/ = 0) /ReleaseGIL/;
QQmlComponent(QQmlEngine *, const QUrl &url, QQmlComponent::CompilationMode mode, QObject *parent /TransferThis/ = 0) /ReleaseGIL/;
QQmlComponent(QObject *parent /TransferThis/ = 0);
virtual ~QQmlComponent();
enum Status
{
Null,
Ready,
Loading,
Error,
};
QQmlComponent::Status status() const;
bool isNull() const;
bool isReady() const;
bool isError() const;
bool isLoading() const;
QList<QQmlError> errors() const;
qreal progress() const;
QUrl url() const;
virtual QObject *create(QQmlContext *context = 0) /TransferBack/;
%If (Qt_5_14_0 -)
QObject *createWithInitialProperties(const QVariantMap &initialProperties, QQmlContext *context = 0) /TransferBack/;
%End
virtual QObject *beginCreate(QQmlContext *) /TransferBack/;
virtual void completeCreate();
void create(QQmlIncubator &, QQmlContext *context = 0, QQmlContext *forContext = 0);
QQmlContext *creationContext() const;
public slots:
void loadUrl(const QUrl &url) /ReleaseGIL/;
void loadUrl(const QUrl &url, QQmlComponent::CompilationMode mode) /ReleaseGIL/;
void setData(const QByteArray &, const QUrl &baseUrl);
signals:
void statusChanged(QQmlComponent::Status);
void progressChanged(qreal);
public:
%If (Qt_5_12_0 -)
QQmlEngine *engine() const;
%End
%If (Qt_5_14_0 -)
void setInitialProperties(QObject *component, const QVariantMap &properties);
%End
};

View File

@@ -0,0 +1,61 @@
// qqmlcontext.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlContext : public QObject
{
%TypeHeaderCode
#include <qqmlcontext.h>
%End
public:
QQmlContext(QQmlEngine *engine, QObject *parent /TransferThis/ = 0);
QQmlContext(QQmlContext *parentContext, QObject *parent /TransferThis/ = 0);
virtual ~QQmlContext();
bool isValid() const;
QQmlEngine *engine() const;
QQmlContext *parentContext() const;
QObject *contextObject() const;
void setContextObject(QObject *);
QVariant contextProperty(const QString &) const;
void setContextProperty(const QString &, QObject *);
void setContextProperty(const QString &, const QVariant &);
QString nameForObject(QObject *) const;
QUrl resolvedUrl(const QUrl &);
void setBaseUrl(const QUrl &);
QUrl baseUrl() const;
%If (Qt_5_11_0 -)
struct PropertyPair
{
%TypeHeaderCode
#include <qqmlcontext.h>
%End
QString name;
QVariant value;
};
%End
%If (Qt_5_11_0 -)
void setContextProperties(const QVector<QQmlContext::PropertyPair> &properties);
%End
};

View File

@@ -0,0 +1,193 @@
// qqmlengine.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlImageProviderBase /Supertype=sip.wrapper/
{
%TypeHeaderCode
#include <qqmlengine.h>
%End
public:
enum ImageType
{
Image,
Pixmap,
Texture,
%If (Qt_5_6_0 -)
ImageResponse,
%End
};
enum Flag
{
ForceAsynchronousImageLoading,
};
typedef QFlags<QQmlImageProviderBase::Flag> Flags;
virtual ~QQmlImageProviderBase();
virtual QQmlImageProviderBase::ImageType imageType() const = 0;
virtual QQmlImageProviderBase::Flags flags() const = 0;
private:
QQmlImageProviderBase();
};
QFlags<QQmlImageProviderBase::Flag> operator|(QQmlImageProviderBase::Flag f1, QFlags<QQmlImageProviderBase::Flag> f2);
class QQmlEngine : public QJSEngine
{
%TypeHeaderCode
#include <qqmlengine.h>
%End
public:
%If (Qt_5_6_1 -)
explicit QQmlEngine(QObject *parent /TransferThis/ = 0);
%End
%If (- Qt_5_6_1)
QQmlEngine(QObject *parent /TransferThis/ = 0);
%End
virtual ~QQmlEngine();
QQmlContext *rootContext() const;
void clearComponentCache();
void trimComponentCache();
QStringList importPathList() const;
void setImportPathList(const QStringList &paths);
void addImportPath(const QString &dir);
QStringList pluginPathList() const;
void setPluginPathList(const QStringList &paths);
void addPluginPath(const QString &dir);
bool addNamedBundle(const QString &name, const QString &fileName);
bool importPlugin(const QString &filePath, const QString &uri, QList<QQmlError> *errors /GetWrapper/);
%MethodCode
int orig_size = (a2 ? a2->size() : 0);
sipRes = sipCpp->importPlugin(*a0, *a1, a2);
if (a2)
{
for (int i = a2->size(); i > orig_size; --i)
{
QQmlError *new_error = new QQmlError(a2->at(i - orig_size - 1));
PyObject *new_error_obj = sipConvertFromNewType(new_error, sipType_QQmlError, 0);
if (!new_error_obj)
{
delete new_error;
sipError = sipErrorFail;
break;
}
if (PyList_Insert(a2Wrapper, 0, new_error_obj) < 0)
{
Py_DECREF(new_error_obj);
sipError = sipErrorFail;
break;
}
Py_DECREF(new_error_obj);
}
}
%End
void setNetworkAccessManagerFactory(QQmlNetworkAccessManagerFactory * /KeepReference/);
QQmlNetworkAccessManagerFactory *networkAccessManagerFactory() const;
QNetworkAccessManager *networkAccessManager() const;
void addImageProvider(const QString &id, QQmlImageProviderBase * /Transfer/);
QQmlImageProviderBase *imageProvider(const QString &id) const;
void removeImageProvider(const QString &id);
void setIncubationController(QQmlIncubationController * /KeepReference/);
QQmlIncubationController *incubationController() const;
void setOfflineStoragePath(const QString &dir);
QString offlineStoragePath() const;
QUrl baseUrl() const;
void setBaseUrl(const QUrl &);
bool outputWarningsToStandardError() const;
void setOutputWarningsToStandardError(bool);
static QQmlContext *contextForObject(const QObject *);
static void setContextForObject(QObject *, QQmlContext *);
enum ObjectOwnership
{
CppOwnership,
JavaScriptOwnership,
};
static void setObjectOwnership(QObject * /GetWrapper/, QQmlEngine::ObjectOwnership);
%MethodCode
QQmlEngine::ObjectOwnership old = QQmlEngine::objectOwnership(a0);
QQmlEngine::setObjectOwnership(a0, a1);
if (old != a1 && !a0->parent())
{
if (old == QQmlEngine::CppOwnership)
sipTransferTo(a0Wrapper, Py_None);
else
sipTransferBack(a0Wrapper);
}
%End
static QQmlEngine::ObjectOwnership objectOwnership(QObject *);
protected:
virtual bool event(QEvent *);
signals:
void quit();
void warnings(const QList<QQmlError> &warnings);
%If (Qt_5_8_0 -)
void exit(int retCode);
%End
public:
%If (Qt_5_9_0 -)
QString offlineStorageDatabaseFilePath(const QString &databaseName) const;
%End
public slots:
%If (Qt_5_10_0 -)
void retranslate();
%End
public:
%If (Qt_5_12_0 -)
SIP_PYOBJECT singletonInstance(int qmlTypeId) /TypeHint="QObject"/;
%MethodCode
QJSValue instance = sipCpp->singletonInstance<QJSValue>(a0);
if (instance.isQObject())
{
sipRes = sipConvertFromType(instance.toQObject(), sipType_QObject, NULL);
if (!sipRes)
sipError = sipErrorFail;
}
else
{
sipRes = Py_None;
Py_INCREF(sipRes);
}
%End
%End
};

View File

@@ -0,0 +1,55 @@
// qqmlerror.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlError
{
%TypeHeaderCode
#include <qqmlerror.h>
%End
public:
QQmlError();
QQmlError(const QQmlError &);
~QQmlError();
bool isValid() const;
QUrl url() const;
void setUrl(const QUrl &);
QString description() const;
void setDescription(const QString &);
int line() const;
void setLine(int);
int column() const;
void setColumn(int);
QString toString() const;
%If (Qt_5_2_0 -)
QObject *object() const;
%End
%If (Qt_5_2_0 -)
void setObject(QObject *);
%End
%If (Qt_5_9_0 -)
QtMsgType messageType() const;
%End
%If (Qt_5_9_0 -)
void setMessageType(QtMsgType messageType);
%End
};

View File

@@ -0,0 +1,52 @@
// qqmlexpression.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlExpression : public QObject
{
%TypeHeaderCode
#include <qqmlexpression.h>
%End
public:
QQmlExpression();
QQmlExpression(QQmlContext *, QObject *, const QString &, QObject *parent /TransferThis/ = 0);
QQmlExpression(const QQmlScriptString &, QQmlContext *context = 0, QObject *scope = 0, QObject *parent /TransferThis/ = 0);
virtual ~QQmlExpression();
QQmlEngine *engine() const;
QQmlContext *context() const;
QString expression() const;
void setExpression(const QString &);
bool notifyOnValueChanged() const;
void setNotifyOnValueChanged(bool);
QString sourceFile() const;
int lineNumber() const;
int columnNumber() const;
void setSourceLocation(const QString &fileName, int line, int column = 0);
QObject *scopeObject() const;
bool hasError() const;
void clearError();
QQmlError error() const;
QVariant evaluate(bool *valueIsUndefined = 0) /ReleaseGIL/;
signals:
void valueChanged();
};

View File

@@ -0,0 +1,53 @@
// qqmlextensionplugin.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlExtensionPlugin : QObject
{
%TypeHeaderCode
#include <qqmlextensionplugin.h>
%End
public:
explicit QQmlExtensionPlugin(QObject *parent /TransferThis/ = 0);
virtual ~QQmlExtensionPlugin();
virtual void registerTypes(const char *uri) = 0;
virtual void initializeEngine(QQmlEngine *engine, const char *uri);
%If (Qt_5_1_0 -)
QUrl baseUrl() const;
%End
};
%If (Qt_5_15_0 -)
class QQmlEngineExtensionPlugin : QObject
{
%TypeHeaderCode
#include <qqmlextensionplugin.h>
%End
public:
explicit QQmlEngineExtensionPlugin(QObject *parent /TransferThis/ = 0);
virtual ~QQmlEngineExtensionPlugin();
virtual void initializeEngine(QQmlEngine *engine, const char *uri);
};
%End

View File

@@ -0,0 +1,47 @@
// qqmlfileselector.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%If (Qt_5_2_0 -)
class QQmlFileSelector : public QObject
{
%TypeHeaderCode
#include <qqmlfileselector.h>
%End
public:
QQmlFileSelector(QQmlEngine *engine, QObject *parent /TransferThis/ = 0);
virtual ~QQmlFileSelector();
void setSelector(QFileSelector *selector);
%If (Qt_5_4_0 -)
void setExtraSelectors(const QStringList &strings);
%End
%If (- Qt_5_4_0)
void setExtraSelectors(QStringList &strings);
%End
static QQmlFileSelector *get(QQmlEngine *);
%If (Qt_5_7_0 -)
QFileSelector *selector() const;
%End
};
%End

View File

@@ -0,0 +1,87 @@
// qqmlincubator.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlIncubator
{
%TypeHeaderCode
#include <qqmlincubator.h>
%End
public:
enum IncubationMode
{
Asynchronous,
AsynchronousIfNested,
Synchronous,
};
enum Status
{
Null,
Ready,
Loading,
Error,
};
QQmlIncubator(QQmlIncubator::IncubationMode mode = QQmlIncubator::Asynchronous);
virtual ~QQmlIncubator();
void clear();
void forceCompletion();
bool isNull() const;
bool isReady() const;
bool isError() const;
bool isLoading() const;
QList<QQmlError> errors() const;
QQmlIncubator::IncubationMode incubationMode() const;
QQmlIncubator::Status status() const;
QObject *object() const /Factory/;
%If (Qt_5_15_0 -)
void setInitialProperties(const QVariantMap &initialProperties);
%End
protected:
virtual void statusChanged(QQmlIncubator::Status);
virtual void setInitialState(QObject *);
private:
QQmlIncubator(const QQmlIncubator &);
};
class QQmlIncubationController
{
%TypeHeaderCode
#include <qqmlincubator.h>
%End
public:
QQmlIncubationController();
virtual ~QQmlIncubationController();
QQmlEngine *engine() const;
int incubatingObjectCount() const;
void incubateFor(int msecs) /ReleaseGIL/;
protected:
virtual void incubatingObjectCountChanged(int);
private:
QQmlIncubationController(const QQmlIncubationController &);
};

View File

@@ -0,0 +1,59 @@
// qqmllist.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlListReference
{
%TypeHeaderCode
#include <qqmllist.h>
%End
public:
QQmlListReference();
QQmlListReference(QObject *, const char *property, QQmlEngine *engine = 0);
QQmlListReference(const QQmlListReference &);
~QQmlListReference();
bool isValid() const;
QObject *object() const;
const QMetaObject *listElementType() const;
bool canAppend() const;
bool canAt() const;
bool canClear() const;
bool canCount() const;
bool isManipulable() const;
bool isReadable() const;
bool append(QObject *) const;
QObject *at(int) const;
bool clear() const;
int count() const;
%If (Qt_5_15_0 -)
bool canReplace() const;
%End
%If (Qt_5_15_0 -)
bool canRemoveLast() const;
%End
%If (Qt_5_15_0 -)
bool replace(int, QObject *) const;
%End
%If (Qt_5_15_0 -)
bool removeLast() const;
%End
};

View File

@@ -0,0 +1,32 @@
// qqmlnetworkaccessmanagerfactory.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlNetworkAccessManagerFactory
{
%TypeHeaderCode
#include <qqmlnetworkaccessmanagerfactory.h>
%End
public:
virtual ~QQmlNetworkAccessManagerFactory();
virtual QNetworkAccessManager *create(QObject *parent) = 0;
};

View File

@@ -0,0 +1,34 @@
// qqmlparserstatus.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlParserStatus /Mixin,PyQtInterface="org.qt-project.Qt.QQmlParserStatus"/
{
%TypeHeaderCode
#include <qqmlparserstatus.h>
%End
public:
QQmlParserStatus();
virtual ~QQmlParserStatus();
virtual void classBegin() = 0;
virtual void componentComplete() = 0;
};

View File

@@ -0,0 +1,121 @@
// qqmlproperty.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlProperty
{
%TypeHeaderCode
#include <qqmlproperty.h>
%End
public:
enum PropertyTypeCategory
{
InvalidCategory,
List,
Object,
Normal,
};
enum Type
{
Invalid,
Property,
SignalProperty,
};
QQmlProperty();
QQmlProperty(QObject *);
QQmlProperty(QObject *, QQmlContext *);
QQmlProperty(QObject *, QQmlEngine *);
QQmlProperty(QObject *, const QString &);
QQmlProperty(QObject *, const QString &, QQmlContext *);
QQmlProperty(QObject *, const QString &, QQmlEngine *);
QQmlProperty(const QQmlProperty &);
~QQmlProperty();
long __hash__() const;
%MethodCode
sipRes = qHash(*sipCpp);
%End
bool operator==(const QQmlProperty &) const;
QQmlProperty::Type type() const;
bool isValid() const;
bool isProperty() const;
bool isSignalProperty() const;
int propertyType() const;
QQmlProperty::PropertyTypeCategory propertyTypeCategory() const;
const char *propertyTypeName() const;
QString name() const;
QVariant read() const;
static QVariant read(const QObject *, const QString &);
static QVariant read(const QObject *, const QString &, QQmlContext *);
static QVariant read(const QObject *, const QString &, QQmlEngine *);
bool write(const QVariant &) const;
static bool write(QObject *, const QString &, const QVariant &);
static bool write(QObject *, const QString &, const QVariant &, QQmlContext *);
static bool write(QObject *, const QString &, const QVariant &, QQmlEngine *);
bool reset() const;
bool hasNotifySignal() const;
bool needsNotifySignal() const;
bool connectNotifySignal(SIP_PYOBJECT slot /TypeHint="PYQT_SLOT"/) const;
%MethodCode
QObject *receiver;
QByteArray slot;
if ((sipError = pyqt5_qtqml_get_connection_parts(a0, 0, "()", false, &receiver, slot)) == sipErrorNone)
{
sipRes = sipCpp->connectNotifySignal(receiver, slot.constData());
}
else if (sipError == sipErrorContinue)
{
sipError = sipBadCallableArg(0, a0);
}
%End
bool connectNotifySignal(QObject *dest, int method) const;
bool isWritable() const;
bool isDesignable() const;
bool isResettable() const;
QObject *object() const;
int index() const;
QMetaProperty property() const;
QMetaMethod method() const;
};
typedef QList<QQmlProperty> QQmlProperties;
%ModuleHeaderCode
// Imports from QtCore.
typedef sipErrorState (*pyqt5_qtqml_get_connection_parts_t)(PyObject *, QObject *, const char *, bool, QObject **, QByteArray &);
extern pyqt5_qtqml_get_connection_parts_t pyqt5_qtqml_get_connection_parts;
%End
%ModuleCode
// Imports from QtCore.
pyqt5_qtqml_get_connection_parts_t pyqt5_qtqml_get_connection_parts;
%End
%PostInitialisationCode
// Imports from QtCore.
pyqt5_qtqml_get_connection_parts = (pyqt5_qtqml_get_connection_parts_t)sipImportSymbol("pyqt5_get_connection_parts");
Q_ASSERT(pyqt5_qtqml_get_connection_parts);
%End

View File

@@ -0,0 +1,47 @@
// qqmlpropertymap.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlPropertyMap : public QObject
{
%TypeHeaderCode
#include <qqmlpropertymap.h>
%End
public:
explicit QQmlPropertyMap(QObject *parent /TransferThis/ = 0);
virtual ~QQmlPropertyMap();
QVariant value(const QString &key) const;
void insert(const QString &key, const QVariant &value);
void clear(const QString &key);
QStringList keys() const;
int count() const;
int size() const /__len__/;
bool isEmpty() const;
bool contains(const QString &key) const;
QVariant operator[](const QString &key) const;
signals:
void valueChanged(const QString &key, const QVariant &value);
protected:
virtual QVariant updateValue(const QString &key, const QVariant &input);
};

View File

@@ -0,0 +1,33 @@
// qqmlpropertyvaluesource.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlPropertyValueSource /Mixin,PyQtInterface="org.qt-project.Qt.QQmlPropertyValueSource"/
{
%TypeHeaderCode
#include <qqmlpropertyvaluesource.h>
%End
public:
QQmlPropertyValueSource();
virtual ~QQmlPropertyValueSource();
virtual void setTarget(const QQmlProperty &) = 0;
};

View File

@@ -0,0 +1,45 @@
// qqmlscriptstring.sip generated by MetaSIP
//
// This file is part of the QtQml Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQmlScriptString
{
%TypeHeaderCode
#include <qqmlscriptstring.h>
%End
public:
QQmlScriptString();
QQmlScriptString(const QQmlScriptString &);
~QQmlScriptString();
bool isEmpty() const;
bool isUndefinedLiteral() const;
bool isNullLiteral() const;
QString stringLiteral() const;
qreal numberLiteral(bool *ok) const;
bool booleanLiteral(bool *ok) const;
%If (Qt_5_4_0 -)
bool operator==(const QQmlScriptString &) const;
%End
%If (Qt_5_4_0 -)
bool operator!=(const QQmlScriptString &) const;
%End
};