/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt for Python.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/

//workaround to access protected functions
#define protected public

// default includes
#include <shiboken.h>
#ifndef QT_NO_VERSION_TAGGING
#  define QT_NO_VERSION_TAGGING
#endif
#include <QDebug>
#include <pysidesignal.h>
#include <pysideproperty.h>
#include <pyside.h>
#include <pysideqenum.h>
#include <feature_select.h>
QT_WARNING_DISABLE_DEPRECATED

#include <typeinfo>
#include <iterator>

// module include
#include "pyside6_qtdesigner_python.h"

// main header
#include "qdesignerwidgetboxinterface_category_wrapper.h"

// inner classes

// Extra includes
#include <QtDesigner/abstractwidgetbox.h>


#include <cctype>
#include <cstring>



template <class T>
static const char *typeNameOf(const T &t)
{
    const char *typeName =  typeid(t).name();
    auto size = std::strlen(typeName);
#if defined(Q_CC_MSVC) // MSVC: "class QPaintDevice * __ptr64"
    if (auto lastStar = strchr(typeName, '*')) {
        // MSVC: "class QPaintDevice * __ptr64"
        while (*--lastStar == ' ') {
        }
        size = lastStar - typeName + 1;
    }
#else // g++, Clang: "QPaintDevice *" -> "P12QPaintDevice"
    if (size > 2 && typeName[0] == 'P' && std::isdigit(typeName[1])) {
        ++typeName;
        --size;
    }
#endif
    char *result = new char[size + 1];
    result[size] = '\0';
    memcpy(result, typeName, size);
    return result;
}


// Target ---------------------------------------------------------

