/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt6.
 * 
 * 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/pyqt6/src/pyqt6-6.11.0/sip/QtDesigner/abstractformbuilder.sip"
#include <abstractformbuilder.h>
#line 29 "/build/pyqt6/src/pyqt6-6.11.0/build/QtDesigner/sipQtDesignerQAbstractFormBuilder.cpp"

#line 24 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 33 "/build/pyqt6/src/pyqt6-6.11.0/build/QtDesigner/sipQtDesignerQAbstractFormBuilder.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qdir.sip"
#include <qdir.h>
#line 36 "/build/pyqt6/src/pyqt6-6.11.0/build/QtDesigner/sipQtDesignerQAbstractFormBuilder.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qiodevice.sip"
#include <qiodevice.h>
#line 39 "/build/pyqt6/src/pyqt6-6.11.0/build/QtDesigner/sipQtDesignerQAbstractFormBuilder.cpp"
#line 28 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtWidgets/qwidget.sip"
#include <qwidget.h>
#line 42 "/build/pyqt6/src/pyqt6-6.11.0/build/QtDesigner/sipQtDesignerQAbstractFormBuilder.cpp"


class sipQAbstractFormBuilder : public ::QAbstractFormBuilder
{
public:
    sipQAbstractFormBuilder();
    virtual ~sipQAbstractFormBuilder();

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

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[2];
};

sipQAbstractFormBuilder::sipQAbstractFormBuilder(): ::QAbstractFormBuilder(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

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

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

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

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

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

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

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

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

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

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


PyDoc_STRVAR(doc_QAbstractFormBuilder_load, "load(self, device: QIODevice|None, parent: QWidget|None = None) -> QWidget|None");

extern "C" {static PyObject *meth_QAbstractFormBuilder_load(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QAbstractFormBuilder_load(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QAbstractFormBuilder)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        ::QIODevice* a0;
        ::QWidget* a1 = 0;
        sipWrapper *sipOwner = SIP_NULLPTR;
        ::QAbstractFormBuilder *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8|JH", &sipSelf, sipType_QAbstractFormBuilder, &sipCpp, sipType_QIODevice, &a0, sipType_QWidget, &a1, &sipOwner))
        {
            ::QWidget*sipRes;

            sipRes = (sipSelfWasArg ? sipCpp->::QAbstractFormBuilder::load(a0, a1) : sipCpp->load(a0, a1));

            return sipConvertFromType(sipRes, sipType_QWidget, Py_None);
        }
    }

    sipNoMethod(sipParseErr, sipName_QAbstractFormBuilder, sipName_load, doc_QAbstractFormBuilder_load);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAbstractFormBuilder_save, "save(self, dev: QIODevice|None, widget: QWidget|None)");

extern "C" {static PyObject *meth_QAbstractFormBuilder_save(PyObject *, PyObject *);}
static PyObject *meth_QAbstractFormBuilder_save(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QAbstractFormBuilder)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        ::QIODevice* a0;
        ::QWidget* a1;
        ::QAbstractFormBuilder *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8J8", &sipSelf, sipType_QAbstractFormBuilder, &sipCpp, sipType_QIODevice, &a0, sipType_QWidget, &a1))
        {
            (sipSelfWasArg ? sipCpp->::QAbstractFormBuilder::save(a0, a1) : sipCpp->save(a0, a1));

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QAbstractFormBuilder, sipName_save, doc_QAbstractFormBuilder_save);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAbstractFormBuilder_setWorkingDirectory, "setWorkingDirectory(self, directory: QDir)");

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

    {
        const ::QDir* a0;
        ::QAbstractFormBuilder *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QAbstractFormBuilder, &sipCpp, sipType_QDir, &a0))
        {
            sipCpp->setWorkingDirectory(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QAbstractFormBuilder, sipName_setWorkingDirectory, doc_QAbstractFormBuilder_setWorkingDirectory);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAbstractFormBuilder_workingDirectory, "workingDirectory(self) -> QDir");

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

    {
        const ::QAbstractFormBuilder *sipCpp;

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

            sipRes = new ::QDir(sipCpp->workingDirectory());

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

    sipNoMethod(sipParseErr, sipName_QAbstractFormBuilder, sipName_workingDirectory, doc_QAbstractFormBuilder_workingDirectory);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAbstractFormBuilder_errorString, "errorString(self) -> str");

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

    {
        const ::QAbstractFormBuilder *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QAbstractFormBuilder, sipName_errorString, doc_QAbstractFormBuilder_errorString);

    return SIP_NULLPTR;
}


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


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


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


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

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


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

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QAbstractFormBuilder[] = {
    {sipName_errorString, meth_QAbstractFormBuilder_errorString, METH_VARARGS, doc_QAbstractFormBuilder_errorString},
    {sipName_load, SIP_MLMETH_CAST(meth_QAbstractFormBuilder_load), METH_VARARGS|METH_KEYWORDS, doc_QAbstractFormBuilder_load},
    {sipName_save, meth_QAbstractFormBuilder_save, METH_VARARGS, doc_QAbstractFormBuilder_save},
    {sipName_setWorkingDirectory, meth_QAbstractFormBuilder_setWorkingDirectory, METH_VARARGS, doc_QAbstractFormBuilder_setWorkingDirectory},
    {sipName_workingDirectory, meth_QAbstractFormBuilder_workingDirectory, METH_VARARGS, doc_QAbstractFormBuilder_workingDirectory}
};

PyDoc_STRVAR(doc_QAbstractFormBuilder, "\1QAbstractFormBuilder()");


sipClassTypeDef sipTypeDef_QtDesigner_QAbstractFormBuilder = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QAbstractFormBuilder,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QAbstractFormBuilder,
        {0, 0, 1},
        5, methods_QAbstractFormBuilder,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QAbstractFormBuilder,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QAbstractFormBuilder,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QAbstractFormBuilder,
    SIP_NULLPTR,
    array_QAbstractFormBuilder,
    SIP_NULLPTR,
    release_QAbstractFormBuilder,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QAbstractFormBuilder,
    sizeof (::QAbstractFormBuilder),
};
