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

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtWidgets/qitemeditorfactory.sip"
#include <qitemeditorfactory.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQItemEditorCreatorBase.cpp"

#line 30 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQItemEditorCreatorBase.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtWidgets/qwidget.sip"
#include <qwidget.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQItemEditorCreatorBase.cpp"


class sipQItemEditorCreatorBase : public  ::QItemEditorCreatorBase
{
public:
    sipQItemEditorCreatorBase();
    sipQItemEditorCreatorBase(const  ::QItemEditorCreatorBase&);
    virtual ~sipQItemEditorCreatorBase();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
     ::QByteArray valuePropertyName() const SIP_OVERRIDE;
     ::QWidget* createWidget( ::QWidget*) const SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[2];
};

sipQItemEditorCreatorBase::sipQItemEditorCreatorBase():  ::QItemEditorCreatorBase(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

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

 ::QByteArray sipQItemEditorCreatorBase::valuePropertyName() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QByteArray();

    extern  ::QByteArray sipVH_QtWidgets_172(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtWidgets_172(sipGILState, sipImportedVirtErrorHandlers_QtWidgets_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

 ::QWidget* sipQItemEditorCreatorBase::createWidget( ::QWidget*a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[1]), const_cast<sipSimpleWrapper **>(&sipPySelf), sipName_QItemEditorCreatorBase, sipName_createWidget);

    if (!sipMeth)
        return 0;

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

    return sipVH_QtWidgets_171(sipGILState, sipImportedVirtErrorHandlers_QtWidgets_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}


PyDoc_STRVAR(doc_QItemEditorCreatorBase_createWidget, "createWidget(self, QWidget) -> QWidget");

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

    {
         ::QWidget* a0;
        sipWrapper *sipOwner = SIP_NULLPTR;
        const  ::QItemEditorCreatorBase *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJH", &sipSelf, sipType_QItemEditorCreatorBase, &sipCpp, sipType_QWidget, &a0, &sipOwner))
        {
             ::QWidget*sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QItemEditorCreatorBase, sipName_createWidget);
                return SIP_NULLPTR;
            }

            sipRes = sipCpp->createWidget(a0);

            return sipConvertFromNewType(sipRes,sipType_QWidget,(PyObject *)sipOwner);
        }
    }

    sipNoMethod(sipParseErr, sipName_QItemEditorCreatorBase, sipName_createWidget, doc_QItemEditorCreatorBase_createWidget);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QItemEditorCreatorBase_valuePropertyName, "valuePropertyName(self) -> QByteArray");

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

    {
        const  ::QItemEditorCreatorBase *sipCpp;

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

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QItemEditorCreatorBase, sipName_valuePropertyName);
                return SIP_NULLPTR;
            }

            sipRes = new  ::QByteArray(sipCpp->valuePropertyName());

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

    sipNoMethod(sipParseErr, sipName_QItemEditorCreatorBase, sipName_valuePropertyName, doc_QItemEditorCreatorBase_valuePropertyName);

    return SIP_NULLPTR;
}


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


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

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


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

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::QItemEditorCreatorBase* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QItemEditorCreatorBase[] = {
    {sipName_createWidget, meth_QItemEditorCreatorBase_createWidget, METH_VARARGS, doc_QItemEditorCreatorBase_createWidget},
    {sipName_valuePropertyName, meth_QItemEditorCreatorBase_valuePropertyName, METH_VARARGS, doc_QItemEditorCreatorBase_valuePropertyName}
};

PyDoc_STRVAR(doc_QItemEditorCreatorBase, "\1QItemEditorCreatorBase()\n"
"QItemEditorCreatorBase(QItemEditorCreatorBase)");


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


sipClassTypeDef sipTypeDef_QtWidgets_QItemEditorCreatorBase = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QItemEditorCreatorBase,
        SIP_NULLPTR,
        &plugin_QItemEditorCreatorBase
    },
    {
        sipNameNr_QItemEditorCreatorBase,
        {0, 0, 1},
        2, methods_QItemEditorCreatorBase,
        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_QItemEditorCreatorBase,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QItemEditorCreatorBase,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QItemEditorCreatorBase,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QItemEditorCreatorBase,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof ( ::QItemEditorCreatorBase),
};
