
// Workaround to access protected functions
#ifndef protected
#  define protected public
#endif

// default includes
#include <shiboken.h>
#include <sbkpep.h>
#include <sbkpepbuffer.h>

#define PYSIDE6_COMOPT_COMPRESS 1

#ifndef QT_NO_VERSION_TAGGING
#  define QT_NO_VERSION_TAGGING
#endif
#include <QtCore/QDebug>
#include <pysideqenum.h>
#include <pysideutils.h>
#include <feature_select.h>
QT_WARNING_DISABLE_DEPRECATED


// module include
#include "kcalendarcore_python.h"

// main header
#include "kcalendarcore_calfilter_wrapper.h"

// Argument includes
#include <QString>
#include <QStringList>
#include <calfilter.h>

#include <cctype>
#include <cstring>
#include <iterator>
#include <type_traits>
#include <typeinfo>

using namespace KCalendarCore;

extern "C" {
static PyTypeObject *Sbk_KCalendarCore_CalFilter_TypeF(void)
{
    return SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX].type;
}
} // extern "C"


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

extern "C" {
static int
Sbk_KCalendarCore_CalFilter_Init(PyObject *self, PyObject *args, [[maybe_unused]] PyObject *kwds)
{
    auto *sbkSelf = reinterpret_cast<SbkObject *>(self);
    PySide::Feature::Select(self);
    if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::KCalendarCore::CalFilter >()))
        return -1;

    ::KCalendarCore::CalFilter *cptr{};
    Shiboken::AutoDecRef errInfo{};
    Shiboken::PythonContextMarker pcm;
    int overloadId = -1;
    [[maybe_unused]] Shiboken::Conversions::PythonToCppConversion pythonToCpp[1];
    const Py_ssize_t numArgs = PyTuple_Size(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {nullptr};

    // invalid argument lengths

    if (PyArg_UnpackTuple(args, "CalFilter", 0, 1, &(pyArgs[0])) == 0)
        return -1;


    // Overloaded function decisor
    // 0: CalFilter::CalFilter()
    // 1: CalFilter::CalFilter(const QString&)
    if (numArgs == 0) {
        overloadId = 0; // CalFilter()
    } else if (numArgs == 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QString_IDX], (pyArgs[0])))) {
        overloadId = 1; // CalFilter::CalFilter(const QString&)
    }

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments_MinusOne(args, "__init__", SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]);


    // PyMI support
    Shiboken::callInheritedInit(self, args, kwds, SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]);
    if (Shiboken::Errors::occurred() != nullptr)
        return -1;

    // Call function/method
    switch (overloadId) {
        case 0: // CalFilter()
        {

            // CalFilter::CalFilter()
            cptr = new ::KCalendarCore::CalFilter();
            break;
        }
        case 1: // CalFilter(const QString &name)
        {
            ::QString cppArg0;
            pythonToCpp[0](pyArgs[0], &cppArg0);

            if (Shiboken::Errors::occurred() == nullptr) {
                // CalFilter::CalFilter(const QString&)
                cptr = new ::KCalendarCore::CalFilter(cppArg0);
            }
            break;
        }
    }

    if (Shiboken::Errors::occurred() != nullptr || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::KCalendarCore::CalFilter >(), cptr)) {
        delete cptr;
        return -1;
    }
    if (cptr == nullptr)
        return Shiboken::returnWrongArguments_MinusOne(args, "__init__", SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]);

    Shiboken::Object::setValidCpp(sbkSelf, true);
    Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr);


    return 1;
}

