/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 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 44 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSql/qsqlrelationaltablemodel.sip"
#include <qsqlrelationaltablemodel.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"

#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobject.sip"
#include <qobject.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 37 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSql/qsqldatabase.sip"
#include <qsqldatabase.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSql/qsqlrecord.sip"
#include <qsqlrecord.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qabstractitemmodel.sip"
#include <qabstractitemmodel.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSql/qsqltablemodel.sip"
#include <qsqltablemodel.h>
#line 48 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSql/qsqlrelationaltablemodel.sip"
#include <qsqlrelationaltablemodel.h>
#line 51 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 54 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSql/qsqlquery.sip"
#include <qsqlquery.h>
#line 57 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSql/qsqlindex.sip"
#include <qsqlindex.h>
#line 60 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 63 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 66 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 275 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qhash.sip"
#include <qhash.h>
#line 69 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 30 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 72 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSql/qsqlerror.sip"
#include <qsqlerror.h>
#line 75 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qmimedata.sip"
#include <qmimedata.h>
#line 78 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 111 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qabstractitemmodel.sip"
#include <qabstractitemmodel.h>
#line 81 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 84 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 87 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qdatastream.sip"
#include <qdatastream.h>
#line 90 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 93 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 76 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qabstractitemmodel.sip"
#include <qabstractitemmodel.h>
#line 96 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 111 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qabstractitemmodel.sip"
#include <qabstractitemmodel.h>
#line 99 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 442 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qvector.sip"
#include <qvector.h>
#line 102 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qsize.sip"
#include <qsize.h>
#line 105 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 108 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstringlist.sip"
#include <qstringlist.h>
#line 111 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 146 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qmap.sip"
#include <qmap.h>
#line 114 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 146 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 119 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 122 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 125 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 247 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 128 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 235 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 131 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 134 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 149 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 137 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qthread.sip"
#include <qthread.h>
#line 140 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 143 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qregexp.sip"
#include <qregexp.h>
#line 146 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 149 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 152 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSql/sipQtSqlQSqlRelationalTableModel.cpp"