extern "C" {
static int
Sbk_QDesignerWidgetBoxInterface_Category_Init(PyObject *self, PyObject *args, PyObject *kwds)
{
    SbkObject *sbkSelf = reinterpret_cast<SbkObject *>(self);
    PySide::Feature::Select(self);
    if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::QDesignerWidgetBoxInterface::Category >()))
        return -1;

    ::QDesignerWidgetBoxInterface::Category *cptr{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.__init__";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[2];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0, 0};

    // invalid argument lengths
    if (numArgs > 2) {
        static PyObject *const too_many = Shiboken::String::createStaticString(">");
        errInfo.reset(too_many);
        Py_INCREF(errInfo.object());
        goto Sbk_QDesignerWidgetBoxInterface_Category_Init_TypeError;
    }

    if (!PyArg_ParseTuple(args, "|OO:Category", &(pyArgs[0]), &(pyArgs[1])))
        return -1;


    // Overloaded function decisor
    // 0: Category::Category(QDesignerWidgetBoxInterface::Category)
    // 1: Category::Category(QString,QDesignerWidgetBoxInterface::Category::Type)
    if (numArgs == 0) {
        overloadId = 1; // Category(QString,QDesignerWidgetBoxInterface::Category::Type)
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0])))) {
        if (numArgs == 1) {
            overloadId = 1; // Category(QString,QDesignerWidgetBoxInterface::Category::Type)
        } else if (numArgs >= 2
            && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_TYPE_IDX]))->converter, (pyArgs[1])))) {
            overloadId = 1; // Category(QString,QDesignerWidgetBoxInterface::Category::Type)
        }
    } else if (numArgs == 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_IDX], (pyArgs[0])))) {
        overloadId = 0; // Category(QDesignerWidgetBoxInterface::Category)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QDesignerWidgetBoxInterface_Category_Init_TypeError;

    // Call function/method
    switch (overloadId) {
        case 0: // Category(const QDesignerWidgetBoxInterface::Category & Category)
        {
            if (kwds && PyDict_Size(kwds) > 0) {
                errInfo.reset(kwds);
                Py_INCREF(errInfo.object());
                goto Sbk_QDesignerWidgetBoxInterface_Category_Init_TypeError;
            }
            if (!Shiboken::Object::isValid(pyArgs[0]))
                return -1;
            ::QDesignerWidgetBoxInterface::Category cppArg0_local;
            ::QDesignerWidgetBoxInterface::Category *cppArg0 = &cppArg0_local;
            if (pythonToCpp[0].isValue())
                pythonToCpp[0](pyArgs[0], &cppArg0_local);
            else
                pythonToCpp[0](pyArgs[0], &cppArg0);


            if (!PyErr_Occurred()) {
                // Category(QDesignerWidgetBoxInterface::Category)
                cptr = new ::QDesignerWidgetBoxInterface::Category(*cppArg0);
            }
            break;
        }
        case 1: // Category(const QString & aname, QDesignerWidgetBoxInterface::Category::Type atype)
        {
            if (kwds && PyDict_Size(kwds) > 0) {
                PyObject *value{};
                Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
                static PyObject *const key_aname = Shiboken::String::createStaticString("aname");
                if (PyDict_Contains(kwds, key_aname)) {
                    value = PyDict_GetItem(kwds, key_aname);
                    if (value && pyArgs[0]) {
                        errInfo.reset(key_aname);
                        Py_INCREF(errInfo.object());
                        goto Sbk_QDesignerWidgetBoxInterface_Category_Init_TypeError;
                    }
                    if (value) {
                        pyArgs[0] = value;
                        if (!(pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))))
                            goto Sbk_QDesignerWidgetBoxInterface_Category_Init_TypeError;
                    }
                    PyDict_DelItem(kwds_dup, key_aname);
                }
                static PyObject *const key_atype = Shiboken::String::createStaticString("atype");
                if (PyDict_Contains(kwds, key_atype)) {
                    value = PyDict_GetItem(kwds, key_atype);
                    if (value && pyArgs[1]) {
                        errInfo.reset(key_atype);
                        Py_INCREF(errInfo.object());
                        goto Sbk_QDesignerWidgetBoxInterface_Category_Init_TypeError;
                    }
                    if (value) {
                        pyArgs[1] = value;
                        if (!(pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_TYPE_IDX]))->converter, (pyArgs[1]))))
                            goto Sbk_QDesignerWidgetBoxInterface_Category_Init_TypeError;
                    }
                    PyDict_DelItem(kwds_dup, key_atype);
                }
                if (PyDict_Size(kwds_dup) > 0) {
                    errInfo.reset(kwds_dup.release());
                    goto Sbk_QDesignerWidgetBoxInterface_Category_Init_TypeError;
                }
            }
            ::QString cppArg0 = QString();
            if (pythonToCpp[0])
                pythonToCpp[0](pyArgs[0], &cppArg0);
            ::QDesignerWidgetBoxInterface::Category::Type cppArg1(QDesignerWidgetBoxInterface::Category::Type::Default);
            if (pythonToCpp[1])
                pythonToCpp[1](pyArgs[1], &cppArg1);

            if (!PyErr_Occurred()) {
                // Category(QString,QDesignerWidgetBoxInterface::Category::Type)
                cptr = new ::QDesignerWidgetBoxInterface::Category(cppArg0, cppArg1);
            }
            break;
        }
    }

    if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::QDesignerWidgetBoxInterface::Category >(), cptr)) {
        delete cptr;
        return -1;
    }
    if (!cptr) goto Sbk_QDesignerWidgetBoxInterface_Category_Init_TypeError;

    Shiboken::Object::setValidCpp(sbkSelf, true);
    if (Shiboken::BindingManager::instance().hasWrapper(cptr)) {
        Shiboken::BindingManager::instance().releaseWrapper(Shiboken::BindingManager::instance().retrieveWrapper(cptr));
    }
    Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr);


    return 1;

    Sbk_QDesignerWidgetBoxInterface_Category_Init_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return -1;
}