static PyObject *Sbk_KCalendarCore_CalFilterFunc_categoryList(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::KCalendarCore::CalFilter *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult{};
    Shiboken::PythonContextMarker pcm;

    // Call function/method
    {

        // CalFilter::categoryList()const->QStringList
        QStringList cppResult = const_cast<const ::KCalendarCore::CalFilter *>(cppSelf)->categoryList();
        pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QStringList_IDX], &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

static PyObject *Sbk_KCalendarCore_CalFilterFunc_completedTimeSpan(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::KCalendarCore::CalFilter *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult{};
    Shiboken::PythonContextMarker pcm;

    // Call function/method
    {

        // CalFilter::completedTimeSpan()const->int
        int cppResult = const_cast<const ::KCalendarCore::CalFilter *>(cppSelf)->completedTimeSpan();
        pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

static PyObject *Sbk_KCalendarCore_CalFilterFunc_criteria(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::KCalendarCore::CalFilter *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult{};
    Shiboken::PythonContextMarker pcm;

    // Call function/method
    {

        // CalFilter::criteria()const->int
        int cppResult = const_cast<const ::KCalendarCore::CalFilter *>(cppSelf)->criteria();
        pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

static PyObject *Sbk_KCalendarCore_CalFilterFunc_emailList(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::KCalendarCore::CalFilter *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult{};
    Shiboken::PythonContextMarker pcm;

    // Call function/method
    {

        // CalFilter::emailList()const->QStringList
        QStringList cppResult = const_cast<const ::KCalendarCore::CalFilter *>(cppSelf)->emailList();
        pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QStringList_IDX], &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

static PyObject *Sbk_KCalendarCore_CalFilterFunc_isEnabled(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::KCalendarCore::CalFilter *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult{};
    Shiboken::PythonContextMarker pcm;

    // Call function/method
    {

        // CalFilter::isEnabled()const->bool
        bool cppResult = const_cast<const ::KCalendarCore::CalFilter *>(cppSelf)->isEnabled();
        pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

static PyObject *Sbk_KCalendarCore_CalFilterFunc_name(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::KCalendarCore::CalFilter *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult{};
    Shiboken::PythonContextMarker pcm;

    // Call function/method
    {

        // CalFilter::name()const->QString
        QString cppResult = const_cast<const ::KCalendarCore::CalFilter *>(cppSelf)->name();
        pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QString_IDX], &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

static PyObject *Sbk_KCalendarCore_CalFilterFunc_setCategoryList(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::KCalendarCore::CalFilter *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]), reinterpret_cast<SbkObject *>(self)));
    Shiboken::AutoDecRef errInfo{};
    Shiboken::PythonContextMarker pcm;
    int overloadId = -1;
    [[maybe_unused]] Shiboken::Conversions::PythonToCppConversion pythonToCpp;

    // Overloaded function decisor
    // 0: CalFilter::setCategoryList(const QStringList&)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QStringList_IDX], (pyArg)))) {
        overloadId = 0; // CalFilter::setCategoryList(const QStringList&)
    }

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(pyArg, "setCategoryList", SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]);

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

        if (Shiboken::Errors::occurred() == nullptr) {
            // CalFilter::setCategoryList(const QStringList&)
            cppSelf->setCategoryList(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

static PyObject *Sbk_KCalendarCore_CalFilterFunc_setCompletedTimeSpan(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::KCalendarCore::CalFilter *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]), reinterpret_cast<SbkObject *>(self)));
    Shiboken::AutoDecRef errInfo{};
    Shiboken::PythonContextMarker pcm;
    int overloadId = -1;
    [[maybe_unused]] Shiboken::Conversions::PythonToCppConversion pythonToCpp;

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

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(pyArg, "setCompletedTimeSpan", SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]);

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

        if (Shiboken::Errors::occurred() == nullptr) {
            // CalFilter::setCompletedTimeSpan(int)
            cppSelf->setCompletedTimeSpan(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

static PyObject *Sbk_KCalendarCore_CalFilterFunc_setCriteria(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::KCalendarCore::CalFilter *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]), reinterpret_cast<SbkObject *>(self)));
    Shiboken::AutoDecRef errInfo{};
    Shiboken::PythonContextMarker pcm;
    int overloadId = -1;
    [[maybe_unused]] Shiboken::Conversions::PythonToCppConversion pythonToCpp;

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

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(pyArg, "setCriteria", SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]);

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

        if (Shiboken::Errors::occurred() == nullptr) {
            // CalFilter::setCriteria(int)
            cppSelf->setCriteria(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

static PyObject *Sbk_KCalendarCore_CalFilterFunc_setEmailList(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::KCalendarCore::CalFilter *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]), reinterpret_cast<SbkObject *>(self)));
    Shiboken::AutoDecRef errInfo{};
    Shiboken::PythonContextMarker pcm;
    int overloadId = -1;
    [[maybe_unused]] Shiboken::Conversions::PythonToCppConversion pythonToCpp;

    // Overloaded function decisor
    // 0: CalFilter::setEmailList(const QStringList&)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QStringList_IDX], (pyArg)))) {
        overloadId = 0; // CalFilter::setEmailList(const QStringList&)
    }

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(pyArg, "setEmailList", SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]);

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

        if (Shiboken::Errors::occurred() == nullptr) {
            // CalFilter::setEmailList(const QStringList&)
            cppSelf->setEmailList(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

static PyObject *Sbk_KCalendarCore_CalFilterFunc_setEnabled(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::KCalendarCore::CalFilter *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]), reinterpret_cast<SbkObject *>(self)));
    Shiboken::AutoDecRef errInfo{};
    Shiboken::PythonContextMarker pcm;
    int overloadId = -1;
    [[maybe_unused]] Shiboken::Conversions::PythonToCppConversion pythonToCpp;

    // Overloaded function decisor
    // 0: CalFilter::setEnabled(bool)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), (pyArg)))) {
        overloadId = 0; // CalFilter::setEnabled(bool)
    }

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(pyArg, "setEnabled", SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]);

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

        if (Shiboken::Errors::occurred() == nullptr) {
            // CalFilter::setEnabled(bool)
            cppSelf->setEnabled(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

static PyObject *Sbk_KCalendarCore_CalFilterFunc_setName(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::KCalendarCore::CalFilter *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]), reinterpret_cast<SbkObject *>(self)));
    Shiboken::AutoDecRef errInfo{};
    Shiboken::PythonContextMarker pcm;
    int overloadId = -1;
    [[maybe_unused]] Shiboken::Conversions::PythonToCppConversion pythonToCpp;

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

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(pyArg, "setName", SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]);

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

        if (Shiboken::Errors::occurred() == nullptr) {
            // CalFilter::setName(const QString&)
            cppSelf->setName(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}


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

static const char *Sbk_KCalendarCore_CalFilter_EnumFlagInfo[] = {
    "Criteria:IntEnum",
    nullptr // Sentinel
};

static PyMethodDef Sbk_KCalendarCore_CalFilter_methods[] = {
    {"categoryList", reinterpret_cast<PyCFunction>(Sbk_KCalendarCore_CalFilterFunc_categoryList), METH_NOARGS, nullptr},
    {"completedTimeSpan", reinterpret_cast<PyCFunction>(Sbk_KCalendarCore_CalFilterFunc_completedTimeSpan), METH_NOARGS, nullptr},
    {"criteria", reinterpret_cast<PyCFunction>(Sbk_KCalendarCore_CalFilterFunc_criteria), METH_NOARGS, nullptr},
    {"emailList", reinterpret_cast<PyCFunction>(Sbk_KCalendarCore_CalFilterFunc_emailList), METH_NOARGS, nullptr},
    {"isEnabled", reinterpret_cast<PyCFunction>(Sbk_KCalendarCore_CalFilterFunc_isEnabled), METH_NOARGS, nullptr},
    {"name", reinterpret_cast<PyCFunction>(Sbk_KCalendarCore_CalFilterFunc_name), METH_NOARGS, nullptr},
    {"setCategoryList", reinterpret_cast<PyCFunction>(Sbk_KCalendarCore_CalFilterFunc_setCategoryList), METH_O, nullptr},
    {"setCompletedTimeSpan", reinterpret_cast<PyCFunction>(Sbk_KCalendarCore_CalFilterFunc_setCompletedTimeSpan), METH_O, nullptr},
    {"setCriteria", reinterpret_cast<PyCFunction>(Sbk_KCalendarCore_CalFilterFunc_setCriteria), METH_O, nullptr},
    {"setEmailList", reinterpret_cast<PyCFunction>(Sbk_KCalendarCore_CalFilterFunc_setEmailList), METH_O, nullptr},
    {"setEnabled", reinterpret_cast<PyCFunction>(Sbk_KCalendarCore_CalFilterFunc_setEnabled), METH_O, nullptr},
    {"setName", reinterpret_cast<PyCFunction>(Sbk_KCalendarCore_CalFilterFunc_setName), METH_O, nullptr},
    {nullptr, nullptr, 0, nullptr} // Sentinel
};

// Rich comparison
static PyObject * Sbk_KCalendarCore_CalFilter_richcompare(PyObject *self, PyObject *pyArg, int op)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto &cppSelf = *reinterpret_cast< ::KCalendarCore::CalFilter *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult{};
    [[maybe_unused]] Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    switch (op) {
        case Py_EQ:
            if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX]), (pyArg)))) {
                // CalFilter::operator==(const KCalendarCore::CalFilter&)const->bool
                if (!Shiboken::Object::isValid(pyArg))
                    return {};
                ::KCalendarCore::CalFilter *cppArg0;
                pythonToCpp(pyArg, &cppArg0);
                bool cppResult = cppSelf == (*cppArg0);
                pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
            } else {
                pyResult = Py_False;
                Py_INCREF(pyResult);
            }

            break;
        default:
            // PYSIDE-74: By default, we redirect to object's tp_richcompare (which is `==`, `!=`).
            return FallbackRichCompare(self, pyArg, op);
    }

    return Shiboken::returnFromRichCompare(pyResult);
}

} // extern "C"

