/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt5.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtTest.h"

#line 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtTest/qabstractitemmodeltester.sip"
// Qt v5.11.0 needs this.
#include <qabstractitemmodel.h>

#include <qabstractitemmodeltester.h>
#line 32 "/build/pyqt5/src/PyQt5-5.15.11/build/QtTest/sipQtTestQAbstractItemModelTester.cpp"

#line 111 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qabstractitemmodel.sip"
#include <qabstractitemmodel.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.11/build/QtTest/sipQtTestQAbstractItemModelTester.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qobject.sip"
#include <qobject.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.11/build/QtTest/sipQtTestQAbstractItemModelTester.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 146 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 44 "/build/pyqt5/src/PyQt5-5.15.11/build/QtTest/sipQtTestQAbstractItemModelTester.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 47 "/build/pyqt5/src/PyQt5-5.15.11/build/QtTest/sipQtTestQAbstractItemModelTester.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 50 "/build/pyqt5/src/PyQt5-5.15.11/build/QtTest/sipQtTestQAbstractItemModelTester.cpp"
#line 252 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 53 "/build/pyqt5/src/PyQt5-5.15.11/build/QtTest/sipQtTestQAbstractItemModelTester.cpp"
#line 240 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 56 "/build/pyqt5/src/PyQt5-5.15.11/build/QtTest/sipQtTestQAbstractItemModelTester.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 59 "/build/pyqt5/src/PyQt5-5.15.11/build/QtTest/sipQtTestQAbstractItemModelTester.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 62 "/build/pyqt5/src/PyQt5-5.15.11/build/QtTest/sipQtTestQAbstractItemModelTester.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 65 "/build/pyqt5/src/PyQt5-5.15.11/build/QtTest/sipQtTestQAbstractItemModelTester.cpp"
#line 30 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 68 "/build/pyqt5/src/PyQt5-5.15.11/build/QtTest/sipQtTestQAbstractItemModelTester.cpp"
#line 149 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 71 "/build/pyqt5/src/PyQt5-5.15.11/build/QtTest/sipQtTestQAbstractItemModelTester.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 74 "/build/pyqt5/src/PyQt5-5.15.11/build/QtTest/sipQtTestQAbstractItemModelTester.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qthread.sip"
#include <qthread.h>
#line 77 "/build/pyqt5/src/PyQt5-5.15.11/build/QtTest/sipQtTestQAbstractItemModelTester.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 80 "/build/pyqt5/src/PyQt5-5.15.11/build/QtTest/sipQtTestQAbstractItemModelTester.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qregexp.sip"
#include <qregexp.h>
#line 83 "/build/pyqt5/src/PyQt5-5.15.11/build/QtTest/sipQtTestQAbstractItemModelTester.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 86 "/build/pyqt5/src/PyQt5-5.15.11/build/QtTest/sipQtTestQAbstractItemModelTester.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 89 "/build/pyqt5/src/PyQt5-5.15.11/build/QtTest/sipQtTestQAbstractItemModelTester.cpp"


class sipQAbstractItemModelTester : public ::QAbstractItemModelTester
{
public:
    sipQAbstractItemModelTester(::QAbstractItemModel*, ::QObject*);
    sipQAbstractItemModelTester(::QAbstractItemModel*, ::QAbstractItemModelTester::FailureReportingMode, ::QObject*);
    virtual ~sipQAbstractItemModelTester();

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

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

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[7];
};

sipQAbstractItemModelTester::sipQAbstractItemModelTester(::QAbstractItemModel*a0, ::QObject*a1): ::QAbstractItemModelTester(a0, a1), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQAbstractItemModelTester::sipQAbstractItemModelTester(::QAbstractItemModel*a0, ::QAbstractItemModelTester::FailureReportingMode a1, ::QObject*a2): ::QAbstractItemModelTester(a0, a1, a2), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

