/*
 * Interface wrapper code.
 *
 * Generated by SIP 4.19.3
 */

#include "sipAPIKItemModels.h"

#include <kmodelindexproxymapper.h>

#include <qabstractitemmodel.h>
#include <qobject.h>
#include <qitemselectionmodel.h>
#include <qabstractitemmodel.h>
#include <qmetaobject.h>
#include <qcoreevent.h>
#include <qcoreevent.h>
#include <qcoreevent.h>
#include <qstring.h>
#include <qvariant.h>
#include <qlist.h>
#include <qbytearray.h>
#include <qlist.h>
#include <qnamespace.h>
#include <qthread.h>
#include <qnamespace.h>
#include <qregexp.h>
#include <qregularexpression.h>
#include <qobjectdefs.h>


class sipKModelIndexProxyMapper : public  ::KModelIndexProxyMapper
{
public:
    sipKModelIndexProxyMapper(const  ::QAbstractItemModel*,const  ::QAbstractItemModel*, ::QObject*);
    virtual ~sipKModelIndexProxyMapper();

    int qt_metacall(QMetaObject::Call,int,void **);
    void *qt_metacast(const char *);
    const QMetaObject *metaObject() const;

    /*
     * There is a public method for every protected method visible from
     * this class.
     */
     ::QObject* sipProtect_sender() const;
    int sipProtect_receivers(const char*) const;
    void sipProtectVirt_timerEvent(bool, ::QTimerEvent*);
    void sipProtectVirt_childEvent(bool, ::QChildEvent*);
    void sipProtectVirt_customEvent(bool, ::QEvent*);
    void sipProtectVirt_connectNotify(bool,const  ::QMetaMethod&);
    void sipProtectVirt_disconnectNotify(bool,const  ::QMetaMethod&);
    int sipProtect_senderSignalIndex() const;
    bool sipProtect_isSignalConnected(const  ::QMetaMethod&) const;

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    bool event( ::QEvent*);
    bool eventFilter( ::QObject*, ::QEvent*);
    void timerEvent( ::QTimerEvent*);
    void childEvent( ::QChildEvent*);
    void customEvent( ::QEvent*);
    void connectNotify(const  ::QMetaMethod&);
    void disconnectNotify(const  ::QMetaMethod&);

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[7];
};

sipKModelIndexProxyMapper::sipKModelIndexProxyMapper(const  ::QAbstractItemModel*a0,const  ::QAbstractItemModel*a1, ::QObject*a2):  ::KModelIndexProxyMapper(a0,a1,a2), sipPySelf(0)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipKModelIndexProxyMapper::~sipKModelIndexProxyMapper()
{
    sipInstanceDestroyed(sipPySelf);
}

const QMetaObject *sipKModelIndexProxyMapper::metaObject() const
{
    if (sipGetInterpreter())
        return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : sip_KItemModels_qt_metaobject(sipPySelf,sipType_KModelIndexProxyMapper);

    return  ::KModelIndexProxyMapper::metaObject();
}

int sipKModelIndexProxyMapper::qt_metacall(QMetaObject::Call _c,int _id,void **_a)
{
    _id =  ::KModelIndexProxyMapper::qt_metacall(_c,_id,_a);

    if (_id >= 0)
        _id = sip_KItemModels_qt_metacall(sipPySelf,sipType_KModelIndexProxyMapper,_c,_id,_a);

    return _id;
}

void *sipKModelIndexProxyMapper::qt_metacast(const char *_clname)
{
    void *sipCpp;

    return (sip_KItemModels_qt_metacast(sipPySelf, sipType_KModelIndexProxyMapper, _clname, &sipCpp) ? sipCpp :  ::KModelIndexProxyMapper::qt_metacast(_clname));
}