static int Sbk_KCalendarCore_CalFilter_traverse(PyObject *self, visitproc visit, void *arg)
{
    auto traverseProc = reinterpret_cast<traverseproc>(PyType_GetSlot(SbkObject_TypeF(), Py_tp_traverse));
    ;
    return traverseProc(self, visit, arg);
}
static int Sbk_KCalendarCore_CalFilter_clear(PyObject *self)
{
    auto clearProc = reinterpret_cast<inquiry>(PyType_GetSlot(SbkObject_TypeF(), Py_tp_clear));
    ;
    return clearProc(self);
}

// Class Definition -----------------------------------------------
extern "C" {

static PyType_Slot Sbk_KCalendarCore_CalFilter_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(&SbkDeallocWrapper)},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_KCalendarCore_CalFilter_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_KCalendarCore_CalFilter_clear)},
    {Py_tp_richcompare, reinterpret_cast<void *>(Sbk_KCalendarCore_CalFilter_richcompare)},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_KCalendarCore_CalFilter_methods)},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_KCalendarCore_CalFilter_Init)},
    {Py_tp_new,         reinterpret_cast<void *>(SbkObject_tp_new)},
    {0, nullptr}
};
static PyType_Spec Sbk_KCalendarCore_CalFilter_spec = {
    "1:KCalendarCore.KCalendarCore.CalFilter",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_KCalendarCore_CalFilter_slots
};

} //extern "C"

