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

// main header
#include "klineediteventhandler_wrapper.h"

// Argument includes
#include <qobject.h>

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


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

extern "C" {
static int Sbk_KLineEditEventHandler_Init(PyObject *, PyObject *, PyObject *)
{
    Shiboken::Errors::setInstantiateNamespace("KLineEditEventHandler");
    return -1;
}

static PyObject *Sbk_KLineEditEventHandlerFunc_catchReturnKey([[maybe_unused]] PyObject *self, PyObject *pyArg)
{
    Shiboken::AutoDecRef errInfo{};
    Shiboken::PythonContextMarker pcm;
    int overloadId = -1;
    [[maybe_unused]] Shiboken::Conversions::PythonToCppConversion pythonToCpp;

    // Overloaded function decisor
    // 0: static KLineEditEventHandler::catchReturnKey(QObject*)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QObject_IDX]), (pyArg)))) {
        overloadId = 0; // static KLineEditEventHandler::catchReturnKey(QObject*)
    }

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(pyArg, "catchReturnKey", SbkKWidgetsAddonsTypeStructs[SBK_KWidgetsAddonsKLineEditEventHandler_IDX]);

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArg))
            return {};
        ::QObject *cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (Shiboken::Errors::occurred() == nullptr) {
            // static KLineEditEventHandler::catchReturnKey(QObject*)
            ::KLineEditEventHandler::catchReturnKey(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

static PyObject *Sbk_KLineEditEventHandlerFunc_handleUrlDrops([[maybe_unused]] PyObject *self, PyObject *pyArg)
{
    Shiboken::AutoDecRef errInfo{};
    Shiboken::PythonContextMarker pcm;
    int overloadId = -1;
    [[maybe_unused]] Shiboken::Conversions::PythonToCppConversion pythonToCpp;

    // Overloaded function decisor
    // 0: static KLineEditEventHandler::handleUrlDrops(QObject*)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QObject_IDX]), (pyArg)))) {
        overloadId = 0; // static KLineEditEventHandler::handleUrlDrops(QObject*)
    }

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(pyArg, "handleUrlDrops", SbkKWidgetsAddonsTypeStructs[SBK_KWidgetsAddonsKLineEditEventHandler_IDX]);

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArg))
            return {};
        ::QObject *cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (Shiboken::Errors::occurred() == nullptr) {
            // static KLineEditEventHandler::handleUrlDrops(QObject*)
            ::KLineEditEventHandler::handleUrlDrops(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}


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

static PyMethodDef Sbk_KLineEditEventHandler_methods[] = {
    {"catchReturnKey", reinterpret_cast<PyCFunction>(Sbk_KLineEditEventHandlerFunc_catchReturnKey), METH_O|METH_STATIC, nullptr},
    {"handleUrlDrops", reinterpret_cast<PyCFunction>(Sbk_KLineEditEventHandlerFunc_handleUrlDrops), METH_O|METH_STATIC, nullptr},
    {nullptr, nullptr, 0, nullptr} // Sentinel
};

} // extern "C"

static int Sbk_KLineEditEventHandler_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_KLineEditEventHandler_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_KLineEditEventHandler_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(Sbk_object_dealloc /* PYSIDE-832: Prevent replacement of "0" with subtype_dealloc. */)},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_KLineEditEventHandler_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_KLineEditEventHandler_clear)},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_KLineEditEventHandler_methods)},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_KLineEditEventHandler_Init)},
    {Py_tp_new,         reinterpret_cast<void *>(SbkDummyNew /* PYSIDE-595: Prevent replacement of "0" with base->tp_new. */)},
    {0, nullptr}
};
static PyType_Spec Sbk_KLineEditEventHandler_spec = {
    "1:KWidgetsAddons.KLineEditEventHandler",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_KLineEditEventHandler_slots
};

} //extern "C"

// Type conversion functions.

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
#if PYSIDE6_COMOPT_COMPRESS == 0
static const char *KWidgetsAddonsKLineEditEventHandler_SignatureStrings[] = {
    "KWidgetsAddons.KLineEditEventHandler.catchReturnKey(lineEdit:PySide6.QtCore.QObject)",
    "KWidgetsAddons.KLineEditEventHandler.handleUrlDrops(lineEdit:PySide6.QtCore.QObject)",
    nullptr}; // Sentinel
#else
static constexpr size_t KWidgetsAddonsKLineEditEventHandler_SignatureByteSize = 104;
static constexpr uint8_t KWidgetsAddonsKLineEditEventHandler_SignatureBytes[104] = {
    0x78, 0xda, 0xf3, 0x0e, 0xcf, 0x4c, 0x49, 0x4f, 0x2d, 0x29, 0x76, 0x4c, 0x49, 0xc9, 0xcf, 0x2b,
    0xd6, 0xf3, 0xf6, 0xc9, 0xcc, 0x4b, 0x75, 0x4d, 0xc9, 0x2c, 0x71, 0x2d, 0x4b, 0xcd, 0x2b, 0xf1,
    0x48, 0xcc, 0x4b, 0xc9, 0x49, 0x2d, 0xd2, 0x4b, 0x4e, 0x2c, 0x49, 0xce, 0x08, 0x4a, 0x2d, 0x29,
    0x2d, 0xca, 0xf3, 0x4e, 0xad, 0xd4, 0xc8, 0x81, 0xaa, 0xb1, 0x0a, 0xa8, 0x0c, 0xce, 0x4c, 0x49,
    0x35, 0xd3, 0x0b, 0x2c, 0x71, 0xce, 0x2f, 0x4a, 0xd5, 0x0b, 0xf4, 0x4f, 0xca, 0x4a, 0x4d, 0x2e,
    0xd1, 0xe4, 0xf2, 0x26, 0xc6, 0xd0, 0x0c, 0x30, 0x1d, 0x5a, 0x94, 0xe3, 0x52, 0x94, 0x5f, 0x50,
    0x4c, 0xd8, 0x50, 0x00, 0x21, 0x68, 0x3e, 0x66
};
#endif

PyTypeObject *init_KWidgetsAddonsKLineEditEventHandler(PyObject *module)
{
    auto &typeStruct = SbkKWidgetsAddonsTypeStructs[SBK_KWidgetsAddonsKLineEditEventHandler_IDX];
    if (typeStruct.type != nullptr)
        return typeStruct.type;

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

    PyTypeObject *pyType = Shiboken::ObjectType::introduceWrapperType(
        module,
        "KLineEditEventHandler",
        "KLineEditEventHandler",
        &Sbk_KLineEditEventHandler_spec,
        nullptr,
        Sbk_KLineEditEventHandler_Type_bases.object(),
        0);
#if PYSIDE6_COMOPT_COMPRESS == 0
    InitSignatureStrings(pyType, KWidgetsAddonsKLineEditEventHandler_SignatureStrings);
#else
    InitSignatureBytes(pyType, KWidgetsAddonsKLineEditEventHandler_SignatureBytes, KWidgetsAddonsKLineEditEventHandler_SignatureByteSize);
#endif
    SbkObjectType_SetPropertyStrings(pyType, Sbk_KLineEditEventHandler_PropertyStrings);
    typeStruct.type = pyType;



    return pyType;
}
