/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 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.
 */

#include "sipAPIQtQml.h"

#line 30 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtQml/qjsengine.sip"
#include <qjsengine.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQJSEngine.cpp"

#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobject.sip"
#include <qobject.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQJSEngine.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQJSEngine.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtQml/qjsvalue.sip"
#include <qjsvalue.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQJSEngine.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQJSEngine.cpp"
#line 30 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtQml/qjsengine.sip"
#include <qjsengine.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQJSEngine.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 146 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 50 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQJSEngine.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 53 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQJSEngine.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 56 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQJSEngine.cpp"
#line 247 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 59 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQJSEngine.cpp"
#line 235 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 62 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQJSEngine.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 65 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQJSEngine.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 68 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQJSEngine.cpp"
#line 30 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 71 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQJSEngine.cpp"
#line 149 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 74 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQJSEngine.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 77 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQJSEngine.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qthread.sip"
#include <qthread.h>
#line 80 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQJSEngine.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 83 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQJSEngine.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qregexp.sip"
#include <qregexp.h>
#line 86 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQJSEngine.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 89 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQJSEngine.cpp"


class sipQJSEngine : public  ::QJSEngine
{
public:
    sipQJSEngine();
    sipQJSEngine( ::QObject*);
    virtual ~sipQJSEngine();

    int qt_metacall(QMetaObject::Call, int, void **) SIP_OVERRIDE;
    void *qt_metacast(const char *) SIP_OVERRIDE;
    const QMetaObject *metaObject() const SIP_OVERRIDE;

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    bool event( ::QEvent*) SIP_OVERRIDE;
    bool eventFilter( ::QObject*, ::QEvent*) SIP_OVERRIDE;
    void timerEvent( ::QTimerEvent*) SIP_OVERRIDE;
    void childEvent( ::QChildEvent*) SIP_OVERRIDE;
    void customEvent( ::QEvent*) SIP_OVERRIDE;
    void connectNotify(const  ::QMetaMethod&) SIP_OVERRIDE;
    void disconnectNotify(const  ::QMetaMethod&) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipQJSEngine(const sipQJSEngine &);
    sipQJSEngine &operator = (const sipQJSEngine &);

    char sipPyMethods[7];
};

