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

#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtSql/qsqlrelationaldelegate.sip"
#include <qsqlrelationaldelegate.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"

#line 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qobject.sip"
#include <qobject.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtWidgets/qwidget.sip"
#include <qwidget.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qabstractitemmodel.sip"
#include <qabstractitemmodel.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 111 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qabstractitemmodel.sip"
#include <qabstractitemmodel.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 579 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtWidgets/qstyleoption.sip"
#include <qstyleoption.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 48 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtGui/qpainter.sip"
#include <qpainter.h>
#line 51 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qrect.sip"
#include <qrect.h>
#line 54 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 57 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtGui/qpixmap.sip"
#include <qpixmap.h>
#line 60 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 63 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtWidgets/qitemeditorfactory.sip"
#include <qitemeditorfactory.h>
#line 66 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qsize.sip"
#include <qsize.h>
#line 69 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtWidgets/qabstractitemdelegate.sip"
#include <qabstractitemdelegate.h>
#line 72 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 630 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtGui/qevent.sip"
#include <qevent.h>
#line 75 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtWidgets/qabstractitemview.sip"
#include <qabstractitemview.h>
#line 78 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.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 83 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 86 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 252 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 89 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 240 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 92 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 95 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 98 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 30 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 101 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 149 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 104 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qthread.sip"
#include <qthread.h>
#line 107 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 110 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qregexp.sip"
#include <qregexp.h>
#line 113 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 116 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 119 "/build/pyqt5/src/PyQt5-5.15.11/build/QtSql/sipQtSqlQSqlRelationalDelegate.cpp"


class sipQSqlRelationalDelegate : public ::QSqlRelationalDelegate
{
public:
    sipQSqlRelationalDelegate(::QObject*);
    virtual ~sipQSqlRelationalDelegate();

    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 helpEvent(::QHelpEvent*, ::QAbstractItemView*, const ::QStyleOptionViewItem&, const ::QModelIndex&) SIP_OVERRIDE;
    bool editorEvent(::QEvent*, ::QAbstractItemModel*, const ::QStyleOptionViewItem&, const ::QModelIndex&) SIP_OVERRIDE;
    void destroyEditor(::QWidget*, const ::QModelIndex&) const SIP_OVERRIDE;
    void updateEditorGeometry(::QWidget*, const ::QStyleOptionViewItem&, const ::QModelIndex&) const SIP_OVERRIDE;
    void setModelData(::QWidget*, ::QAbstractItemModel*, const ::QModelIndex&) const SIP_OVERRIDE;
    void setEditorData(::QWidget*, const ::QModelIndex&) const SIP_OVERRIDE;
    ::QWidget* createEditor(::QWidget*, const ::QStyleOptionViewItem&, const ::QModelIndex&) const SIP_OVERRIDE;
    ::QSize sizeHint(const ::QStyleOptionViewItem&, const ::QModelIndex&) const SIP_OVERRIDE;
    void paint(::QPainter*, const ::QStyleOptionViewItem&, const ::QModelIndex&) const SIP_OVERRIDE;
    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;
    void drawCheck(::QPainter*, const ::QStyleOptionViewItem&, const ::QRect&, ::Qt::CheckState) const SIP_OVERRIDE;
    void drawDecoration(::QPainter*, const ::QStyleOptionViewItem&, const ::QRect&, const ::QPixmap&) const SIP_OVERRIDE;
    void drawDisplay(::QPainter*, const ::QStyleOptionViewItem&, const ::QRect&, const ::QString&) const SIP_OVERRIDE;
    void drawFocus(::QPainter*, const ::QStyleOptionViewItem&, const ::QRect&) const SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[20];
};

sipQSqlRelationalDelegate::sipQSqlRelationalDelegate(::QObject*a0): ::QSqlRelationalDelegate(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

const QMetaObject *sipQSqlRelationalDelegate::metaObject() const
{
    if (sipGetInterpreter())
        return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : sip_QtSql_qt_metaobject(sipPySelf, sipType_QSqlRelationalDelegate);

    return ::QSqlRelationalDelegate::metaObject();
}

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

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

    return _id;
}

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

    return (sip_QtSql_qt_metacast(sipPySelf, sipType_QSqlRelationalDelegate, _clname, &sipCpp) ? sipCpp : ::QSqlRelationalDelegate::qt_metacast(_clname));
}