static PyObject *Sbk_QDesignerWidgetBoxInterface_CategoryFunc_addWidget(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QDesignerWidgetBoxInterface::Category *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.addWidget";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: Category::addWidget(QDesignerWidgetBoxInterface::Widget)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_WIDGET_IDX], (pyArg)))) {
        overloadId = 0; // addWidget(QDesignerWidgetBoxInterface::Widget)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QDesignerWidgetBoxInterface_CategoryFunc_addWidget_TypeError;

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArg))
            return {};
        ::QDesignerWidgetBoxInterface::Widget cppArg0_local;
        ::QDesignerWidgetBoxInterface::Widget *cppArg0 = &cppArg0_local;
        if (pythonToCpp.isValue())
            pythonToCpp(pyArg, &cppArg0_local);
        else
            pythonToCpp(pyArg, &cppArg0);


        if (!PyErr_Occurred()) {
            // addWidget(QDesignerWidgetBoxInterface::Widget)
            cppSelf->addWidget(*cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QDesignerWidgetBoxInterface_CategoryFunc_addWidget_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QDesignerWidgetBoxInterface_CategoryFunc_isNull(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QDesignerWidgetBoxInterface::Category *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.isNull";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // isNull()const
            bool cppResult = const_cast<const ::QDesignerWidgetBoxInterface::Category *>(cppSelf)->isNull();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QDesignerWidgetBoxInterface_CategoryFunc_name(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QDesignerWidgetBoxInterface::Category *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.name";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // name()const
            QString cppResult = const_cast<const ::QDesignerWidgetBoxInterface::Category *>(cppSelf)->name();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QDesignerWidgetBoxInterface_CategoryFunc_removeWidget(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QDesignerWidgetBoxInterface::Category *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.removeWidget";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: Category::removeWidget(int)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArg)))) {
        overloadId = 0; // removeWidget(int)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QDesignerWidgetBoxInterface_CategoryFunc_removeWidget_TypeError;

    // Call function/method
    {
        int cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // removeWidget(int)
            cppSelf->removeWidget(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QDesignerWidgetBoxInterface_CategoryFunc_removeWidget_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QDesignerWidgetBoxInterface_CategoryFunc_setName(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QDesignerWidgetBoxInterface::Category *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.setName";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: Category::setName(QString)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) {
        overloadId = 0; // setName(QString)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QDesignerWidgetBoxInterface_CategoryFunc_setName_TypeError;

    // Call function/method
    {
        ::QString cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setName(QString)
            cppSelf->setName(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QDesignerWidgetBoxInterface_CategoryFunc_setName_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QDesignerWidgetBoxInterface_CategoryFunc_setType(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QDesignerWidgetBoxInterface::Category *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.setType";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: Category::setType(QDesignerWidgetBoxInterface::Category::Type)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_TYPE_IDX]))->converter, (pyArg)))) {
        overloadId = 0; // setType(QDesignerWidgetBoxInterface::Category::Type)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QDesignerWidgetBoxInterface_CategoryFunc_setType_TypeError;

    // Call function/method
    {
        ::QDesignerWidgetBoxInterface::Category::Type cppArg0{QDesignerWidgetBoxInterface::Category::Default};
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setType(QDesignerWidgetBoxInterface::Category::Type)
            cppSelf->setType(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QDesignerWidgetBoxInterface_CategoryFunc_setType_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QDesignerWidgetBoxInterface_CategoryFunc_type(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QDesignerWidgetBoxInterface::Category *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.type";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // type()const
            QDesignerWidgetBoxInterface::Category::Type cppResult = const_cast<const ::QDesignerWidgetBoxInterface::Category *>(cppSelf)->type();
            pyResult = Shiboken::Conversions::copyToPython(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_TYPE_IDX]))->converter, &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QDesignerWidgetBoxInterface_CategoryFunc_widget(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QDesignerWidgetBoxInterface::Category *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.widget";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: Category::widget(int)const->QDesignerWidgetBoxInterface::Widget
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArg)))) {
        overloadId = 0; // widget(int)const
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QDesignerWidgetBoxInterface_CategoryFunc_widget_TypeError;

    // Call function/method
    {
        int cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // widget(int)const
            QDesignerWidgetBoxInterface::Widget cppResult = const_cast<const ::QDesignerWidgetBoxInterface::Category *>(cppSelf)->widget(cppArg0);
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_WIDGET_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QDesignerWidgetBoxInterface_CategoryFunc_widget_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QDesignerWidgetBoxInterface_CategoryFunc_widgetCount(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QDesignerWidgetBoxInterface::Category *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.widgetCount";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // widgetCount()const
            int cppResult = const_cast<const ::QDesignerWidgetBoxInterface::Category *>(cppSelf)->widgetCount();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QDesignerWidgetBoxInterface_Category___copy__(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto &cppSelf = *reinterpret_cast< ::QDesignerWidgetBoxInterface::Category *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_IDX], reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_IDX], &cppSelf);
    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}


static const char *Sbk_QDesignerWidgetBoxInterface_Category_PropertyStrings[] = {
    nullptr // Sentinel
};

static PyMethodDef Sbk_QDesignerWidgetBoxInterface_Category_methods[] = {
    {"addWidget", reinterpret_cast<PyCFunction>(Sbk_QDesignerWidgetBoxInterface_CategoryFunc_addWidget), METH_O},
    {"isNull", reinterpret_cast<PyCFunction>(Sbk_QDesignerWidgetBoxInterface_CategoryFunc_isNull), METH_NOARGS},
    {"name", reinterpret_cast<PyCFunction>(Sbk_QDesignerWidgetBoxInterface_CategoryFunc_name), METH_NOARGS},
    {"removeWidget", reinterpret_cast<PyCFunction>(Sbk_QDesignerWidgetBoxInterface_CategoryFunc_removeWidget), METH_O},
    {"setName", reinterpret_cast<PyCFunction>(Sbk_QDesignerWidgetBoxInterface_CategoryFunc_setName), METH_O},
    {"setType", reinterpret_cast<PyCFunction>(Sbk_QDesignerWidgetBoxInterface_CategoryFunc_setType), METH_O},
    {"type", reinterpret_cast<PyCFunction>(Sbk_QDesignerWidgetBoxInterface_CategoryFunc_type), METH_NOARGS},
    {"widget", reinterpret_cast<PyCFunction>(Sbk_QDesignerWidgetBoxInterface_CategoryFunc_widget), METH_O},
    {"widgetCount", reinterpret_cast<PyCFunction>(Sbk_QDesignerWidgetBoxInterface_CategoryFunc_widgetCount), METH_NOARGS},

    {"__copy__", reinterpret_cast<PyCFunction>(Sbk_QDesignerWidgetBoxInterface_Category___copy__), METH_NOARGS},
    {nullptr, nullptr} // Sentinel
};

static int Sbk_QDesignerWidgetBoxInterface_Category___nb_bool(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return -1;
    auto cppSelf = reinterpret_cast< ::QDesignerWidgetBoxInterface::Category *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    return cppSelf->isNull() ? 0 : 1;
}

} // extern "C"

static int Sbk_QDesignerWidgetBoxInterface_Category_traverse(PyObject *self, visitproc visit, void *arg)
{
    return SbkObject_TypeF()->tp_traverse(self, visit, arg);
}
static int Sbk_QDesignerWidgetBoxInterface_Category_clear(PyObject *self)
{
    return reinterpret_cast<PyTypeObject *>(SbkObject_TypeF())->tp_clear(self);
}
// Class Definition -----------------------------------------------
extern "C" {
static PyTypeObject *_Sbk_QDesignerWidgetBoxInterface_Category_Type = nullptr;
static PyTypeObject *Sbk_QDesignerWidgetBoxInterface_Category_TypeF(void)
{
    return _Sbk_QDesignerWidgetBoxInterface_Category_Type;
}

static PyType_Slot Sbk_QDesignerWidgetBoxInterface_Category_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(&SbkDeallocWrapper)},
    {Py_tp_repr,        nullptr},
    {Py_tp_hash,        nullptr},
    {Py_tp_call,        nullptr},
    {Py_tp_str,         nullptr},
    {Py_tp_getattro,    nullptr},
    {Py_tp_setattro,    nullptr},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_QDesignerWidgetBoxInterface_Category_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_QDesignerWidgetBoxInterface_Category_clear)},
    {Py_tp_richcompare, nullptr},
    {Py_tp_iter,        nullptr},
    {Py_tp_iternext,    nullptr},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_QDesignerWidgetBoxInterface_Category_methods)},
    {Py_tp_getset,      nullptr},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_QDesignerWidgetBoxInterface_Category_Init)},
    {Py_tp_new,         reinterpret_cast<void *>(SbkObjectTpNew)},
    // type supports number protocol
    {Py_nb_bool, reinterpret_cast<void *>(Sbk_QDesignerWidgetBoxInterface_Category___nb_bool)},
    {0, nullptr}
};
static PyType_Spec Sbk_QDesignerWidgetBoxInterface_Category_spec = {
    "2:PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_QDesignerWidgetBoxInterface_Category_slots
};

} //extern "C"