class sipQSqlRelationalTableModel : public  ::QSqlRelationalTableModel
{
public:
    sipQSqlRelationalTableModel( ::QObject*, ::QSqlDatabase);
    virtual ~sipQSqlRelationalTableModel();

    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:
     ::QSqlTableModel* relationModel(int) const SIP_OVERRIDE;
    void setRelation(int,const  ::QSqlRelation&) SIP_OVERRIDE;
     ::QModelIndex indexInQuery(const  ::QModelIndex&) const SIP_OVERRIDE;
    void queryChange() SIP_OVERRIDE;
    void clear() SIP_OVERRIDE;
    bool moveColumns(const  ::QModelIndex&,int,int,const  ::QModelIndex&,int) SIP_OVERRIDE;
    bool moveRows(const  ::QModelIndex&,int,int,const  ::QModelIndex&,int) SIP_OVERRIDE;
    bool canDropMimeData(const  ::QMimeData*, ::Qt::DropAction,int,int,const  ::QModelIndex&) const SIP_OVERRIDE;
    QHash<int, ::QByteArray> roleNames() const SIP_OVERRIDE;
     ::Qt::DropActions supportedDragActions() const SIP_OVERRIDE;
    void revert() SIP_OVERRIDE;
    bool submit() SIP_OVERRIDE;
     ::QSize span(const  ::QModelIndex&) const SIP_OVERRIDE;
     ::QModelIndexList match(const  ::QModelIndex&,int,const  ::QVariant&,int, ::Qt::MatchFlags) const SIP_OVERRIDE;
     ::QModelIndex buddy(const  ::QModelIndex&) const SIP_OVERRIDE;
    void sort(int, ::Qt::SortOrder) SIP_OVERRIDE;
     ::Qt::ItemFlags flags(const  ::QModelIndex&) const SIP_OVERRIDE;
    bool canFetchMore(const  ::QModelIndex&) const SIP_OVERRIDE;
    void fetchMore(const  ::QModelIndex&) SIP_OVERRIDE;
    bool removeColumns(int,int,const  ::QModelIndex&) SIP_OVERRIDE;
    bool removeRows(int,int,const  ::QModelIndex&) SIP_OVERRIDE;
    bool insertColumns(int,int,const  ::QModelIndex&) SIP_OVERRIDE;
    bool insertRows(int,int,const  ::QModelIndex&) SIP_OVERRIDE;
     ::Qt::DropActions supportedDropActions() const SIP_OVERRIDE;
    bool dropMimeData(const  ::QMimeData*, ::Qt::DropAction,int,int,const  ::QModelIndex&) SIP_OVERRIDE;
     ::QMimeData* mimeData(const  ::QModelIndexList&) const SIP_OVERRIDE;
     ::QStringList mimeTypes() const SIP_OVERRIDE;
    bool setItemData(const  ::QModelIndex&,const QMap<int, ::QVariant>&) SIP_OVERRIDE;
    QMap<int, ::QVariant> itemData(const  ::QModelIndex&) const SIP_OVERRIDE;
    bool setHeaderData(int, ::Qt::Orientation,const  ::QVariant&,int) SIP_OVERRIDE;
     ::QVariant headerData(int, ::Qt::Orientation,int) const SIP_OVERRIDE;
    bool setData(const  ::QModelIndex&,const  ::QVariant&,int) SIP_OVERRIDE;
     ::QVariant data(const  ::QModelIndex&,int) const SIP_OVERRIDE;
    int columnCount(const  ::QModelIndex&) const SIP_OVERRIDE;
    int rowCount(const  ::QModelIndex&) const SIP_OVERRIDE;
     ::QModelIndex sibling(int,int,const  ::QModelIndex&) const SIP_OVERRIDE;
     ::QModelIndex index(int,int,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;
    bool select() SIP_OVERRIDE;
    void setTable(const  ::QString&) SIP_OVERRIDE;
    void setEditStrategy( ::QSqlTableModel::EditStrategy) SIP_OVERRIDE;
    void setSort(int, ::Qt::SortOrder) SIP_OVERRIDE;
    void setFilter(const  ::QString&) SIP_OVERRIDE;
    void revertRow(int) SIP_OVERRIDE;
    bool updateRowInTable(int,const  ::QSqlRecord&) SIP_OVERRIDE;
    bool insertRowIntoTable(const  ::QSqlRecord&) SIP_OVERRIDE;
    bool deleteRowFromTable(int) SIP_OVERRIDE;
     ::QString orderByClause() const SIP_OVERRIDE;
     ::QString selectStatement() const SIP_OVERRIDE;
    bool selectRow(int) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[56];
};

sipQSqlRelationalTableModel::sipQSqlRelationalTableModel( ::QObject*a0, ::QSqlDatabase a1):  ::QSqlRelationalTableModel(a0,a1), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

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