// Type conversion functions.

// Python to C++ enum conversion.
static void Enum_PythonToCpp_KCalendarCore_CalFilter_Criteria(PyObject *pyIn, void *cppOut)
{
    const auto value = static_cast<::KCalendarCore::CalFilter::Criteria>(Shiboken::Enum::getValue(pyIn));
    *reinterpret_cast<::KCalendarCore::CalFilter::Criteria *>(cppOut) = value;

}
static PythonToCppFunc is_Enum_PythonToCpp_KCalendarCore_CalFilter_Criteria_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_Criteria_IDX])))
        return Enum_PythonToCpp_KCalendarCore_CalFilter_Criteria;
    return {};
}

static PyObject *KCalendarCore_CalFilter_Criteria_CppToPython_Enum(PyTypeObject *pyType, const void *cppIn)
{
    using IntType = std::underlying_type_t<::KCalendarCore::CalFilter::Criteria>;
    const auto castCppIn = IntType(*reinterpret_cast<const ::KCalendarCore::CalFilter::Criteria *>(cppIn));
    return Shiboken::Enum::newItem(pyType, castCppIn);

}

// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity).
static void CalFilter_PythonToCpp_CalFilter_PTR(PyObject *pyIn, void *cppOut)
{
    Shiboken::Conversions::pythonToCppPointer(Sbk_KCalendarCore_CalFilter_TypeF(), pyIn, cppOut);
}
static PythonToCppFunc is_CalFilter_PythonToCpp_CalFilter_PTR_Convertible(PyObject *pyIn)
{
    if (pyIn == Py_None)
        return Shiboken::Conversions::nonePythonToCppNullPtr;
    if (PyObject_TypeCheck(pyIn, Sbk_KCalendarCore_CalFilter_TypeF()))
        return CalFilter_PythonToCpp_CalFilter_PTR;
    return {};
}

// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity).
static PyObject *CalFilter_PTR_CppToPython_CalFilter(const void *cppIn)
{
    auto *pyOut = reinterpret_cast<PyObject *>(Shiboken::BindingManager::instance().retrieveWrapper(cppIn, Sbk_KCalendarCore_CalFilter_TypeF()));
    if (pyOut) {
        Py_INCREF(pyOut);
        return pyOut;
    }
    return Shiboken::Object::newObjectWithHeuristics(Sbk_KCalendarCore_CalFilter_TypeF(), const_cast<void *>(cppIn), false);

}

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
#if PYSIDE6_COMOPT_COMPRESS == 0
static const char *KCalendarCore_CalFilter_SignatureStrings[] = {
    "1:KCalendarCore.KCalendarCore.CalFilter(self)",
    "0:KCalendarCore.KCalendarCore.CalFilter(self,name:QString)",
    "KCalendarCore.KCalendarCore.CalFilter.categoryList(self)->QStringList",
    "KCalendarCore.KCalendarCore.CalFilter.completedTimeSpan(self)->int",
    "KCalendarCore.KCalendarCore.CalFilter.criteria(self)->int",
    "KCalendarCore.KCalendarCore.CalFilter.emailList(self)->QStringList",
    "KCalendarCore.KCalendarCore.CalFilter.isEnabled(self)->bool",
    "KCalendarCore.KCalendarCore.CalFilter.name(self)->QString",
    "KCalendarCore.KCalendarCore.CalFilter.setCategoryList(self,categoryList:QStringList)",
    "KCalendarCore.KCalendarCore.CalFilter.setCompletedTimeSpan(self,timespan:int)",
    "KCalendarCore.KCalendarCore.CalFilter.setCriteria(self,criteria:int)",
    "KCalendarCore.KCalendarCore.CalFilter.setEmailList(self,emailList:QStringList)",
    "KCalendarCore.KCalendarCore.CalFilter.setEnabled(self,enabled:bool)",
    "KCalendarCore.KCalendarCore.CalFilter.setName(self,name:QString)",
    "KCalendarCore.KCalendarCore.CalFilter.__eq__(self,filter:KCalendarCore.KCalendarCore.CalFilter)->bool",
    nullptr}; // Sentinel