const QMetaObject *sipQAbstractItemModelTester::metaObject() const
{
    if (sipGetInterpreter())
        return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : sip_QtTest_qt_metaobject(sipPySelf, sipType_QAbstractItemModelTester);

    return ::QAbstractItemModelTester::metaObject();
}

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

    if (_id >= 0)
    {
        SIP_BLOCK_THREADS
        _id = sip_QtTest_qt_metacall(sipPySelf, sipType_QAbstractItemModelTester, _c, _id, _a);
        SIP_UNBLOCK_THREADS
    }

    return _id;
}

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

    return (sip_QtTest_qt_metacast(sipPySelf, sipType_QAbstractItemModelTester, _clname, &sipCpp) ? sipCpp : ::QAbstractItemModelTester::qt_metacast(_clname));
}

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

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

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

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

    return sipVH_QtTest_5(sipGILState, sipImportedVirtErrorHandlers_QtTest_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

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

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

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

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

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

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

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

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

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

    sipVH_QtTest_3(sipGILState, sipImportedVirtErrorHandlers_QtTest_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

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

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

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

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

    sipVH_QtTest_2(sipGILState, sipImportedVirtErrorHandlers_QtTest_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

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

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

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

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

    sipVH_QtTest_1(sipGILState, sipImportedVirtErrorHandlers_QtTest_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

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

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

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

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

    sipVH_QtTest_0(sipGILState, sipImportedVirtErrorHandlers_QtTest_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

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

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

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

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

    sipVH_QtTest_0(sipGILState, sipImportedVirtErrorHandlers_QtTest_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}


PyDoc_STRVAR(doc_QAbstractItemModelTester_model, "model(self) -> QAbstractItemModel|None");

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

    {
        const ::QAbstractItemModelTester *sipCpp;

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

            sipRes = sipCpp->model();

            return sipConvertFromType(sipRes, sipType_QAbstractItemModel, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QAbstractItemModelTester, sipName_model, doc_QAbstractItemModelTester_model);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAbstractItemModelTester_failureReportingMode, "failureReportingMode(self) -> QAbstractItemModelTester.FailureReportingMode");

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

    {
        const ::QAbstractItemModelTester *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QAbstractItemModelTester, &sipCpp))
        {
            ::QAbstractItemModelTester::FailureReportingMode sipRes;

            sipRes = sipCpp->failureReportingMode();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QAbstractItemModelTester_FailureReportingMode);
        }
    }

    sipNoMethod(sipParseErr, sipName_QAbstractItemModelTester, sipName_failureReportingMode, doc_QAbstractItemModelTester_failureReportingMode);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QAbstractItemModelTester)
        return sipCppV;

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

    return SIP_NULLPTR;
}


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

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


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

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


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

    {
        ::QAbstractItemModel* a0;
        PyObject *a0Keep;
        ::QObject* a1 = 0;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_parent,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "@J8|JH", &a0Keep, sipType_QAbstractItemModel, &a0, sipType_QObject, &a1, sipOwner))
        {
            sipCpp = new sipQAbstractItemModelTester(a0, a1);

            sipKeepReference((PyObject *)sipSelf, 1, a0Keep);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        ::QAbstractItemModel* a0;
        PyObject *a0Keep;
        ::QAbstractItemModelTester::FailureReportingMode a1;
        ::QObject* a2 = 0;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            SIP_NULLPTR,
            sipName_parent,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "@J8E|JH", &a0Keep, sipType_QAbstractItemModel, &a0, sipType_QAbstractItemModelTester_FailureReportingMode, &a1, sipType_QObject, &a2, sipOwner))
        {
            sipCpp = new sipQAbstractItemModelTester(a0, a1, a2);

            sipKeepReference((PyObject *)sipSelf, 1, a0Keep);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_QAbstractItemModelTester[] = {
    {sipName_failureReportingMode, meth_QAbstractItemModelTester_failureReportingMode, METH_VARARGS, doc_QAbstractItemModelTester_failureReportingMode},
    {sipName_model, meth_QAbstractItemModelTester_model, METH_VARARGS, doc_QAbstractItemModelTester_model}
};

static sipEnumMemberDef enummembers_QAbstractItemModelTester[] = {
    {sipName_Fatal, static_cast<int>(::QAbstractItemModelTester::FailureReportingMode::Fatal), 1},
    {sipName_QtTest, static_cast<int>(::QAbstractItemModelTester::FailureReportingMode::QtTest), 1},
    {sipName_Warning, static_cast<int>(::QAbstractItemModelTester::FailureReportingMode::Warning), 1},
};

PyDoc_STRVAR(doc_QAbstractItemModelTester, "\1QAbstractItemModelTester(model: QAbstractItemModel|None, parent: QObject|None = None)\n"
"QAbstractItemModelTester(model: QAbstractItemModel|None, mode: QAbstractItemModelTester.FailureReportingMode, parent: QObject|None = None)");


static pyqt5ClassPluginDef plugin_QAbstractItemModelTester = {
    &::QAbstractItemModelTester::staticMetaObject,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtTest_QAbstractItemModelTester = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QAbstractItemModelTester,
        SIP_NULLPTR,
        &plugin_QAbstractItemModelTester,
    },
    {
        sipNameNr_QAbstractItemModelTester,
        {0, 0, 1},
        2, methods_QAbstractItemModelTester,
        3, enummembers_QAbstractItemModelTester,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QAbstractItemModelTester,
    -1,
    -1,
    supers_QAbstractItemModelTester,
    SIP_NULLPTR,
    init_type_QAbstractItemModelTester,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QAbstractItemModelTester,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QAbstractItemModelTester,
    cast_QAbstractItemModelTester,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::QAbstractItemModelTester),
};