    return  ::QSqlRelationalTableModel::metaObject();
}

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

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

    return _id;
}

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

    return (sip_QtSql_qt_metacast(sipPySelf, sipType_QSqlRelationalTableModel, _clname, &sipCpp) ? sipCpp :  ::QSqlRelationalTableModel::qt_metacast(_clname));
}

 ::QSqlTableModel* sipQSqlRelationalTableModel::relationModel(int a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::relationModel(a0);

    extern  ::QSqlTableModel* sipVH_QtSql_65(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int);

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

void sipQSqlRelationalTableModel::setRelation(int a0,const  ::QSqlRelation& a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::QSqlRelationalTableModel::setRelation(a0,a1);
        return;
    }

    extern void sipVH_QtSql_64(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,const  ::QSqlRelation&);

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

 ::QModelIndex sipQSqlRelationalTableModel::indexInQuery(const  ::QModelIndex& a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::indexInQuery(a0);

    extern  ::QModelIndex sipVH_QtSql_25(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&);

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

void sipQSqlRelationalTableModel::queryChange()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::QSqlRelationalTableModel::queryChange();
        return;
    }

    extern void sipVH_QtSql_16(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

void sipQSqlRelationalTableModel::clear()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::QSqlRelationalTableModel::clear();
        return;
    }

    extern void sipVH_QtSql_16(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

bool sipQSqlRelationalTableModel::moveColumns(const  ::QModelIndex& a0,int a1,int a2,const  ::QModelIndex& a3,int a4)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::moveColumns(a0,a1,a2,a3,a4);

    extern bool sipVH_QtSql_44(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&,int,int,const  ::QModelIndex&,int);

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

bool sipQSqlRelationalTableModel::moveRows(const  ::QModelIndex& a0,int a1,int a2,const  ::QModelIndex& a3,int a4)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::moveRows(a0,a1,a2,a3,a4);

    extern bool sipVH_QtSql_44(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&,int,int,const  ::QModelIndex&,int);

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

bool sipQSqlRelationalTableModel::canDropMimeData(const  ::QMimeData*a0, ::Qt::DropAction a1,int a2,int a3,const  ::QModelIndex& a4) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::canDropMimeData(a0,a1,a2,a3,a4);

    extern bool sipVH_QtSql_35(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMimeData*, ::Qt::DropAction,int,int,const  ::QModelIndex&);

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

QHash<int, ::QByteArray> sipQSqlRelationalTableModel::roleNames() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::roleNames();

    extern QHash<int, ::QByteArray> sipVH_QtSql_43(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

 ::Qt::DropActions sipQSqlRelationalTableModel::supportedDragActions() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::supportedDragActions();

    extern  ::Qt::DropActions sipVH_QtSql_36(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

void sipQSqlRelationalTableModel::revert()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::QSqlRelationalTableModel::revert();
        return;
    }

    extern void sipVH_QtSql_16(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

bool sipQSqlRelationalTableModel::submit()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::submit();

    extern bool sipVH_QtSql_7(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

 ::QSize sipQSqlRelationalTableModel::span(const  ::QModelIndex& a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::span(a0);

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

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

 ::QModelIndexList sipQSqlRelationalTableModel::match(const  ::QModelIndex& a0,int a1,const  ::QVariant& a2,int a3, ::Qt::MatchFlags a4) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::match(a0,a1,a2,a3,a4);

    extern  ::QModelIndexList sipVH_QtSql_41(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&,int,const  ::QVariant&,int, ::Qt::MatchFlags);

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

 ::QModelIndex sipQSqlRelationalTableModel::buddy(const  ::QModelIndex& a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::buddy(a0);

    extern  ::QModelIndex sipVH_QtSql_25(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&);

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

void sipQSqlRelationalTableModel::sort(int a0, ::Qt::SortOrder a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::QSqlRelationalTableModel::sort(a0,a1);
        return;
    }

    extern void sipVH_QtSql_40(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int, ::Qt::SortOrder);

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

 ::Qt::ItemFlags sipQSqlRelationalTableModel::flags(const  ::QModelIndex& a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::flags(a0);

    extern  ::Qt::ItemFlags sipVH_QtSql_39(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&);

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

bool sipQSqlRelationalTableModel::canFetchMore(const  ::QModelIndex& a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::canFetchMore(a0);

    extern bool sipVH_QtSql_27(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&);

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

void sipQSqlRelationalTableModel::fetchMore(const  ::QModelIndex& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[18], &sipPySelf, SIP_NULLPTR, sipName_fetchMore);

    if (!sipMeth)
    {
         ::QSqlRelationalTableModel::fetchMore(a0);
        return;
    }

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

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

bool sipQSqlRelationalTableModel::removeColumns(int a0,int a1,const  ::QModelIndex& a2)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[19], &sipPySelf, SIP_NULLPTR, sipName_removeColumns);

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::removeColumns(a0,a1,a2);

    extern bool sipVH_QtSql_37(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,int,const  ::QModelIndex&);

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

bool sipQSqlRelationalTableModel::removeRows(int a0,int a1,const  ::QModelIndex& a2)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[20], &sipPySelf, SIP_NULLPTR, sipName_removeRows);

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::removeRows(a0,a1,a2);

    extern bool sipVH_QtSql_37(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,int,const  ::QModelIndex&);

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

bool sipQSqlRelationalTableModel::insertColumns(int a0,int a1,const  ::QModelIndex& a2)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[21], &sipPySelf, SIP_NULLPTR, sipName_insertColumns);

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::insertColumns(a0,a1,a2);

    extern bool sipVH_QtSql_37(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,int,const  ::QModelIndex&);

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

bool sipQSqlRelationalTableModel::insertRows(int a0,int a1,const  ::QModelIndex& a2)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[22], &sipPySelf, SIP_NULLPTR, sipName_insertRows);

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::insertRows(a0,a1,a2);

    extern bool sipVH_QtSql_37(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,int,const  ::QModelIndex&);

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

 ::Qt::DropActions sipQSqlRelationalTableModel::supportedDropActions() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::supportedDropActions();

    extern  ::Qt::DropActions sipVH_QtSql_36(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

bool sipQSqlRelationalTableModel::dropMimeData(const  ::QMimeData*a0, ::Qt::DropAction a1,int a2,int a3,const  ::QModelIndex& a4)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[24], &sipPySelf, SIP_NULLPTR, sipName_dropMimeData);

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::dropMimeData(a0,a1,a2,a3,a4);

    extern bool sipVH_QtSql_35(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMimeData*, ::Qt::DropAction,int,int,const  ::QModelIndex&);

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

 ::QMimeData* sipQSqlRelationalTableModel::mimeData(const  ::QModelIndexList& a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::mimeData(a0);

    extern  ::QMimeData* sipVH_QtSql_34(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndexList&);

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

 ::QStringList sipQSqlRelationalTableModel::mimeTypes() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::mimeTypes();

    extern  ::QStringList sipVH_QtSql_22(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

bool sipQSqlRelationalTableModel::setItemData(const  ::QModelIndex& a0,const QMap<int, ::QVariant>& a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[27], &sipPySelf, SIP_NULLPTR, sipName_setItemData);

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::setItemData(a0,a1);

    extern bool sipVH_QtSql_33(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&,const QMap<int, ::QVariant>&);

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

QMap<int, ::QVariant> sipQSqlRelationalTableModel::itemData(const  ::QModelIndex& a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::itemData(a0);

    extern QMap<int, ::QVariant> sipVH_QtSql_32(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&);

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

bool sipQSqlRelationalTableModel::setHeaderData(int a0, ::Qt::Orientation a1,const  ::QVariant& a2,int a3)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[29], &sipPySelf, SIP_NULLPTR, sipName_setHeaderData);

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::setHeaderData(a0,a1,a2,a3);

    extern bool sipVH_QtSql_31(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int, ::Qt::Orientation,const  ::QVariant&,int);

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

 ::QVariant sipQSqlRelationalTableModel::headerData(int a0, ::Qt::Orientation a1,int a2) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::headerData(a0,a1,a2);

    extern  ::QVariant sipVH_QtSql_30(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int, ::Qt::Orientation,int);

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

bool sipQSqlRelationalTableModel::setData(const  ::QModelIndex& a0,const  ::QVariant& a1,int a2)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[31], &sipPySelf, SIP_NULLPTR, sipName_setData);

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::setData(a0,a1,a2);

    extern bool sipVH_QtSql_29(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&,const  ::QVariant&,int);

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

 ::QVariant sipQSqlRelationalTableModel::data(const  ::QModelIndex& a0,int a1) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::data(a0,a1);

    extern  ::QVariant sipVH_QtSql_28(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&,int);

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

int sipQSqlRelationalTableModel::columnCount(const  ::QModelIndex& a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::columnCount(a0);

    extern int sipVH_QtSql_26(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&);

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

int sipQSqlRelationalTableModel::rowCount(const  ::QModelIndex& a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::rowCount(a0);

    extern int sipVH_QtSql_26(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QModelIndex&);

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

 ::QModelIndex sipQSqlRelationalTableModel::sibling(int a0,int a1,const  ::QModelIndex& a2) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::sibling(a0,a1,a2);

    extern  ::QModelIndex sipVH_QtSql_24(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,int,const  ::QModelIndex&);

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

 ::QModelIndex sipQSqlRelationalTableModel::index(int a0,int a1,const  ::QModelIndex& a2) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::index(a0,a1,a2);

    extern  ::QModelIndex sipVH_QtSql_24(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,int,const  ::QModelIndex&);

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

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

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::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 sipQSqlRelationalTableModel::eventFilter( ::QObject*a0, ::QEvent*a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::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 sipQSqlRelationalTableModel::timerEvent( ::QTimerEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::QSqlRelationalTableModel::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 sipQSqlRelationalTableModel::childEvent( ::QChildEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::QSqlRelationalTableModel::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 sipQSqlRelationalTableModel::customEvent( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::QSqlRelationalTableModel::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 sipQSqlRelationalTableModel::connectNotify(const  ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::QSqlRelationalTableModel::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 sipQSqlRelationalTableModel::disconnectNotify(const  ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::QSqlRelationalTableModel::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);
}

bool sipQSqlRelationalTableModel::select()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[44], &sipPySelf, SIP_NULLPTR, sipName_select);

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::select();

    extern bool sipVH_QtSql_7(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

void sipQSqlRelationalTableModel::setTable(const  ::QString& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[45], &sipPySelf, SIP_NULLPTR, sipName_setTable);

    if (!sipMeth)
    {
         ::QSqlRelationalTableModel::setTable(a0);
        return;
    }

    extern void sipVH_QtSql_57(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QString&);

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

void sipQSqlRelationalTableModel::setEditStrategy( ::QSqlTableModel::EditStrategy a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[46], &sipPySelf, SIP_NULLPTR, sipName_setEditStrategy);

    if (!sipMeth)
    {
         ::QSqlRelationalTableModel::setEditStrategy(a0);
        return;
    }

    extern void sipVH_QtSql_58(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QSqlTableModel::EditStrategy);

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

void sipQSqlRelationalTableModel::setSort(int a0, ::Qt::SortOrder a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[47], &sipPySelf, SIP_NULLPTR, sipName_setSort);

    if (!sipMeth)
    {
         ::QSqlRelationalTableModel::setSort(a0,a1);
        return;
    }

    extern void sipVH_QtSql_40(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int, ::Qt::SortOrder);

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

void sipQSqlRelationalTableModel::setFilter(const  ::QString& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[48], &sipPySelf, SIP_NULLPTR, sipName_setFilter);

    if (!sipMeth)
    {
         ::QSqlRelationalTableModel::setFilter(a0);
        return;
    }

    extern void sipVH_QtSql_57(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QString&);

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

void sipQSqlRelationalTableModel::revertRow(int a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[49], &sipPySelf, SIP_NULLPTR, sipName_revertRow);

    if (!sipMeth)
    {
         ::QSqlRelationalTableModel::revertRow(a0);
        return;
    }

    extern void sipVH_QtSql_59(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int);

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

bool sipQSqlRelationalTableModel::updateRowInTable(int a0,const  ::QSqlRecord& a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[50], &sipPySelf, SIP_NULLPTR, sipName_updateRowInTable);

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::updateRowInTable(a0,a1);

    extern bool sipVH_QtSql_60(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,const  ::QSqlRecord&);

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

bool sipQSqlRelationalTableModel::insertRowIntoTable(const  ::QSqlRecord& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[51], &sipPySelf, SIP_NULLPTR, sipName_insertRowIntoTable);

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::insertRowIntoTable(a0);

    extern bool sipVH_QtSql_61(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QSqlRecord&);

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

bool sipQSqlRelationalTableModel::deleteRowFromTable(int a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[52], &sipPySelf, SIP_NULLPTR, sipName_deleteRowFromTable);

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::deleteRowFromTable(a0);

    extern bool sipVH_QtSql_62(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int);

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

 ::QString sipQSqlRelationalTableModel::orderByClause() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::orderByClause();

    extern  ::QString sipVH_QtSql_63(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

 ::QString sipQSqlRelationalTableModel::selectStatement() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::selectStatement();

    extern  ::QString sipVH_QtSql_63(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

bool sipQSqlRelationalTableModel::selectRow(int a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[55], &sipPySelf, SIP_NULLPTR, sipName_selectRow);

    if (!sipMeth)
        return  ::QSqlRelationalTableModel::selectRow(a0);

    extern bool sipVH_QtSql_62(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int);

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


PyDoc_STRVAR(doc_QSqlRelationalTableModel_data, "data(self, QModelIndex, role: int = Qt.ItemDataRole.DisplayRole) -> Any");

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

    {
        const  ::QModelIndex* a0;
        int a1 = Qt::ItemDataRole::DisplayRole;
        const  ::QSqlRelationalTableModel *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9|i", &sipSelf, sipType_QSqlRelationalTableModel, &sipCpp, sipType_QModelIndex, &a0, &a1))
        {
             ::QVariant*sipRes;

            sipRes = new  ::QVariant((sipSelfWasArg ? sipCpp-> ::QSqlRelationalTableModel::data(*a0,a1) : sipCpp->data(*a0,a1)));

            return sipConvertFromNewType(sipRes,sipType_QVariant,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlRelationalTableModel, sipName_data, doc_QSqlRelationalTableModel_data);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlRelationalTableModel_setData, "setData(self, QModelIndex, Any, role: int = Qt.ItemDataRole.EditRole) -> bool");

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

    {
        const  ::QModelIndex* a0;
        const  ::QVariant* a1;
        int a1State = 0;
        int a2 = Qt::ItemDataRole::EditRole;
         ::QSqlRelationalTableModel *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9J1|i", &sipSelf, sipType_QSqlRelationalTableModel, &sipCpp, sipType_QModelIndex, &a0, sipType_QVariant, &a1, &a1State, &a2))
        {
            bool sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QSqlRelationalTableModel::setData(*a0,*a1,a2) : sipCpp->setData(*a0,*a1,a2));
            sipReleaseType(const_cast< ::QVariant *>(a1), sipType_QVariant, a1State);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlRelationalTableModel, sipName_setData, doc_QSqlRelationalTableModel_setData);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlRelationalTableModel_clear, "clear(self)");

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

    {
         ::QSqlRelationalTableModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSqlRelationalTableModel, &sipCpp))
        {
            (sipSelfWasArg ? sipCpp-> ::QSqlRelationalTableModel::clear() : sipCpp->clear());

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlRelationalTableModel, sipName_clear, doc_QSqlRelationalTableModel_clear);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlRelationalTableModel_select, "select(self) -> bool");

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

    {
         ::QSqlRelationalTableModel *sipCpp;

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

            sipRes = (sipSelfWasArg ? sipCpp-> ::QSqlRelationalTableModel::select() : sipCpp->select());

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlRelationalTableModel, sipName_select, doc_QSqlRelationalTableModel_select);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlRelationalTableModel_setTable, "setTable(self, str)");

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

    {
        const  ::QString* a0;
        int a0State = 0;
         ::QSqlRelationalTableModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QSqlRelationalTableModel, &sipCpp, sipType_QString, &a0, &a0State))
        {
            (sipSelfWasArg ? sipCpp-> ::QSqlRelationalTableModel::setTable(*a0) : sipCpp->setTable(*a0));
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlRelationalTableModel, sipName_setTable, doc_QSqlRelationalTableModel_setTable);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlRelationalTableModel_setRelation, "setRelation(self, int, QSqlRelation)");

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

    {
        int a0;
        const  ::QSqlRelation* a1;
         ::QSqlRelationalTableModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BiJ9", &sipSelf, sipType_QSqlRelationalTableModel, &sipCpp, &a0, sipType_QSqlRelation, &a1))
        {
            (sipSelfWasArg ? sipCpp-> ::QSqlRelationalTableModel::setRelation(a0,*a1) : sipCpp->setRelation(a0,*a1));

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlRelationalTableModel, sipName_setRelation, doc_QSqlRelationalTableModel_setRelation);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlRelationalTableModel_relation, "relation(self, int) -> QSqlRelation");

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

    {
        int a0;
        const  ::QSqlRelationalTableModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QSqlRelationalTableModel, &sipCpp, &a0))
        {
             ::QSqlRelation*sipRes;

            sipRes = new  ::QSqlRelation(sipCpp->relation(a0));

            return sipConvertFromNewType(sipRes,sipType_QSqlRelation,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlRelationalTableModel, sipName_relation, doc_QSqlRelationalTableModel_relation);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlRelationalTableModel_relationModel, "relationModel(self, int) -> QSqlTableModel");

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

    {
        int a0;
        const  ::QSqlRelationalTableModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QSqlRelationalTableModel, &sipCpp, &a0))
        {
             ::QSqlTableModel*sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QSqlRelationalTableModel::relationModel(a0) : sipCpp->relationModel(a0));

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

    sipNoMethod(sipParseErr, sipName_QSqlRelationalTableModel, sipName_relationModel, doc_QSqlRelationalTableModel_relationModel);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlRelationalTableModel_revertRow, "revertRow(self, int)");

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

    {
        int a0;
         ::QSqlRelationalTableModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QSqlRelationalTableModel, &sipCpp, &a0))
        {
            (sipSelfWasArg ? sipCpp-> ::QSqlRelationalTableModel::revertRow(a0) : sipCpp->revertRow(a0));

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlRelationalTableModel, sipName_revertRow, doc_QSqlRelationalTableModel_revertRow);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlRelationalTableModel_removeColumns, "removeColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool");

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

    {
        int a0;
        int a1;
        const  ::QModelIndex& a2def = QModelIndex();
        const  ::QModelIndex* a2 = &a2def;
         ::QSqlRelationalTableModel *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bii|J9", &sipSelf, sipType_QSqlRelationalTableModel, &sipCpp, &a0, &a1, sipType_QModelIndex, &a2))
        {
            bool sipRes;

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

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlRelationalTableModel, sipName_removeColumns, doc_QSqlRelationalTableModel_removeColumns);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlRelationalTableModel_selectStatement, "selectStatement(self) -> str");

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

    {
        const  ::QSqlRelationalTableModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "p", &sipSelf, sipType_QSqlRelationalTableModel, &sipCpp))
        {
             ::QString*sipRes;

            sipRes = new  ::QString((sipSelfWasArg ? sipCpp-> ::QSqlRelationalTableModel::selectStatement() : sipCpp->selectStatement()));

            return sipConvertFromNewType(sipRes,sipType_QString,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlRelationalTableModel, sipName_selectStatement, doc_QSqlRelationalTableModel_selectStatement);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlRelationalTableModel_updateRowInTable, "updateRowInTable(self, int, QSqlRecord) -> bool");

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

    {
        int a0;
        const  ::QSqlRecord* a1;
         ::QSqlRelationalTableModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "piJ9", &sipSelf, sipType_QSqlRelationalTableModel, &sipCpp, &a0, sipType_QSqlRecord, &a1))
        {
            bool sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QSqlRelationalTableModel::updateRowInTable(a0,*a1) : sipCpp->updateRowInTable(a0,*a1));

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlRelationalTableModel, sipName_updateRowInTable, doc_QSqlRelationalTableModel_updateRowInTable);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlRelationalTableModel_orderByClause, "orderByClause(self) -> str");

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

    {
        const  ::QSqlRelationalTableModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "p", &sipSelf, sipType_QSqlRelationalTableModel, &sipCpp))
        {
             ::QString*sipRes;

            sipRes = new  ::QString((sipSelfWasArg ? sipCpp-> ::QSqlRelationalTableModel::orderByClause() : sipCpp->orderByClause()));

            return sipConvertFromNewType(sipRes,sipType_QString,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlRelationalTableModel, sipName_orderByClause, doc_QSqlRelationalTableModel_orderByClause);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlRelationalTableModel_insertRowIntoTable, "insertRowIntoTable(self, QSqlRecord) -> bool");

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

    {
        const  ::QSqlRecord* a0;
         ::QSqlRelationalTableModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pJ9", &sipSelf, sipType_QSqlRelationalTableModel, &sipCpp, sipType_QSqlRecord, &a0))
        {
            bool sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QSqlRelationalTableModel::insertRowIntoTable(*a0) : sipCpp->insertRowIntoTable(*a0));

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlRelationalTableModel, sipName_insertRowIntoTable, doc_QSqlRelationalTableModel_insertRowIntoTable);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSqlRelationalTableModel_setJoinMode, "setJoinMode(self, QSqlRelationalTableModel.JoinMode)");

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

    {
         ::QSqlRelationalTableModel::JoinMode a0;
         ::QSqlRelationalTableModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QSqlRelationalTableModel, &sipCpp, sipType_QSqlRelationalTableModel_JoinMode, &a0))
        {
            sipCpp->setJoinMode(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSqlRelationalTableModel, sipName_setJoinMode, doc_QSqlRelationalTableModel_setJoinMode);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QSqlRelationalTableModel)
        return sipCppV;

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

    return SIP_NULLPTR;
}


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

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


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


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


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

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


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

    {
         ::QObject* a0 = 0;
         ::QSqlDatabase a1def = QSqlDatabase();
         ::QSqlDatabase* a1 = &a1def;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|JHJ9", sipType_QObject, &a0, sipOwner, sipType_QSqlDatabase, &a1))
        {
            sipCpp = new sipQSqlRelationalTableModel(a0,*a1);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_QSqlRelationalTableModel[] = {
    {sipName_clear, meth_QSqlRelationalTableModel_clear, METH_VARARGS, doc_QSqlRelationalTableModel_clear},
    {sipName_data, SIP_MLMETH_CAST(meth_QSqlRelationalTableModel_data), METH_VARARGS|METH_KEYWORDS, doc_QSqlRelationalTableModel_data},
    {sipName_insertRowIntoTable, meth_QSqlRelationalTableModel_insertRowIntoTable, METH_VARARGS, doc_QSqlRelationalTableModel_insertRowIntoTable},
    {sipName_orderByClause, meth_QSqlRelationalTableModel_orderByClause, METH_VARARGS, doc_QSqlRelationalTableModel_orderByClause},
    {sipName_relation, meth_QSqlRelationalTableModel_relation, METH_VARARGS, doc_QSqlRelationalTableModel_relation},
    {sipName_relationModel, meth_QSqlRelationalTableModel_relationModel, METH_VARARGS, doc_QSqlRelationalTableModel_relationModel},
    {sipName_removeColumns, SIP_MLMETH_CAST(meth_QSqlRelationalTableModel_removeColumns), METH_VARARGS|METH_KEYWORDS, doc_QSqlRelationalTableModel_removeColumns},
    {sipName_revertRow, meth_QSqlRelationalTableModel_revertRow, METH_VARARGS, doc_QSqlRelationalTableModel_revertRow},
    {sipName_select, meth_QSqlRelationalTableModel_select, METH_VARARGS, doc_QSqlRelationalTableModel_select},
    {sipName_selectStatement, meth_QSqlRelationalTableModel_selectStatement, METH_VARARGS, doc_QSqlRelationalTableModel_selectStatement},
    {sipName_setData, SIP_MLMETH_CAST(meth_QSqlRelationalTableModel_setData), METH_VARARGS|METH_KEYWORDS, doc_QSqlRelationalTableModel_setData},
    {sipName_setJoinMode, meth_QSqlRelationalTableModel_setJoinMode, METH_VARARGS, doc_QSqlRelationalTableModel_setJoinMode},
    {sipName_setRelation, meth_QSqlRelationalTableModel_setRelation, METH_VARARGS, doc_QSqlRelationalTableModel_setRelation},
    {sipName_setTable, meth_QSqlRelationalTableModel_setTable, METH_VARARGS, doc_QSqlRelationalTableModel_setTable},
    {sipName_updateRowInTable, meth_QSqlRelationalTableModel_updateRowInTable, METH_VARARGS, doc_QSqlRelationalTableModel_updateRowInTable}
};

static sipEnumMemberDef enummembers_QSqlRelationalTableModel[] = {
    {sipName_InnerJoin, static_cast<int>( ::QSqlRelationalTableModel::InnerJoin), 27},
    {sipName_LeftJoin, static_cast<int>( ::QSqlRelationalTableModel::LeftJoin), 27},
};

PyDoc_STRVAR(doc_QSqlRelationalTableModel, "\1QSqlRelationalTableModel(parent: QObject = None, db: QSqlDatabase = QSqlDatabase())");


static pyqt5ClassPluginDef plugin_QSqlRelationalTableModel = {
    & ::QSqlRelationalTableModel::staticMetaObject,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtSql_QSqlRelationalTableModel = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QSqlRelationalTableModel,
        SIP_NULLPTR,
        &plugin_QSqlRelationalTableModel
    },
    {
        sipNameNr_QSqlRelationalTableModel,
        {0, 0, 1},
        15, methods_QSqlRelationalTableModel,
        2, enummembers_QSqlRelationalTableModel,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QSqlRelationalTableModel,
    -1,
    -1,
    supers_QSqlRelationalTableModel,
    SIP_NULLPTR,
    init_type_QSqlRelationalTableModel,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QSqlRelationalTableModel,
    SIP_NULLPTR,
    array_QSqlRelationalTableModel,
    SIP_NULLPTR,
    release_QSqlRelationalTableModel,
    cast_QSqlRelationalTableModel,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QSqlRelationalTableModel,
    sizeof ( ::QSqlRelationalTableModel),
};