#else
static constexpr size_t KCalendarCore_CalFilter_SignatureByteSize = 218;
static constexpr uint8_t KCalendarCore_CalFilter_SignatureBytes[218] = {
    0x78, 0xda, 0xa5, 0x93, 0xb1, 0x0e, 0x82, 0x30, 0x14, 0x45, 0x77, 0xbe, 0x44, 0x92, 0x4a, 0x74,
    0xed, 0xe0, 0x42, 0x70, 0xd1, 0x98, 0x18, 0xdc, 0x49, 0x91, 0x07, 0x79, 0x49, 0x69, 0xb1, 0xed,
    0xe2, 0xdf, 0x5b, 0xc4, 0x9a, 0x42, 0x1c, 0x5a, 0x9c, 0xc8, 0x6d, 0xb8, 0xa7, 0xf4, 0x1d, 0xba,
    0xa7, 0xa7, 0x9c, 0x71, 0x10, 0x0d, 0x53, 0xb9, 0x54, 0x90, 0xcd, 0x93, 0x0d, 0x47, 0xe4, 0x06,
    0xd4, 0x46, 0x03, 0x6f, 0xd3, 0x64, 0x17, 0xf1, 0x36, 0x11, 0xac, 0x07, 0x7a, 0x2d, 0x8d, 0x42,
    0xd1, 0xa5, 0x49, 0x50, 0x31, 0xbb, 0x33, 0x03, 0x9d, 0x54, 0xcf, 0x33, 0x6a, 0x33, 0xed, 0xb9,
    0x3d, 0x7c, 0x10, 0xe3, 0x52, 0x28, 0x45, 0xf6, 0x03, 0x07, 0x03, 0xcd, 0x0d, 0x7b, 0x28, 0x07,
    0x26, 0x1c, 0x0a, 0x45, 0x30, 0x42, 0xa1, 0x7d, 0x20, 0x8b, 0x6f, 0x42, 0xcf, 0x90, 0xff, 0xf7,
    0xfd, 0xa8, 0x0b, 0xc1, 0x6a, 0x0e, 0x8d, 0x43, 0xd4, 0x52, 0xf2, 0xc0, 0xee, 0x38, 0xf5, 0xc5,
    0xce, 0x81, 0x4d, 0x0d, 0x26, 0x5f, 0x8e, 0x9f, 0xf8, 0x42, 0xa8, 0x77, 0x92, 0x34, 0x02, 0xfa,
    0xd3, 0x06, 0x31, 0x36, 0x69, 0x9b, 0xa8, 0x1d, 0x6d, 0x0c, 0xcd, 0x17, 0x43, 0x9c, 0xa6, 0x48,
    0x48, 0x31, 0x73, 0x44, 0xbe, 0xca, 0x56, 0x9e, 0xd0, 0xb7, 0x45, 0x60, 0x0a, 0x74, 0x74, 0x16,
    0xc1, 0xb8, 0x38, 0x6f, 0xab, 0xee, 0x4d, 0x55, 0xc1, 0xa3, 0xaa, 0xa6, 0x7e, 0xfb, 0x5e, 0x0a,
    0xbb, 0xa9, 0xee, 0xdf, 0x7a, 0x01, 0x1d, 0x58, 0x77, 0x0c
};
#endif

PyTypeObject *init_KCalendarCore_CalFilter(PyObject *enclosingClass)
{
    auto &typeStruct = SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_IDX];
    if (typeStruct.type != nullptr)
        return typeStruct.type;

    auto *base1 = SbkObject_TypeF();
    Shiboken::AutoDecRef Sbk_KCalendarCore_CalFilter_Type_bases(PyTuple_Pack(1, base1));

    PyTypeObject *pyType = Shiboken::ObjectType::introduceWrapperType(
        enclosingClass,
        "CalFilter",
        "KCalendarCore::CalFilter*",
        &Sbk_KCalendarCore_CalFilter_spec,
        &Shiboken::callCppDestructor< ::KCalendarCore::CalFilter >,
        Sbk_KCalendarCore_CalFilter_Type_bases.object(),
        Shiboken::ObjectType::WrapperFlags::InnerClass);
#if PYSIDE6_COMOPT_COMPRESS == 0
    InitSignatureStrings(pyType, KCalendarCore_CalFilter_SignatureStrings);