sipQJSEngine::sipQJSEngine():  ::QJSEngine(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQJSEngine::sipQJSEngine( ::QObject*a0):  ::QJSEngine(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQJSEngine::~sipQJSEngine()
{
    sipInstanceDestroyedEx(&sipPySelf);
}

const QMetaObject *sipQJSEngine::metaObject() const
{
    if (sipGetInterpreter())
        return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : sip_QtQml_qt_metaobject(sipPySelf,sipType_QJSEngine);

    return  ::QJSEngine::metaObject();
}

int sipQJSEngine::qt_metacall(QMetaObject::Call _c,int _id,void **_a)
{
    _id =  ::QJSEngine::qt_metacall(_c,_id,_a);

    if (_id >= 0)
    {
        SIP_BLOCK_THREADS
        _id = sip_QtQml_qt_metacall(sipPySelf,sipType_QJSEngine,_c,_id,_a);
        SIP_UNBLOCK_THREADS
    }

    return _id;
}

void *sipQJSEngine::qt_metacast(const char *_clname)
{
    void *sipCpp;

    return (sip_QtQml_qt_metacast(sipPySelf, sipType_QJSEngine, _clname, &sipCpp) ? sipCpp :  ::QJSEngine::qt_metacast(_clname));
}

bool sipQJSEngine::event( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[0], &sipPySelf, SIP_NULLPTR, sipName_event);

    if (!sipMeth)
        return  ::QJSEngine::event(a0);

    extern bool sipVH_QtQml_5(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QEvent*);

    return sipVH_QtQml_5(sipGILState, sipImportedVirtErrorHandlers_QtQml_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQJSEngine::eventFilter( ::QObject*a0, ::QEvent*a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[1], &sipPySelf, SIP_NULLPTR, sipName_eventFilter);

    if (!sipMeth)
        return  ::QJSEngine::eventFilter(a0,a1);

    extern bool sipVH_QtQml_4(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QObject*, ::QEvent*);

    return sipVH_QtQml_4(sipGILState, sipImportedVirtErrorHandlers_QtQml_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}

void sipQJSEngine::timerEvent( ::QTimerEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[2], &sipPySelf, SIP_NULLPTR, sipName_timerEvent);

    if (!sipMeth)
    {
         ::QJSEngine::timerEvent(a0);
        return;
    }

    extern void sipVH_QtQml_3(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QTimerEvent*);

    sipVH_QtQml_3(sipGILState, sipImportedVirtErrorHandlers_QtQml_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQJSEngine::childEvent( ::QChildEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[3], &sipPySelf, SIP_NULLPTR, sipName_childEvent);

    if (!sipMeth)
    {
         ::QJSEngine::childEvent(a0);
        return;
    }

    extern void sipVH_QtQml_2(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QChildEvent*);

    sipVH_QtQml_2(sipGILState, sipImportedVirtErrorHandlers_QtQml_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQJSEngine::customEvent( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[4], &sipPySelf, SIP_NULLPTR, sipName_customEvent);

    if (!sipMeth)
    {
         ::QJSEngine::customEvent(a0);
        return;
    }

    extern void sipVH_QtQml_1(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QEvent*);

    sipVH_QtQml_1(sipGILState, sipImportedVirtErrorHandlers_QtQml_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQJSEngine::connectNotify(const  ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[5], &sipPySelf, SIP_NULLPTR, sipName_connectNotify);

    if (!sipMeth)
    {
         ::QJSEngine::connectNotify(a0);
        return;
    }

    extern void sipVH_QtQml_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMetaMethod&);

    sipVH_QtQml_0(sipGILState, sipImportedVirtErrorHandlers_QtQml_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQJSEngine::disconnectNotify(const  ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[6], &sipPySelf, SIP_NULLPTR, sipName_disconnectNotify);

    if (!sipMeth)
    {
         ::QJSEngine::disconnectNotify(a0);
        return;
    }

    extern void sipVH_QtQml_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMetaMethod&);

    sipVH_QtQml_0(sipGILState, sipImportedVirtErrorHandlers_QtQml_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}


PyDoc_STRVAR(doc_QJSEngine_globalObject, "globalObject(self) -> QJSValue");

extern "C" {static PyObject *meth_QJSEngine_globalObject(PyObject *, PyObject *);}
static PyObject *meth_QJSEngine_globalObject(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QJSEngine *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QJSEngine, &sipCpp))
        {
             ::QJSValue*sipRes;

            sipRes = new  ::QJSValue(sipCpp->globalObject());

            return sipConvertFromNewType(sipRes,sipType_QJSValue,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJSEngine, sipName_globalObject, doc_QJSEngine_globalObject);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJSEngine_evaluate, "evaluate(self, str, fileName: str = '', lineNumber: int = 1) -> QJSValue");

extern "C" {static PyObject *meth_QJSEngine_evaluate(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QJSEngine_evaluate(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QString* a0;
        int a0State = 0;
        const  ::QString& a1def = QString();
        const  ::QString* a1 = &a1def;
        int a1State = 0;
        int a2 = 1;
         ::QJSEngine *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_fileName,
            sipName_lineNumber,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|J1i", &sipSelf, sipType_QJSEngine, &sipCpp, sipType_QString, &a0, &a0State, sipType_QString, &a1, &a1State, &a2))
        {
             ::QJSValue*sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new  ::QJSValue(sipCpp->evaluate(*a0,*a1,a2));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);
            sipReleaseType(const_cast< ::QString *>(a1), sipType_QString, a1State);

            return sipConvertFromNewType(sipRes,sipType_QJSValue,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJSEngine, sipName_evaluate, doc_QJSEngine_evaluate);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJSEngine_newObject, "newObject(self) -> QJSValue");

extern "C" {static PyObject *meth_QJSEngine_newObject(PyObject *, PyObject *);}
static PyObject *meth_QJSEngine_newObject(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QJSEngine *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QJSEngine, &sipCpp))
        {
             ::QJSValue*sipRes;

            sipRes = new  ::QJSValue(sipCpp->newObject());

            return sipConvertFromNewType(sipRes,sipType_QJSValue,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJSEngine, sipName_newObject, doc_QJSEngine_newObject);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJSEngine_newArray, "newArray(self, length: int = 0) -> QJSValue");

extern "C" {static PyObject *meth_QJSEngine_newArray(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QJSEngine_newArray(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::uint a0 = 0;
         ::QJSEngine *sipCpp;

        static const char *sipKwdList[] = {
            sipName_length,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|u", &sipSelf, sipType_QJSEngine, &sipCpp, &a0))
        {
             ::QJSValue*sipRes;

            sipRes = new  ::QJSValue(sipCpp->newArray(a0));

            return sipConvertFromNewType(sipRes,sipType_QJSValue,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJSEngine, sipName_newArray, doc_QJSEngine_newArray);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJSEngine_newQObject, "newQObject(self, QObject) -> QJSValue");

extern "C" {static PyObject *meth_QJSEngine_newQObject(PyObject *, PyObject *);}
static PyObject *meth_QJSEngine_newQObject(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QObject* a0;
         ::QJSEngine *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ:", &sipSelf, sipType_QJSEngine, &sipCpp, sipType_QObject, &a0))
        {
             ::QJSValue*sipRes;

            sipRes = new  ::QJSValue(sipCpp->newQObject(a0));

            return sipConvertFromNewType(sipRes,sipType_QJSValue,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJSEngine, sipName_newQObject, doc_QJSEngine_newQObject);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJSEngine_collectGarbage, "collectGarbage(self)");

extern "C" {static PyObject *meth_QJSEngine_collectGarbage(PyObject *, PyObject *);}
static PyObject *meth_QJSEngine_collectGarbage(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QJSEngine *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QJSEngine, &sipCpp))
        {
            sipCpp->collectGarbage();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QJSEngine, sipName_collectGarbage, doc_QJSEngine_collectGarbage);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJSEngine_installTranslatorFunctions, "installTranslatorFunctions(self, object: Union[QJSValue, QJSValue.SpecialValue, bool, int, float, str] = QJSValue())");

extern "C" {static PyObject *meth_QJSEngine_installTranslatorFunctions(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QJSEngine_installTranslatorFunctions(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QJSValue& a0def = QJSValue();
        const  ::QJSValue* a0 = &a0def;
        int a0State = 0;
         ::QJSEngine *sipCpp;

        static const char *sipKwdList[] = {
            sipName_object,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|J1", &sipSelf, sipType_QJSEngine, &sipCpp, sipType_QJSValue, &a0, &a0State))
        {
            sipCpp->installTranslatorFunctions(*a0);
            sipReleaseType(const_cast< ::QJSValue *>(a0), sipType_QJSValue, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QJSEngine, sipName_installTranslatorFunctions, doc_QJSEngine_installTranslatorFunctions);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJSEngine_installExtensions, "installExtensions(self, Union[QJSEngine.Extensions, QJSEngine.Extension], object: Union[QJSValue, QJSValue.SpecialValue, bool, int, float, str] = QJSValue())");

extern "C" {static PyObject *meth_QJSEngine_installExtensions(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QJSEngine_installExtensions(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QJSEngine::Extensions* a0;
        int a0State = 0;
        const  ::QJSValue& a1def = QJSValue();
        const  ::QJSValue* a1 = &a1def;
        int a1State = 0;
         ::QJSEngine *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_object,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|J1", &sipSelf, sipType_QJSEngine, &sipCpp, sipType_QJSEngine_Extensions, &a0, &a0State, sipType_QJSValue, &a1, &a1State))
        {
            sipCpp->installExtensions(*a0,*a1);
            sipReleaseType(a0, sipType_QJSEngine_Extensions, a0State);
            sipReleaseType(const_cast< ::QJSValue *>(a1), sipType_QJSValue, a1State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QJSEngine, sipName_installExtensions, doc_QJSEngine_installExtensions);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJSEngine_newQMetaObject, "newQMetaObject(self, QMetaObject) -> QJSValue");

extern "C" {static PyObject *meth_QJSEngine_newQMetaObject(PyObject *, PyObject *);}
static PyObject *meth_QJSEngine_newQMetaObject(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QMetaObject* a0;
         ::QJSEngine *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_QJSEngine, &sipCpp, sipType_QMetaObject, &a0))
        {
             ::QJSValue*sipRes;

            sipRes = new  ::QJSValue(sipCpp->newQMetaObject(a0));

            return sipConvertFromNewType(sipRes,sipType_QJSValue,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJSEngine, sipName_newQMetaObject, doc_QJSEngine_newQMetaObject);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJSEngine_importModule, "importModule(self, str) -> QJSValue");

extern "C" {static PyObject *meth_QJSEngine_importModule(PyObject *, PyObject *);}
static PyObject *meth_QJSEngine_importModule(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QString* a0;
        int a0State = 0;
         ::QJSEngine *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QJSEngine, &sipCpp, sipType_QString, &a0, &a0State))
        {
             ::QJSValue*sipRes;

            sipRes = new  ::QJSValue(sipCpp->importModule(*a0));
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            return sipConvertFromNewType(sipRes,sipType_QJSValue,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJSEngine, sipName_importModule, doc_QJSEngine_importModule);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJSEngine_newErrorObject, "newErrorObject(self, QJSValue.ErrorType, message: str = '') -> QJSValue");

extern "C" {static PyObject *meth_QJSEngine_newErrorObject(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QJSEngine_newErrorObject(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QJSValue::ErrorType a0;
        const  ::QString& a1def = QString();
        const  ::QString* a1 = &a1def;
        int a1State = 0;
         ::QJSEngine *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_message,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BE|J1", &sipSelf, sipType_QJSEngine, &sipCpp, sipType_QJSValue_ErrorType, &a0, sipType_QString, &a1, &a1State))
        {
             ::QJSValue*sipRes;

            sipRes = new  ::QJSValue(sipCpp->newErrorObject(a0,*a1));
            sipReleaseType(const_cast< ::QString *>(a1), sipType_QString, a1State);

            return sipConvertFromNewType(sipRes,sipType_QJSValue,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJSEngine, sipName_newErrorObject, doc_QJSEngine_newErrorObject);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJSEngine_throwError, "throwError(self, str)\n"
"throwError(self, QJSValue.ErrorType, message: str = '')");

extern "C" {static PyObject *meth_QJSEngine_throwError(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QJSEngine_throwError(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QString* a0;
        int a0State = 0;
         ::QJSEngine *sipCpp;

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, SIP_NULLPTR, "BJ1", &sipSelf, sipType_QJSEngine, &sipCpp, sipType_QString, &a0, &a0State))
        {
            sipCpp->throwError(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
         ::QJSValue::ErrorType a0;
        const  ::QString& a1def = QString();
        const  ::QString* a1 = &a1def;
        int a1State = 0;
         ::QJSEngine *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_message,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BE|J1", &sipSelf, sipType_QJSEngine, &sipCpp, sipType_QJSValue_ErrorType, &a0, sipType_QString, &a1, &a1State))
        {
            sipCpp->throwError(a0,*a1);
            sipReleaseType(const_cast< ::QString *>(a1), sipType_QString, a1State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QJSEngine, sipName_throwError, doc_QJSEngine_throwError);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJSEngine_setInterrupted, "setInterrupted(self, bool)");

extern "C" {static PyObject *meth_QJSEngine_setInterrupted(PyObject *, PyObject *);}
static PyObject *meth_QJSEngine_setInterrupted(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        bool a0;
         ::QJSEngine *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QJSEngine, &sipCpp, &a0))
        {
            sipCpp->setInterrupted(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QJSEngine, sipName_setInterrupted, doc_QJSEngine_setInterrupted);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJSEngine_isInterrupted, "isInterrupted(self) -> bool");

extern "C" {static PyObject *meth_QJSEngine_isInterrupted(PyObject *, PyObject *);}
static PyObject *meth_QJSEngine_isInterrupted(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QJSEngine *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QJSEngine, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isInterrupted();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJSEngine, sipName_isInterrupted, doc_QJSEngine_isInterrupted);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJSEngine_uiLanguage, "uiLanguage(self) -> str");

extern "C" {static PyObject *meth_QJSEngine_uiLanguage(PyObject *, PyObject *);}
static PyObject *meth_QJSEngine_uiLanguage(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QJSEngine *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QJSEngine, &sipCpp))
        {
             ::QString*sipRes;

            sipRes = new  ::QString(sipCpp->uiLanguage());

            return sipConvertFromNewType(sipRes,sipType_QString,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJSEngine, sipName_uiLanguage, doc_QJSEngine_uiLanguage);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJSEngine_setUiLanguage, "setUiLanguage(self, str)");

extern "C" {static PyObject *meth_QJSEngine_setUiLanguage(PyObject *, PyObject *);}
static PyObject *meth_QJSEngine_setUiLanguage(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QString* a0;
        int a0State = 0;
         ::QJSEngine *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QJSEngine, &sipCpp, sipType_QString, &a0, &a0State))
        {
            sipCpp->setUiLanguage(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QJSEngine, sipName_setUiLanguage, doc_QJSEngine_setUiLanguage);

    return SIP_NULLPTR;
}


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_QJSEngine(void *, const sipTypeDef *);}
static void *cast_QJSEngine(void *sipCppV, const sipTypeDef *targetType)
{
     ::QJSEngine *sipCpp = reinterpret_cast< ::QJSEngine *>(sipCppV);

    if (targetType == sipType_QJSEngine)
        return sipCppV;

    if (targetType == sipType_QObject)
        return static_cast< ::QObject *>(sipCpp);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QJSEngine(void *, int);}
static void release_QJSEngine(void *sipCppV, int)
{
     ::QJSEngine *sipCpp = reinterpret_cast< ::QJSEngine *>(sipCppV);

    if (QThread::currentThread() == sipCpp->thread())
        delete sipCpp;
    else
        sipCpp->deleteLater();
}


extern "C" {static void *array_QJSEngine(Py_ssize_t);}
static void *array_QJSEngine(Py_ssize_t sipNrElem)
{
    return new  ::QJSEngine[sipNrElem];
}


extern "C" {static void array_delete_QJSEngine(void *);}
static void array_delete_QJSEngine(void *sipCpp)
{
    delete[] reinterpret_cast< ::QJSEngine *>(sipCpp);
}


extern "C" {static void dealloc_QJSEngine(sipSimpleWrapper *);}
static void dealloc_QJSEngine(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipQJSEngine *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;

    if (sipIsOwnedByPython(sipSelf))
    {
        release_QJSEngine(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
    }
}


extern "C" {static void *init_type_QJSEngine(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QJSEngine(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **sipOwner, PyObject **sipParseErr)
{
    sipQJSEngine *sipCpp = SIP_NULLPTR;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            sipCpp = new sipQJSEngine();

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
         ::QObject* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "JH", sipType_QObject, &a0, sipOwner))
        {
            sipCpp = new sipQJSEngine(a0);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QJSEngine[] = {{9, 0, 1}};


static PyMethodDef methods_QJSEngine[] = {
    {sipName_collectGarbage, meth_QJSEngine_collectGarbage, METH_VARARGS, doc_QJSEngine_collectGarbage},
    {sipName_evaluate, SIP_MLMETH_CAST(meth_QJSEngine_evaluate), METH_VARARGS|METH_KEYWORDS, doc_QJSEngine_evaluate},
    {sipName_globalObject, meth_QJSEngine_globalObject, METH_VARARGS, doc_QJSEngine_globalObject},
    {sipName_importModule, meth_QJSEngine_importModule, METH_VARARGS, doc_QJSEngine_importModule},
    {sipName_installExtensions, SIP_MLMETH_CAST(meth_QJSEngine_installExtensions), METH_VARARGS|METH_KEYWORDS, doc_QJSEngine_installExtensions},
    {sipName_installTranslatorFunctions, SIP_MLMETH_CAST(meth_QJSEngine_installTranslatorFunctions), METH_VARARGS|METH_KEYWORDS, doc_QJSEngine_installTranslatorFunctions},
    {sipName_isInterrupted, meth_QJSEngine_isInterrupted, METH_VARARGS, doc_QJSEngine_isInterrupted},
    {sipName_newArray, SIP_MLMETH_CAST(meth_QJSEngine_newArray), METH_VARARGS|METH_KEYWORDS, doc_QJSEngine_newArray},
    {sipName_newErrorObject, SIP_MLMETH_CAST(meth_QJSEngine_newErrorObject), METH_VARARGS|METH_KEYWORDS, doc_QJSEngine_newErrorObject},
    {sipName_newObject, meth_QJSEngine_newObject, METH_VARARGS, doc_QJSEngine_newObject},
    {sipName_newQMetaObject, meth_QJSEngine_newQMetaObject, METH_VARARGS, doc_QJSEngine_newQMetaObject},
    {sipName_newQObject, meth_QJSEngine_newQObject, METH_VARARGS, doc_QJSEngine_newQObject},
    {sipName_setInterrupted, meth_QJSEngine_setInterrupted, METH_VARARGS, doc_QJSEngine_setInterrupted},
    {sipName_setUiLanguage, meth_QJSEngine_setUiLanguage, METH_VARARGS, doc_QJSEngine_setUiLanguage},
    {sipName_throwError, SIP_MLMETH_CAST(meth_QJSEngine_throwError), METH_VARARGS|METH_KEYWORDS, doc_QJSEngine_throwError},
    {sipName_uiLanguage, meth_QJSEngine_uiLanguage, METH_VARARGS, doc_QJSEngine_uiLanguage}
};

static sipEnumMemberDef enummembers_QJSEngine[] = {
    {sipName_AllExtensions, static_cast<int>( ::QJSEngine::AllExtensions), 1},
    {sipName_ConsoleExtension, static_cast<int>( ::QJSEngine::ConsoleExtension), 1},
    {sipName_GarbageCollectionExtension, static_cast<int>( ::QJSEngine::GarbageCollectionExtension), 1},
    {sipName_TranslationExtension, static_cast<int>( ::QJSEngine::TranslationExtension), 1},
};

PyDoc_STRVAR(doc_QJSEngine, "\1QJSEngine()\n"
"QJSEngine(QObject)");


/* Define this type's signals. */
static const pyqt5QtSignal signals_QJSEngine[] = {
    {"uiLanguageChanged()", "\1uiLanguageChanged(self)", SIP_NULLPTR, SIP_NULLPTR},
    {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR}
};


static pyqt5ClassPluginDef plugin_QJSEngine = {
    & ::QJSEngine::staticMetaObject,
    0,
    signals_QJSEngine,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtQml_QJSEngine = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QJSEngine,
        SIP_NULLPTR,
        &plugin_QJSEngine
    },
    {
        sipNameNr_QJSEngine,
        {0, 0, 1},
        16, methods_QJSEngine,
        4, enummembers_QJSEngine,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QJSEngine,
    -1,
    -1,
    supers_QJSEngine,
    SIP_NULLPTR,
    init_type_QJSEngine,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QJSEngine,
    SIP_NULLPTR,
    array_QJSEngine,
    SIP_NULLPTR,
    release_QJSEngine,
    cast_QJSEngine,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QJSEngine,
    sizeof ( ::QJSEngine),
};