// Type conversion functions.

// Python to C++ enum conversion.
static void QDesignerWidgetBoxInterface_Category_Type_PythonToCpp_QDesignerWidgetBoxInterface_Category_Type(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QDesignerWidgetBoxInterface::Category::Type *>(cppOut) =
        static_cast<::QDesignerWidgetBoxInterface::Category::Type>(Shiboken::Enum::getValue(pyIn));

}
static PythonToCppFunc is_QDesignerWidgetBoxInterface_Category_Type_PythonToCpp_QDesignerWidgetBoxInterface_Category_Type_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_TYPE_IDX]))
        return QDesignerWidgetBoxInterface_Category_Type_PythonToCpp_QDesignerWidgetBoxInterface_Category_Type;
    return {};
}
static PyObject *QDesignerWidgetBoxInterface_Category_Type_CppToPython_QDesignerWidgetBoxInterface_Category_Type(const void *cppIn)
{
    const int castCppIn = int(*reinterpret_cast<const ::QDesignerWidgetBoxInterface::Category::Type *>(cppIn));
    return Shiboken::Enum::newItem(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_TYPE_IDX], castCppIn);

}

// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity).
static void Category_PythonToCpp_Category_PTR(PyObject *pyIn, void *cppOut)
{
    Shiboken::Conversions::pythonToCppPointer(Sbk_QDesignerWidgetBoxInterface_Category_TypeF(), pyIn, cppOut);
}
static PythonToCppFunc is_Category_PythonToCpp_Category_PTR_Convertible(PyObject *pyIn)
{
    if (pyIn == Py_None)
        return Shiboken::Conversions::nonePythonToCppNullPtr;
    if (PyObject_TypeCheck(pyIn, reinterpret_cast<PyTypeObject *>(Sbk_QDesignerWidgetBoxInterface_Category_TypeF())))
        return Category_PythonToCpp_Category_PTR;
    return {};
}

// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity).
static PyObject *Category_PTR_CppToPython_Category(const void *cppIn)
{
    auto pyOut = reinterpret_cast<PyObject *>(Shiboken::BindingManager::instance().retrieveWrapper(cppIn));
    if (pyOut) {
        Py_INCREF(pyOut);
        return pyOut;
    }
    bool changedTypeName = false;
    auto tCppIn = reinterpret_cast<const ::QDesignerWidgetBoxInterface::Category *>(cppIn);
    const char *typeName = typeid(*tCppIn).name();
    auto sbkType = Shiboken::ObjectType::typeForTypeName(typeName);
    if (sbkType && Shiboken::ObjectType::hasSpecialCastFunction(sbkType)) {
        typeName = typeNameOf(tCppIn);
        changedTypeName = true;
    }
    PyObject *result = Shiboken::Object::newObject(Sbk_QDesignerWidgetBoxInterface_Category_TypeF(), const_cast<void *>(cppIn), false, /* exactType */ changedTypeName, typeName);
    if (changedTypeName)
        delete [] typeName;
    return result;
}

// C++ to Python copy conversion.
static PyObject *Category_COPY_CppToPython_Category(const void *cppIn)
{
    return Shiboken::Object::newObject(Sbk_QDesignerWidgetBoxInterface_Category_TypeF(), new ::QDesignerWidgetBoxInterface::Category(*reinterpret_cast<const ::QDesignerWidgetBoxInterface::Category *>(cppIn)), true, true);
}

// Python to C++ copy conversion.
static void Category_PythonToCpp_Category_COPY(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QDesignerWidgetBoxInterface::Category *>(cppOut) = *reinterpret_cast< ::QDesignerWidgetBoxInterface::Category *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_IDX], reinterpret_cast<SbkObject *>(pyIn)));
}
static PythonToCppFunc is_Category_PythonToCpp_Category_COPY_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, reinterpret_cast<PyTypeObject *>(Sbk_QDesignerWidgetBoxInterface_Category_TypeF())))
        return Category_PythonToCpp_Category_COPY;
    return {};
}

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
static const char *QDesignerWidgetBoxInterface_Category_SignatureStrings[] = {
    "1:PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category(self,Category:PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category)",
    "0:PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category(self,aname:QString=QString(),atype:PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.Type=QDesignerWidgetBoxInterface.Category.Type.Default)",
    "PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.addWidget(self,awidget:PySide6.QtDesigner.QDesignerWidgetBoxInterface.Widget)",
    "PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.isNull(self)->bool",
    "PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.name(self)->QString",
    "PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.removeWidget(self,idx:int)",
    "PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.setName(self,aname:QString)",
    "PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.setType(self,atype:PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.Type)",
    "PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.type(self)->PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.Type",
    "PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.widget(self,idx:int)->PySide6.QtDesigner.QDesignerWidgetBoxInterface.Widget",
    "PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.widgetCount(self)->int",
    "PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.__copy__()",
    nullptr}; // Sentinel