#else
    InitSignatureBytes(pyType, KCalendarCore_CalFilter_SignatureBytes, KCalendarCore_CalFilter_SignatureByteSize);
#endif
    SbkObjectType_SetPropertyStrings(pyType, Sbk_KCalendarCore_CalFilter_PropertyStrings);
    typeStruct.type = pyType;

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(pyType,
        CalFilter_PythonToCpp_CalFilter_PTR,
        is_CalFilter_PythonToCpp_CalFilter_PTR_Convertible,
        CalFilter_PTR_CppToPython_CalFilter);

    Shiboken::Conversions::registerConverterName(converter, "KCalendarCore::CalFilter");
    Shiboken::Conversions::registerConverterName(converter, "KCalendarCore::CalFilter*");
    Shiboken::Conversions::registerConverterName(converter, "KCalendarCore::CalFilter&");
    Shiboken::Conversions::registerConverterAlias(converter, "CalFilter");
    Shiboken::Conversions::registerConverterAlias(converter, "CalFilter*");
    Shiboken::Conversions::registerConverterAlias(converter, "CalFilter&");
    Shiboken::Conversions::registerConverterName(converter, typeid(::KCalendarCore::CalFilter).name());

    // Pass the ..._EnumFlagInfo to the class.
    SbkObjectType_SetEnumFlagInfo(pyType, Sbk_KCalendarCore_CalFilter_EnumFlagInfo);

    // Initialization of enums.
    Shiboken::AutoDecRef tpDict{};
    [[maybe_unused]] PyTypeObject *EType{};

    // Initialization of enum 'Criteria'.
    const char *Criteria_Initializer[] = {
        "HideRecurring",
        "HideCompletedTodos",
        "ShowCategories",
        "HideInactiveTodos",
        "HideNoMatchingAttendeeTodos",
        nullptr};
    // "uint8_t" used instead of "unsigned int"
    constexpr uint8_t Criteria_InitializerValues[] = {
        uint8_t(KCalendarCore::CalFilter::Criteria::HideRecurring),              //  0x01  1
        uint8_t(KCalendarCore::CalFilter::Criteria::HideCompletedTodos),         //  0x02  2
        uint8_t(KCalendarCore::CalFilter::Criteria::ShowCategories),             //  0x04  4
        uint8_t(KCalendarCore::CalFilter::Criteria::HideInactiveTodos),          //  0x08  8
        uint8_t(KCalendarCore::CalFilter::Criteria::HideNoMatchingAttendeeTodos) //  0x10  16
        };
    EType = Shiboken::Enum::createPythonEnum(pyType,
        "1:KCalendarCore.KCalendarCore.CalFilter.Criteria",
        Criteria_Initializer, Criteria_InitializerValues);
    SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFilter_Criteria_IDX].type = EType;
    // Register converter for enum 'KCalendarCore::CalFilter::Criteria'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(EType,
            KCalendarCore_CalFilter_Criteria_CppToPython_Enum);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            Enum_PythonToCpp_KCalendarCore_CalFilter_Criteria,
            is_Enum_PythonToCpp_KCalendarCore_CalFilter_Criteria_Convertible);
        Shiboken::Conversions::registerConverterName(converter, "KCalendarCore::CalFilter::Criteria");
        Shiboken::Conversions::registerConverterAlias(converter, "CalFilter::Criteria");
        Shiboken::Conversions::registerConverterAlias(converter, "Criteria");
        Shiboken::Enum::setTypeConverter(EType, converter, nullptr);
    }
    // End of 'Criteria' enum.

    qRegisterMetaType< ::KCalendarCore::CalFilter *>();
    qRegisterMetaType< ::KCalendarCore::CalFilter::Criteria >("CalFilter::Criteria");
    qRegisterMetaType< ::KCalendarCore::CalFilter::Criteria >("KCalendarCore::CalFilter::Criteria");

    return pyType;
}