bool sipQSqlRelationalDelegate::helpEvent(::QHelpEvent*a0, ::QAbstractItemView*a1, const ::QStyleOptionViewItem& a2, const ::QModelIndex& a3)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::QSqlRelationalDelegate::helpEvent(a0, a1, a2, a3);

    extern bool sipVH_QtSql_56(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QHelpEvent*, ::QAbstractItemView*, const ::QStyleOptionViewItem&, const ::QModelIndex&);

    return sipVH_QtSql_56(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2, a3);
}

bool sipQSqlRelationalDelegate::editorEvent(::QEvent*a0, ::QAbstractItemModel*a1, const ::QStyleOptionViewItem& a2, const ::QModelIndex& a3)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::QSqlRelationalDelegate::editorEvent(a0, a1, a2, a3);

    extern bool sipVH_QtSql_55(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QEvent*, ::QAbstractItemModel*, const ::QStyleOptionViewItem&, const ::QModelIndex&);

    return sipVH_QtSql_55(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2, a3);
}

void sipQSqlRelationalDelegate::destroyEditor(::QWidget*a0, const ::QModelIndex& a1) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[2]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_destroyEditor);

    if (!sipMeth)
    {
        ::QSqlRelationalDelegate::destroyEditor(a0, a1);
        return;
    }

    extern void sipVH_QtSql_52(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QWidget*, const ::QModelIndex&);

    sipVH_QtSql_52(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}

void sipQSqlRelationalDelegate::updateEditorGeometry(::QWidget*a0, const ::QStyleOptionViewItem& a1, const ::QModelIndex& a2) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[3]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_updateEditorGeometry);

    if (!sipMeth)
    {
        ::QSqlRelationalDelegate::updateEditorGeometry(a0, a1, a2);
        return;
    }

    extern void sipVH_QtSql_54(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QWidget*, const ::QStyleOptionViewItem&, const ::QModelIndex&);

    sipVH_QtSql_54(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2);
}

void sipQSqlRelationalDelegate::setModelData(::QWidget*a0, ::QAbstractItemModel*a1, const ::QModelIndex& a2) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[4]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_setModelData);

    if (!sipMeth)
    {
        ::QSqlRelationalDelegate::setModelData(a0, a1, a2);
        return;
    }

    extern void sipVH_QtSql_53(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QWidget*, ::QAbstractItemModel*, const ::QModelIndex&);

    sipVH_QtSql_53(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2);
}

void sipQSqlRelationalDelegate::setEditorData(::QWidget*a0, const ::QModelIndex& a1) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[5]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_setEditorData);

    if (!sipMeth)
    {
        ::QSqlRelationalDelegate::setEditorData(a0, a1);
        return;
    }

    extern void sipVH_QtSql_52(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QWidget*, const ::QModelIndex&);

    sipVH_QtSql_52(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}

::QWidget* sipQSqlRelationalDelegate::createEditor(::QWidget*a0, const ::QStyleOptionViewItem& a1, const ::QModelIndex& a2) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[6]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_createEditor);

    if (!sipMeth)
        return ::QSqlRelationalDelegate::createEditor(a0, a1, a2);

    extern ::QWidget* sipVH_QtSql_51(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QWidget*, const ::QStyleOptionViewItem&, const ::QModelIndex&);

    return sipVH_QtSql_51(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2);
}

::QSize sipQSqlRelationalDelegate::sizeHint(const ::QStyleOptionViewItem& a0, const ::QModelIndex& a1) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[7]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_sizeHint);

    if (!sipMeth)
        return ::QSqlRelationalDelegate::sizeHint(a0, a1);

    extern ::QSize sipVH_QtSql_50(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::QStyleOptionViewItem&, const ::QModelIndex&);

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