bool sipKModelIndexProxyMapper::event( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[0],sipPySelf,NULL,sipName_event);

    if (!sipMeth)
        return  ::KModelIndexProxyMapper::event(a0);

    extern bool sipVH_KItemModels_3(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QEvent*);

    return sipVH_KItemModels_3(sipGILState, sipImportedVirtErrorHandlers_KItemModels_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipKModelIndexProxyMapper::eventFilter( ::QObject*a0, ::QEvent*a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[1],sipPySelf,NULL,sipName_eventFilter);

    if (!sipMeth)
        return  ::KModelIndexProxyMapper::eventFilter(a0,a1);

    extern bool sipVH_KItemModels_4(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QObject*, ::QEvent*);

    return sipVH_KItemModels_4(sipGILState, sipImportedVirtErrorHandlers_KItemModels_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}

void sipKModelIndexProxyMapper::timerEvent( ::QTimerEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[2],sipPySelf,NULL,sipName_timerEvent);

    if (!sipMeth)
    {
         ::KModelIndexProxyMapper::timerEvent(a0);
        return;
    }

    extern void sipVH_KItemModels_5(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QTimerEvent*);

    sipVH_KItemModels_5(sipGILState, sipImportedVirtErrorHandlers_KItemModels_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipKModelIndexProxyMapper::childEvent( ::QChildEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[3],sipPySelf,NULL,sipName_childEvent);

    if (!sipMeth)
    {
         ::KModelIndexProxyMapper::childEvent(a0);
        return;
    }

    extern void sipVH_KItemModels_6(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QChildEvent*);

    sipVH_KItemModels_6(sipGILState, sipImportedVirtErrorHandlers_KItemModels_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipKModelIndexProxyMapper::customEvent( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[4],sipPySelf,NULL,sipName_customEvent);

    if (!sipMeth)
    {
         ::KModelIndexProxyMapper::customEvent(a0);
        return;
    }

    extern void sipVH_KItemModels_7(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QEvent*);

    sipVH_KItemModels_7(sipGILState, sipImportedVirtErrorHandlers_KItemModels_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipKModelIndexProxyMapper::connectNotify(const  ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[5],sipPySelf,NULL,sipName_connectNotify);

    if (!sipMeth)
    {
         ::KModelIndexProxyMapper::connectNotify(a0);
        return;
    }

    extern void sipVH_KItemModels_8(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMetaMethod&);

    sipVH_KItemModels_8(sipGILState, sipImportedVirtErrorHandlers_KItemModels_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipKModelIndexProxyMapper::disconnectNotify(const  ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[6],sipPySelf,NULL,sipName_disconnectNotify);

    if (!sipMeth)
    {
         ::KModelIndexProxyMapper::disconnectNotify(a0);
        return;
    }

    extern void sipVH_KItemModels_8(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMetaMethod&);

    sipVH_KItemModels_8(sipGILState, sipImportedVirtErrorHandlers_KItemModels_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

 ::QObject* sipKModelIndexProxyMapper::sipProtect_sender() const
{
    return  ::QObject::sender();
}

int sipKModelIndexProxyMapper::sipProtect_receivers(const char*a0) const
{
    return  ::QObject::receivers(a0);
}

void sipKModelIndexProxyMapper::sipProtectVirt_timerEvent(bool sipSelfWasArg, ::QTimerEvent*a0)
{
    (sipSelfWasArg ?  ::QObject::timerEvent(a0) : timerEvent(a0));
}

void sipKModelIndexProxyMapper::sipProtectVirt_childEvent(bool sipSelfWasArg, ::QChildEvent*a0)
{
    (sipSelfWasArg ?  ::QObject::childEvent(a0) : childEvent(a0));
}

void sipKModelIndexProxyMapper::sipProtectVirt_customEvent(bool sipSelfWasArg, ::QEvent*a0)
{
    (sipSelfWasArg ?  ::QObject::customEvent(a0) : customEvent(a0));
}

void sipKModelIndexProxyMapper::sipProtectVirt_connectNotify(bool sipSelfWasArg,const  ::QMetaMethod& a0)
{
    (sipSelfWasArg ?  ::QObject::connectNotify(a0) : connectNotify(a0));
}

void sipKModelIndexProxyMapper::sipProtectVirt_disconnectNotify(bool sipSelfWasArg,const  ::QMetaMethod& a0)
{
    (sipSelfWasArg ?  ::QObject::disconnectNotify(a0) : disconnectNotify(a0));
}

int sipKModelIndexProxyMapper::sipProtect_senderSignalIndex() const
{
    return  ::QObject::senderSignalIndex();
}

bool sipKModelIndexProxyMapper::sipProtect_isSignalConnected(const  ::QMetaMethod& a0) const
{
    return  ::QObject::isSignalConnected(a0);
}


extern "C" {static PyObject *meth_KModelIndexProxyMapper_sender(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_KModelIndexProxyMapper_sender(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = NULL;

    {
        const sipKModelIndexProxyMapper *sipCpp;

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, NULL, NULL, "B", &sipSelf, sipType_KModelIndexProxyMapper, &sipCpp))
        {
             ::QObject*sipRes = 0;

        // sender() must be called without the GIL to avoid possible deadlocks between
        // the GIL and Qt's internal thread data mutex.
        
        Py_BEGIN_ALLOW_THREADS
        
        #if defined(SIP_PROTECTED_IS_PUBLIC)
        sipRes = sipCpp->sender();
        #else
        sipRes = sipCpp->sipProtect_sender();
        #endif
        
        Py_END_ALLOW_THREADS
        
        if (!sipRes)
        {
            typedef QObject *(*qtcore_qobject_sender_t)();
        
            static qtcore_qobject_sender_t qtcore_qobject_sender = 0;
        
            if (!qtcore_qobject_sender)
            {
                qtcore_qobject_sender = (qtcore_qobject_sender_t)sipImportSymbol("qtcore_qobject_sender");
                Q_ASSERT(qtcore_qobject_sender);
            }
        
            sipRes = qtcore_qobject_sender();
        }

            return sipConvertFromType(sipRes,sipType_QObject,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KModelIndexProxyMapper, sipName_sender, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KModelIndexProxyMapper_receivers(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_KModelIndexProxyMapper_receivers(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = NULL;

    {
        PyObject * a0;
        const sipKModelIndexProxyMapper *sipCpp;

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, NULL, NULL, "BP0", &sipSelf, sipType_KModelIndexProxyMapper, &sipCpp, &a0))
        {
            int sipRes = 0;
            sipErrorState sipError = sipErrorNone;

        // We need to handle the signal object.  Import the helper if it hasn't already
        // been done.
        typedef sipErrorState (*pyqt5_get_signal_signature_t)(PyObject *, const QObject *, const QByteArray &);
        
        static pyqt5_get_signal_signature_t pyqt5_get_signal_signature = 0;
        
        if (!pyqt5_get_signal_signature)
        {
            pyqt5_get_signal_signature = (pyqt5_get_signal_signature_t)sipImportSymbol("pyqt5_get_signal_signature");
            Q_ASSERT(pyqt5_get_signal_signature);
        }
        
        QByteArray signal_signature;
            
        #if defined(SIP_PROTECTED_IS_PUBLIC)
        if ((sipError = pyqt5_get_signal_signature(a0, sipCpp, signal_signature)) == sipErrorNone)
        {
            sipRes = sipCpp->receivers(signal_signature.constData());
        }
        #else
        if ((sipError = pyqt5_get_signal_signature(a0, static_cast<const QObject *>(sipCpp), signal_signature)) == sipErrorNone)
        {
            sipRes = sipCpp->sipProtect_receivers(signal_signature.constData());
        }
        #endif
        else if (sipError == sipErrorContinue)
        {
            sipError = sipBadCallableArg(0, a0);
        }

            if (sipError == sipErrorFail)
                return 0;

            if (sipError == sipErrorNone)
            {
            return SIPLong_FromLong(sipRes);
            }

            sipAddException(sipError, &sipParseErr);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KModelIndexProxyMapper, sipName_receivers, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KModelIndexProxyMapper_timerEvent(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_KModelIndexProxyMapper_timerEvent(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::QTimerEvent* a0;
        sipKModelIndexProxyMapper *sipCpp;

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, NULL, NULL, "BJ8", &sipSelf, sipType_KModelIndexProxyMapper, &sipCpp, sipType_QTimerEvent, &a0))
        {
            sipCpp->sipProtectVirt_timerEvent(sipSelfWasArg,a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KModelIndexProxyMapper, sipName_timerEvent, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KModelIndexProxyMapper_childEvent(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_KModelIndexProxyMapper_childEvent(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::QChildEvent* a0;
        sipKModelIndexProxyMapper *sipCpp;

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, NULL, NULL, "BJ8", &sipSelf, sipType_KModelIndexProxyMapper, &sipCpp, sipType_QChildEvent, &a0))
        {
            sipCpp->sipProtectVirt_childEvent(sipSelfWasArg,a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KModelIndexProxyMapper, sipName_childEvent, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KModelIndexProxyMapper_customEvent(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_KModelIndexProxyMapper_customEvent(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::QEvent* a0;
        sipKModelIndexProxyMapper *sipCpp;

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, NULL, NULL, "BJ8", &sipSelf, sipType_KModelIndexProxyMapper, &sipCpp, sipType_QEvent, &a0))
        {
            sipCpp->sipProtectVirt_customEvent(sipSelfWasArg,a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KModelIndexProxyMapper, sipName_customEvent, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KModelIndexProxyMapper_connectNotify(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_KModelIndexProxyMapper_connectNotify(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QMetaMethod* a0;
        sipKModelIndexProxyMapper *sipCpp;

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, NULL, NULL, "BJ9", &sipSelf, sipType_KModelIndexProxyMapper, &sipCpp, sipType_QMetaMethod, &a0))
        {
            sipCpp->sipProtectVirt_connectNotify(sipSelfWasArg,*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KModelIndexProxyMapper, sipName_connectNotify, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KModelIndexProxyMapper_disconnectNotify(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_KModelIndexProxyMapper_disconnectNotify(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QMetaMethod* a0;
        sipKModelIndexProxyMapper *sipCpp;

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, NULL, NULL, "BJ9", &sipSelf, sipType_KModelIndexProxyMapper, &sipCpp, sipType_QMetaMethod, &a0))
        {
            sipCpp->sipProtectVirt_disconnectNotify(sipSelfWasArg,*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KModelIndexProxyMapper, sipName_disconnectNotify, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KModelIndexProxyMapper_senderSignalIndex(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_KModelIndexProxyMapper_senderSignalIndex(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = NULL;

    {
        const sipKModelIndexProxyMapper *sipCpp;

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, NULL, NULL, "B", &sipSelf, sipType_KModelIndexProxyMapper, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->sipProtect_senderSignalIndex();

            return SIPLong_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KModelIndexProxyMapper, sipName_senderSignalIndex, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KModelIndexProxyMapper_isSignalConnected(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_KModelIndexProxyMapper_isSignalConnected(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = NULL;

    {
        const  ::QMetaMethod* a0;
        const sipKModelIndexProxyMapper *sipCpp;

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, NULL, NULL, "BJ9", &sipSelf, sipType_KModelIndexProxyMapper, &sipCpp, sipType_QMetaMethod, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->sipProtect_isSignalConnected(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KModelIndexProxyMapper, sipName_isSignalConnected, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KModelIndexProxyMapper_mapLeftToRight(PyObject *, PyObject *);}
static PyObject *meth_KModelIndexProxyMapper_mapLeftToRight(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        const  ::QModelIndex* a0;
        const  ::KModelIndexProxyMapper *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_KModelIndexProxyMapper, &sipCpp, sipType_QModelIndex, &a0))
        {
             ::QModelIndex*sipRes;

            sipRes = new  ::QModelIndex(sipCpp->mapLeftToRight(*a0));

            return sipConvertFromNewType(sipRes,sipType_QModelIndex,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KModelIndexProxyMapper, sipName_mapLeftToRight, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KModelIndexProxyMapper_mapRightToLeft(PyObject *, PyObject *);}
static PyObject *meth_KModelIndexProxyMapper_mapRightToLeft(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        const  ::QModelIndex* a0;
        const  ::KModelIndexProxyMapper *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_KModelIndexProxyMapper, &sipCpp, sipType_QModelIndex, &a0))
        {
             ::QModelIndex*sipRes;

            sipRes = new  ::QModelIndex(sipCpp->mapRightToLeft(*a0));

            return sipConvertFromNewType(sipRes,sipType_QModelIndex,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KModelIndexProxyMapper, sipName_mapRightToLeft, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KModelIndexProxyMapper_mapSelectionLeftToRight(PyObject *, PyObject *);}
static PyObject *meth_KModelIndexProxyMapper_mapSelectionLeftToRight(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        const  ::QItemSelection* a0;
        const  ::KModelIndexProxyMapper *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_KModelIndexProxyMapper, &sipCpp, sipType_QItemSelection, &a0))
        {
             ::QItemSelection*sipRes;

            sipRes = new  ::QItemSelection(sipCpp->mapSelectionLeftToRight(*a0));

            return sipConvertFromNewType(sipRes,sipType_QItemSelection,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KModelIndexProxyMapper, sipName_mapSelectionLeftToRight, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KModelIndexProxyMapper_mapSelectionRightToLeft(PyObject *, PyObject *);}
static PyObject *meth_KModelIndexProxyMapper_mapSelectionRightToLeft(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        const  ::QItemSelection* a0;
        const  ::KModelIndexProxyMapper *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_KModelIndexProxyMapper, &sipCpp, sipType_QItemSelection, &a0))
        {
             ::QItemSelection*sipRes;

            sipRes = new  ::QItemSelection(sipCpp->mapSelectionRightToLeft(*a0));

            return sipConvertFromNewType(sipRes,sipType_QItemSelection,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KModelIndexProxyMapper, sipName_mapSelectionRightToLeft, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KModelIndexProxyMapper_isConnected(PyObject *, PyObject *);}
static PyObject *meth_KModelIndexProxyMapper_isConnected(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        const  ::KModelIndexProxyMapper *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KModelIndexProxyMapper, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isConnected();

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KModelIndexProxyMapper, sipName_isConnected, NULL);

    return NULL;
}


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_KModelIndexProxyMapper(void *, const sipTypeDef *);}
static void *cast_KModelIndexProxyMapper(void *sipCppV, const sipTypeDef *targetType)
{
     ::KModelIndexProxyMapper *sipCpp = reinterpret_cast< ::KModelIndexProxyMapper *>(sipCppV);

    if (targetType == sipType_QObject)
        return static_cast< ::QObject *>(sipCpp);

    return sipCppV;
}


/* Call the instance's destructor. */
extern "C" {static void release_KModelIndexProxyMapper(void *, int);}
static void release_KModelIndexProxyMapper(void *sipCppV, int)
{
     ::KModelIndexProxyMapper *sipCpp = reinterpret_cast< ::KModelIndexProxyMapper *>(sipCppV);

    if (QThread::currentThread() == sipCpp->thread())
        delete sipCpp;
    else
        sipCpp->deleteLater();
}


extern "C" {static void dealloc_KModelIndexProxyMapper(sipSimpleWrapper *);}
static void dealloc_KModelIndexProxyMapper(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipKModelIndexProxyMapper *>(sipGetAddress(sipSelf))->sipPySelf = NULL;

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


extern "C" {static void *init_type_KModelIndexProxyMapper(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_KModelIndexProxyMapper(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **sipOwner, PyObject **sipParseErr)
{
    sipKModelIndexProxyMapper *sipCpp = 0;

    {
        const  ::QAbstractItemModel* a0;
        const  ::QAbstractItemModel* a1;
         ::QObject* a2 = nullptr;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J8J8|JH", sipType_QAbstractItemModel, &a0, sipType_QAbstractItemModel, &a1, sipType_QObject, &a2, sipOwner))
        {
            sipCpp = new sipKModelIndexProxyMapper(a0,a1,a2);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return NULL;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_KModelIndexProxyMapper[] = {{16, 0, 1}};


static PyMethodDef methods_KModelIndexProxyMapper[] = {
    {SIP_MLNAME_CAST(sipName_childEvent), (PyCFunction)meth_KModelIndexProxyMapper_childEvent, METH_VARARGS|METH_KEYWORDS, NULL},
    {SIP_MLNAME_CAST(sipName_connectNotify), (PyCFunction)meth_KModelIndexProxyMapper_connectNotify, METH_VARARGS|METH_KEYWORDS, NULL},
    {SIP_MLNAME_CAST(sipName_customEvent), (PyCFunction)meth_KModelIndexProxyMapper_customEvent, METH_VARARGS|METH_KEYWORDS, NULL},
    {SIP_MLNAME_CAST(sipName_disconnectNotify), (PyCFunction)meth_KModelIndexProxyMapper_disconnectNotify, METH_VARARGS|METH_KEYWORDS, NULL},
    {SIP_MLNAME_CAST(sipName_isConnected), meth_KModelIndexProxyMapper_isConnected, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_isSignalConnected), (PyCFunction)meth_KModelIndexProxyMapper_isSignalConnected, METH_VARARGS|METH_KEYWORDS, NULL},
    {SIP_MLNAME_CAST(sipName_mapLeftToRight), meth_KModelIndexProxyMapper_mapLeftToRight, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_mapRightToLeft), meth_KModelIndexProxyMapper_mapRightToLeft, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_mapSelectionLeftToRight), meth_KModelIndexProxyMapper_mapSelectionLeftToRight, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_mapSelectionRightToLeft), meth_KModelIndexProxyMapper_mapSelectionRightToLeft, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_receivers), (PyCFunction)meth_KModelIndexProxyMapper_receivers, METH_VARARGS|METH_KEYWORDS, NULL},
    {SIP_MLNAME_CAST(sipName_sender), (PyCFunction)meth_KModelIndexProxyMapper_sender, METH_VARARGS|METH_KEYWORDS, NULL},
    {SIP_MLNAME_CAST(sipName_senderSignalIndex), (PyCFunction)meth_KModelIndexProxyMapper_senderSignalIndex, METH_VARARGS|METH_KEYWORDS, NULL},
    {SIP_MLNAME_CAST(sipName_timerEvent), (PyCFunction)meth_KModelIndexProxyMapper_timerEvent, METH_VARARGS|METH_KEYWORDS, NULL}
};


/* Define this type's signals. */
static const pyqt5QtSignal signals_KModelIndexProxyMapper[] = {
    {"isConnectedChanged()", 0, 0, 0},
    {0, 0, 0, 0}
};


static pyqt5ClassPluginDef plugin_KModelIndexProxyMapper = {
    & ::KModelIndexProxyMapper::staticMetaObject,
    0,
    signals_KModelIndexProxyMapper,
    0
};


sipClassTypeDef sipTypeDef_KItemModels_KModelIndexProxyMapper = {
    {
        -1,
        0,
        0,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_CLASS,
        sipNameNr_KModelIndexProxyMapper,
        {0},
        &plugin_KModelIndexProxyMapper
    },
    {
        sipNameNr_KModelIndexProxyMapper,
        {0, 0, 1},
        14, methods_KModelIndexProxyMapper,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    supers_KModelIndexProxyMapper,
    0,
    init_type_KModelIndexProxyMapper,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KModelIndexProxyMapper,
    0,
    0,
    0,
    release_KModelIndexProxyMapper,
    cast_KModelIndexProxyMapper,
    0,
    0,
    0,
    0,
    0,
    0
};