void init_QDesignerWidgetBoxInterface_Category(PyObject *enclosingClass)
{
    _Sbk_QDesignerWidgetBoxInterface_Category_Type = Shiboken::ObjectType::introduceWrapperType(
        enclosingClass,
        "Category",
        "QDesignerWidgetBoxInterface::Category",
        &Sbk_QDesignerWidgetBoxInterface_Category_spec,
        &Shiboken::callCppDestructor< ::QDesignerWidgetBoxInterface::Category >,
        0,
        0,
        Shiboken::ObjectType::WrapperFlags::InnerClass);
    auto *pyType = Sbk_QDesignerWidgetBoxInterface_Category_TypeF(); // references _Sbk_QDesignerWidgetBoxInterface_Category_Type
    InitSignatureStrings(pyType, QDesignerWidgetBoxInterface_Category_SignatureStrings);
    SbkObjectType_SetPropertyStrings(reinterpret_cast<PyTypeObject *>(_Sbk_QDesignerWidgetBoxInterface_Category_Type), Sbk_QDesignerWidgetBoxInterface_Category_PropertyStrings);
    SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_IDX]
        = Sbk_QDesignerWidgetBoxInterface_Category_TypeF();

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(Sbk_QDesignerWidgetBoxInterface_Category_TypeF(),
        Category_PythonToCpp_Category_PTR,
        is_Category_PythonToCpp_Category_PTR_Convertible,
        Category_PTR_CppToPython_Category,
        Category_COPY_CppToPython_Category);

    Shiboken::Conversions::registerConverterName(converter, "QDesignerWidgetBoxInterface::Category");
    Shiboken::Conversions::registerConverterName(converter, "QDesignerWidgetBoxInterface::Category*");
    Shiboken::Conversions::registerConverterName(converter, "QDesignerWidgetBoxInterface::Category&");
    Shiboken::Conversions::registerConverterName(converter, "Category");
    Shiboken::Conversions::registerConverterName(converter, "Category*");
    Shiboken::Conversions::registerConverterName(converter, "Category&");
    Shiboken::Conversions::registerConverterName(converter, typeid(::QDesignerWidgetBoxInterface::Category).name());

    // Add Python to C++ copy (value, not pointer neither reference) conversion to type converter.
    Shiboken::Conversions::addPythonToCppValueConversion(converter,
        Category_PythonToCpp_Category_COPY,
        is_Category_PythonToCpp_Category_COPY_Convertible);

    // Initialization of enums.

    // Initialization of enum 'Type'.
    SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_TYPE_IDX] = Shiboken::Enum::createScopedEnum(Sbk_QDesignerWidgetBoxInterface_Category_TypeF(),
        "Type",
        "2:PySide6.QtDesigner.QDesignerWidgetBoxInterface.Category.Type",
        "QDesignerWidgetBoxInterface::Category::Type");
    if (!SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_TYPE_IDX])
        return;

    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_TYPE_IDX],
        Sbk_QDesignerWidgetBoxInterface_Category_TypeF(), "Default", (long) QDesignerWidgetBoxInterface::Category::Type::Default))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_TYPE_IDX],
        Sbk_QDesignerWidgetBoxInterface_Category_TypeF(), "Scratchpad", (long) QDesignerWidgetBoxInterface::Category::Type::Scratchpad))
        return;
    // Register converter for enum 'QDesignerWidgetBoxInterface::Category::Type'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_TYPE_IDX],
            QDesignerWidgetBoxInterface_Category_Type_CppToPython_QDesignerWidgetBoxInterface_Category_Type);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QDesignerWidgetBoxInterface_Category_Type_PythonToCpp_QDesignerWidgetBoxInterface_Category_Type,
            is_QDesignerWidgetBoxInterface_Category_Type_PythonToCpp_QDesignerWidgetBoxInterface_Category_Type_Convertible);
        Shiboken::Enum::setTypeConverter(SbkPySide6_QtDesignerTypes[SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_TYPE_IDX], converter, false);
        Shiboken::Conversions::registerConverterName(converter, "QDesignerWidgetBoxInterface::Category::Type");
        Shiboken::Conversions::registerConverterName(converter, "Category::Type");
        Shiboken::Conversions::registerConverterName(converter, "Type");
    }
    // End of 'Type' enum.

    qRegisterMetaType< ::QDesignerWidgetBoxInterface::Category::Type >("Category::Type");
    qRegisterMetaType< ::QDesignerWidgetBoxInterface::Category::Type >("QDesignerWidgetBoxInterface::Category::Type");
}