void sipQSqlRelationalDelegate::paint(::QPainter*a0, const ::QStyleOptionViewItem& a1, const ::QModelIndex& a2) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[8]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_paint);

    if (!sipMeth)
    {
        ::QSqlRelationalDelegate::paint(a0, a1, a2);
        return;
    }

    extern void sipVH_QtSql_49(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QPainter*, const ::QStyleOptionViewItem&, const ::QModelIndex&);

    sipVH_QtSql_49(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2);
}

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

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

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

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

    return sipVH_QtSql_6(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

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

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

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

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

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

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

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

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

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

    sipVH_QtSql_4(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

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

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

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

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

    sipVH_QtSql_3(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

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

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

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

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

    sipVH_QtSql_2(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

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

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

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

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

    sipVH_QtSql_1(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

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

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

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

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

    sipVH_QtSql_1(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQSqlRelationalDelegate::drawCheck(::QPainter*a0, const ::QStyleOptionViewItem& a1, const ::QRect& a2, ::Qt::CheckState a3) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[16]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_drawCheck);

    if (!sipMeth)
    {
        ::QSqlRelationalDelegate::drawCheck(a0, a1, a2, a3);
        return;
    }

    extern void sipVH_QtSql_48(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QPainter*, const ::QStyleOptionViewItem&, const ::QRect&, ::Qt::CheckState);

    sipVH_QtSql_48(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2, a3);
}

void sipQSqlRelationalDelegate::drawDecoration(::QPainter*a0, const ::QStyleOptionViewItem& a1, const ::QRect& a2, const ::QPixmap& a3) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[17]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_drawDecoration);

    if (!sipMeth)
    {
        ::QSqlRelationalDelegate::drawDecoration(a0, a1, a2, a3);
        return;
    }

    extern void sipVH_QtSql_47(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QPainter*, const ::QStyleOptionViewItem&, const ::QRect&, const ::QPixmap&);

    sipVH_QtSql_47(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2, a3);
}

void sipQSqlRelationalDelegate::drawDisplay(::QPainter*a0, const ::QStyleOptionViewItem& a1, const ::QRect& a2, const ::QString& a3) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[18]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_drawDisplay);

    if (!sipMeth)
    {
        ::QSqlRelationalDelegate::drawDisplay(a0, a1, a2, a3);
        return;
    }

    extern void sipVH_QtSql_46(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QPainter*, const ::QStyleOptionViewItem&, const ::QRect&, const ::QString&);

    sipVH_QtSql_46(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2, a3);
}

void sipQSqlRelationalDelegate::drawFocus(::QPainter*a0, const ::QStyleOptionViewItem& a1, const ::QRect& a2) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[19]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_drawFocus);

    if (!sipMeth)
    {
        ::QSqlRelationalDelegate::drawFocus(a0, a1, a2);
        return;
    }

    extern void sipVH_QtSql_45(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QPainter*, const ::QStyleOptionViewItem&, const ::QRect&);

    sipVH_QtSql_45(sipGILState, sipImportedVirtErrorHandlers_QtSql_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2);
}


