/*
 * 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 "sipAPIQtDesigner.h"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtDesigner/formbuilder.sip"
#include <formbuilder.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtDesigner/sipQtDesignerQFormBuilder.cpp"

#line 149 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtDesigner/sipQtDesignerQFormBuilder.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtDesigner/customwidget.sip"
#include <QtDesigner>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtDesigner/sipQtDesignerQFormBuilder.cpp"
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstringlist.sip"
#include <qstringlist.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtDesigner/sipQtDesignerQFormBuilder.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtDesigner/sipQtDesignerQFormBuilder.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qdir.sip"
#include <qdir.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.7/build/QtDesigner/sipQtDesignerQFormBuilder.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qiodevice.sip"
#include <qiodevice.h>
#line 48 "/build/pyqt5/src/PyQt5-5.15.7/build/QtDesigner/sipQtDesignerQFormBuilder.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtWidgets/qwidget.sip"
#include <qwidget.h>
#line 51 "/build/pyqt5/src/PyQt5-5.15.7/build/QtDesigner/sipQtDesignerQFormBuilder.cpp"


class sipQFormBuilder : public  ::QFormBuilder
{
public:
    sipQFormBuilder();
    virtual ~sipQFormBuilder();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
     ::QWidget* load( ::QIODevice*, ::QWidget*) SIP_OVERRIDE;
    void save( ::QIODevice*, ::QWidget*) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[2];
};

sipQFormBuilder::sipQFormBuilder():  ::QFormBuilder(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

 ::QWidget* sipQFormBuilder::load( ::QIODevice*a0, ::QWidget*a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QFormBuilder::load(a0,a1);

    extern  ::QWidget* sipVH_QtDesigner_39(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QIODevice*, ::QWidget*);

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

void sipQFormBuilder::save( ::QIODevice*a0, ::QWidget*a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::QFormBuilder::save(a0,a1);
        return;
    }

    extern void sipVH_QtDesigner_40(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QIODevice*, ::QWidget*);

    sipVH_QtDesigner_40(sipGILState, sipImportedVirtErrorHandlers_QtDesigner_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}


PyDoc_STRVAR(doc_QFormBuilder_pluginPaths, "pluginPaths(self) -> List[str]");

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

    {
        const  ::QFormBuilder *sipCpp;

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

            sipRes = new  ::QStringList(sipCpp->pluginPaths());

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

    sipNoMethod(sipParseErr, sipName_QFormBuilder, sipName_pluginPaths, doc_QFormBuilder_pluginPaths);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QFormBuilder_clearPluginPaths, "clearPluginPaths(self)");

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

    {
         ::QFormBuilder *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QFormBuilder, sipName_clearPluginPaths, doc_QFormBuilder_clearPluginPaths);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QFormBuilder_addPluginPath, "addPluginPath(self, str)");

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

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

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QFormBuilder, sipName_addPluginPath, doc_QFormBuilder_addPluginPath);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QFormBuilder_setPluginPath, "setPluginPath(self, Iterable[str])");

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

    {
        const  ::QStringList* a0;
        int a0State = 0;
         ::QFormBuilder *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QFormBuilder, &sipCpp, sipType_QStringList, &a0, &a0State))
        {
            sipCpp->setPluginPath(*a0);
            sipReleaseType(const_cast< ::QStringList *>(a0), sipType_QStringList, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QFormBuilder, sipName_setPluginPath, doc_QFormBuilder_setPluginPath);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QFormBuilder_customWidgets, "customWidgets(self) -> List[QDesignerCustomWidgetInterface]");

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

    {
        const  ::QFormBuilder *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QFormBuilder, &sipCpp))
        {
            QList< ::QDesignerCustomWidgetInterface*>*sipRes;

            sipRes = new QList< ::QDesignerCustomWidgetInterface*>(sipCpp->customWidgets());

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

    sipNoMethod(sipParseErr, sipName_QFormBuilder, sipName_customWidgets, doc_QFormBuilder_customWidgets);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QFormBuilder)
        return sipCppV;

    if (targetType == sipType_QAbstractFormBuilder)
        return static_cast< ::QAbstractFormBuilder *>(sipCpp);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QFormBuilder(void *, int);}
static void release_QFormBuilder(void *sipCppV, int sipState)
{
    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipQFormBuilder *>(sipCppV);
    else
        delete reinterpret_cast< ::QFormBuilder *>(sipCppV);
}


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


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


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

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


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

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QFormBuilder[] = {{2, 255, 1}};


static PyMethodDef methods_QFormBuilder[] = {
    {sipName_addPluginPath, meth_QFormBuilder_addPluginPath, METH_VARARGS, doc_QFormBuilder_addPluginPath},
    {sipName_clearPluginPaths, meth_QFormBuilder_clearPluginPaths, METH_VARARGS, doc_QFormBuilder_clearPluginPaths},
    {sipName_customWidgets, meth_QFormBuilder_customWidgets, METH_VARARGS, doc_QFormBuilder_customWidgets},
    {sipName_pluginPaths, meth_QFormBuilder_pluginPaths, METH_VARARGS, doc_QFormBuilder_pluginPaths},
    {sipName_setPluginPath, meth_QFormBuilder_setPluginPath, METH_VARARGS, doc_QFormBuilder_setPluginPath}
};

PyDoc_STRVAR(doc_QFormBuilder, "\1QFormBuilder()");


static pyqt5ClassPluginDef plugin_QFormBuilder = {
    SIP_NULLPTR,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtDesigner_QFormBuilder = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QFormBuilder,
        SIP_NULLPTR,
        &plugin_QFormBuilder
    },
    {
        sipNameNr_QFormBuilder,
        {0, 0, 1},
        5, methods_QFormBuilder,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QFormBuilder,
    -1,
    -1,
    supers_QFormBuilder,
    SIP_NULLPTR,
    init_type_QFormBuilder,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QFormBuilder,
    SIP_NULLPTR,
    array_QFormBuilder,
    SIP_NULLPTR,
    release_QFormBuilder,
    cast_QFormBuilder,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QFormBuilder,
    sizeof ( ::QFormBuilder),
};
