/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 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 48 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtDesigner/customwidget.sip"
#include <QtDesigner>
#line 29 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDesigner/sipQtDesignerQDesignerCustomWidgetCollectionInterface.cpp"

#line 135 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 33 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDesigner/sipQtDesignerQDesignerCustomWidgetCollectionInterface.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtDesigner/customwidget.sip"
#include <QtDesigner>
#line 36 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDesigner/sipQtDesignerQDesignerCustomWidgetCollectionInterface.cpp"


class sipQDesignerCustomWidgetCollectionInterface : public  ::QDesignerCustomWidgetCollectionInterface
{
public:
    sipQDesignerCustomWidgetCollectionInterface();
    sipQDesignerCustomWidgetCollectionInterface(const  ::QDesignerCustomWidgetCollectionInterface&);
    virtual ~sipQDesignerCustomWidgetCollectionInterface();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    QList< ::QDesignerCustomWidgetInterface*> customWidgets() const SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[1];
};

sipQDesignerCustomWidgetCollectionInterface::sipQDesignerCustomWidgetCollectionInterface():  ::QDesignerCustomWidgetCollectionInterface(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQDesignerCustomWidgetCollectionInterface::sipQDesignerCustomWidgetCollectionInterface(const  ::QDesignerCustomWidgetCollectionInterface& a0):  ::QDesignerCustomWidgetCollectionInterface(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

QList< ::QDesignerCustomWidgetInterface*> sipQDesignerCustomWidgetCollectionInterface::customWidgets() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[0]), const_cast<sipSimpleWrapper **>(&sipPySelf), sipName_QDesignerCustomWidgetCollectionInterface, sipName_customWidgets);

    if (!sipMeth)
        return QList< ::QDesignerCustomWidgetInterface*>();

    extern QList< ::QDesignerCustomWidgetInterface*> sipVH_QtDesigner_84(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtDesigner_84(sipGILState, sipImportedVirtErrorHandlers_QtDesigner_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}


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

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

    {
        const  ::QDesignerCustomWidgetCollectionInterface *sipCpp;

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

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QDesignerCustomWidgetCollectionInterface, sipName_customWidgets);
                return SIP_NULLPTR;
            }

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

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

    sipNoMethod(sipParseErr, sipName_QDesignerCustomWidgetCollectionInterface, sipName_customWidgets, doc_QDesignerCustomWidgetCollectionInterface_customWidgets);

    return SIP_NULLPTR;
}


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


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

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


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

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::QDesignerCustomWidgetCollectionInterface* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_QDesignerCustomWidgetCollectionInterface, &a0))
        {
            sipCpp = new sipQDesignerCustomWidgetCollectionInterface(*a0);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QDesignerCustomWidgetCollectionInterface[] = {
    {sipName_customWidgets, meth_QDesignerCustomWidgetCollectionInterface_customWidgets, METH_VARARGS, doc_QDesignerCustomWidgetCollectionInterface_customWidgets}
};

PyDoc_STRVAR(doc_QDesignerCustomWidgetCollectionInterface, "\1QDesignerCustomWidgetCollectionInterface()\n"
"QDesignerCustomWidgetCollectionInterface(QDesignerCustomWidgetCollectionInterface)");


sipClassTypeDef sipTypeDef_QtDesigner_QDesignerCustomWidgetCollectionInterface = {
    {
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QDesignerCustomWidgetCollectionInterface,
        SIP_NULLPTR,
        SIP_NULLPTR
    },
    {
        sipNameNr_QDesignerCustomWidgetCollectionInterface,
        {0, 0, 1},
        1, methods_QDesignerCustomWidgetCollectionInterface,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QDesignerCustomWidgetCollectionInterface,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QDesignerCustomWidgetCollectionInterface,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QDesignerCustomWidgetCollectionInterface,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QDesignerCustomWidgetCollectionInterface,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof ( ::QDesignerCustomWidgetCollectionInterface),
};