PyDoc_STRVAR(doc_QSqlRelationalDelegate_createEditor, "createEditor(self, parent: QWidget|None, option: QStyleOptionViewItem, index: QModelIndex) -> QWidget|None");

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

    {
        ::QWidget* a0;
        const ::QStyleOptionViewItem* a1;
        const ::QModelIndex* a2;
        sipWrapper *sipOwner = SIP_NULLPTR;
        const ::QSqlRelationalDelegate *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJHJ9J9", &sipSelf, sipType_QSqlRelationalDelegate, &sipCpp, sipType_QWidget, &a0, &sipOwner, sipType_QStyleOptionViewItem, &a1, sipType_QModelIndex, &a2))
        {
            ::QWidget*sipRes;

            sipRes = (sipSelfWasArg ? sipCpp->::QSqlRelationalDelegate::createEditor(a0, *a1, *a2) : sipCpp->createEditor(a0, *a1, *a2));

            return sipConvertFromType(sipRes, sipType_QWidget, Py_None);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlRelationalDelegate, sipName_createEditor, doc_QSqlRelationalDelegate_createEditor);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlRelationalDelegate_setModelData, "setModelData(self, editor: QWidget|None, model: QAbstractItemModel|None, index: QModelIndex)");

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

    {
        ::QWidget* a0;
        ::QAbstractItemModel* a1;
        PyObject *a1Keep;
        const ::QModelIndex* a2;
        const ::QSqlRelationalDelegate *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8@J8J9", &sipSelf, sipType_QSqlRelationalDelegate, &sipCpp, sipType_QWidget, &a0, &a1Keep, sipType_QAbstractItemModel, &a1, sipType_QModelIndex, &a2))
        {
            (sipSelfWasArg ? sipCpp->::QSqlRelationalDelegate::setModelData(a0, a1, *a2) : sipCpp->setModelData(a0, a1, *a2));

            sipKeepReference(sipSelf, -1, a1Keep);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlRelationalDelegate, sipName_setModelData, doc_QSqlRelationalDelegate_setModelData);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlRelationalDelegate_setEditorData, "setEditorData(self, editor: QWidget|None, index: QModelIndex)");

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

    {
        ::QWidget* a0;
        const ::QModelIndex* a1;
        const ::QSqlRelationalDelegate *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8J9", &sipSelf, sipType_QSqlRelationalDelegate, &sipCpp, sipType_QWidget, &a0, sipType_QModelIndex, &a1))
        {
            (sipSelfWasArg ? sipCpp->::QSqlRelationalDelegate::setEditorData(a0, *a1) : sipCpp->setEditorData(a0, *a1));

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlRelationalDelegate, sipName_setEditorData, doc_QSqlRelationalDelegate_setEditorData);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QSqlRelationalDelegate)
        return sipCppV;

    sipCppV = ((const sipClassTypeDef *)sipType_QItemDelegate)->ctd_cast(static_cast< ::QItemDelegate *>(sipCpp), targetType);
    if (sipCppV)
        return sipCppV;

    return SIP_NULLPTR;
}


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

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


extern "C" {static void *array_QSqlRelationalDelegate(Py_ssize_t);}
static void *array_QSqlRelationalDelegate(Py_ssize_t sipNrElem)
{
    return new ::QSqlRelationalDelegate[sipNrElem];
}


extern "C" {static void array_delete_QSqlRelationalDelegate(void *);}
static void array_delete_QSqlRelationalDelegate(void *sipCpp)
{
    delete[] reinterpret_cast< ::QSqlRelationalDelegate *>(sipCpp);
}


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

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


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

    {
        ::QObject* a0 = 0;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|JH", sipType_QObject, &a0, sipOwner))
        {
            sipCpp = new sipQSqlRelationalDelegate(a0);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_QSqlRelationalDelegate[] = {
    {sipName_createEditor, meth_QSqlRelationalDelegate_createEditor, METH_VARARGS, doc_QSqlRelationalDelegate_createEditor},
    {sipName_setEditorData, meth_QSqlRelationalDelegate_setEditorData, METH_VARARGS, doc_QSqlRelationalDelegate_setEditorData},
    {sipName_setModelData, meth_QSqlRelationalDelegate_setModelData, METH_VARARGS, doc_QSqlRelationalDelegate_setModelData}
};

PyDoc_STRVAR(doc_QSqlRelationalDelegate, "\1QSqlRelationalDelegate(parent: QObject|None = None)");


static pyqt5ClassPluginDef plugin_QSqlRelationalDelegate = {
    &::QSqlRelationalDelegate::staticMetaObject,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtSql_QSqlRelationalDelegate = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QSqlRelationalDelegate,
        SIP_NULLPTR,
        &plugin_QSqlRelationalDelegate,
    },
    {
        sipNameNr_QSqlRelationalDelegate,
        {0, 0, 1},
        3, methods_QSqlRelationalDelegate,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QSqlRelationalDelegate,
    -1,
    -1,
    supers_QSqlRelationalDelegate,
    SIP_NULLPTR,
    init_type_QSqlRelationalDelegate,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QSqlRelationalDelegate,
    SIP_NULLPTR,
    array_QSqlRelationalDelegate,
    SIP_NULLPTR,
    release_QSqlRelationalDelegate,
    cast_QSqlRelationalDelegate,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QSqlRelationalDelegate,
    sizeof (::QSqlRelationalDelegate),
};
