/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.14.0
 *
 * 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 "sipAPIQtHelp.h"

#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtHelp/qhelpindexwidget.sip"
#include <qhelpindexwidget.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"

#line 27 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qmap.sip"
#include <qmap.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 109 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qurl.sip"
#include <qurl.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qabstractitemmodel.sip"
#include <qabstractitemmodel.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtHelp/qhelpenginecore.sip"
#include <qhelpenginecore.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 146 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qmap.sip"
#include <qmap.h>
#line 48 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 51 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 54 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 57 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 36 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qstringlist.sip"
#include <qstringlist.h>
#line 60 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.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/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qobject.sip"
#include <qobject.h>
#line 66 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qmimedata.sip"
#include <qmimedata.h>
#line 69 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 111 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qabstractitemmodel.sip"
#include <qabstractitemmodel.h>
#line 72 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 275 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qhash.sip"
#include <qhash.h>
#line 75 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 30 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 78 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 81 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qdatastream.sip"
#include <qdatastream.h>
#line 84 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 87 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 76 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qabstractitemmodel.sip"
#include <qabstractitemmodel.h>
#line 90 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 111 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qabstractitemmodel.sip"
#include <qabstractitemmodel.h>
#line 93 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 442 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qvector.sip"
#include <qvector.h>
#line 96 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qsize.sip"
#include <qsize.h>
#line 99 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 102 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.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 107 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 110 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 113 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 252 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 116 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 240 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 119 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 122 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 149 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 125 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qthread.sip"
#include <qthread.h>
#line 128 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 131 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qregexp.sip"
#include <qregexp.h>
#line 134 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 137 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 140 "/build/pyqt5/src/PyQt5-5.15.11/build/QtHelp/sipQtHelpQHelpIndexModel.cpp"


PyDoc_STRVAR(doc_QHelpIndexModel_helpEngine, "helpEngine(self) -> Optional[QHelpEngineCore]");

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

    {
        const ::QHelpIndexModel *sipCpp;

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

            sipRes = sipCpp->helpEngine();

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

    sipNoMethod(sipParseErr, sipName_QHelpIndexModel, sipName_helpEngine, doc_QHelpIndexModel_helpEngine);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QHelpIndexModel_createIndex, "createIndex(self, customFilterName: Optional[str])");

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

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

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QHelpIndexModel, &sipCpp, sipType_QString, &a0, &a0State))
        {
            sipCpp->createIndex(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QHelpIndexModel, sipName_createIndex, doc_QHelpIndexModel_createIndex);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QHelpIndexModel_filter, "filter(self, filter: Optional[str], wildcard: Optional[str] = '') -> QModelIndex");

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

    {
        const ::QString* a0;
        int a0State = 0;
        const ::QString& a1def = QString();
        const ::QString* a1 = &a1def;
        int a1State = 0;
        ::QHelpIndexModel *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|J1", &sipSelf, sipType_QHelpIndexModel, &sipCpp, sipType_QString, &a0, &a0State, sipType_QString, &a1, &a1State))
        {
            ::QModelIndex*sipRes;

            sipRes = new ::QModelIndex(sipCpp->filter(*a0, *a1));
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);
            sipReleaseType(const_cast< ::QString *>(a1), sipType_QString, a1State);

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

    sipNoMethod(sipParseErr, sipName_QHelpIndexModel, sipName_filter, doc_QHelpIndexModel_filter);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QHelpIndexModel_linksForKeyword, "linksForKeyword(self, keyword: Optional[str]) -> dict[str, QUrl]");

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

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

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QHelpIndexModel, &sipCpp, sipType_QString, &a0, &a0State))
        {
            QMap< ::QString, ::QUrl>*sipRes;

            sipRes = new QMap< ::QString, ::QUrl>(sipCpp->linksForKeyword(*a0));
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

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

    sipNoMethod(sipParseErr, sipName_QHelpIndexModel, sipName_linksForKeyword, doc_QHelpIndexModel_linksForKeyword);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QHelpIndexModel_isCreatingIndex, "isCreatingIndex(self) -> bool");

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

    {
        const ::QHelpIndexModel *sipCpp;

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

            sipRes = sipCpp->isCreatingIndex();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QHelpIndexModel, sipName_isCreatingIndex, doc_QHelpIndexModel_isCreatingIndex);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QHelpIndexModel)
        return sipCppV;

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

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QHelpIndexModel(void *, int);}
static void release_QHelpIndexModel(void *, int)
{
}


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


static PyMethodDef methods_QHelpIndexModel[] = {
    {sipName_createIndex, meth_QHelpIndexModel_createIndex, METH_VARARGS, doc_QHelpIndexModel_createIndex},
    {sipName_filter, SIP_MLMETH_CAST(meth_QHelpIndexModel_filter), METH_VARARGS|METH_KEYWORDS, doc_QHelpIndexModel_filter},
    {sipName_helpEngine, meth_QHelpIndexModel_helpEngine, METH_VARARGS, doc_QHelpIndexModel_helpEngine},
    {sipName_isCreatingIndex, meth_QHelpIndexModel_isCreatingIndex, METH_VARARGS, doc_QHelpIndexModel_isCreatingIndex},
    {sipName_linksForKeyword, meth_QHelpIndexModel_linksForKeyword, METH_VARARGS, doc_QHelpIndexModel_linksForKeyword}
};


/* Define this type's signals. */
static const pyqt5QtSignal signals_QHelpIndexModel[] = {
    {"indexCreated()", "\1indexCreated(self)", SIP_NULLPTR, SIP_NULLPTR},
    {"indexCreationStarted()", "\1indexCreationStarted(self)", SIP_NULLPTR, SIP_NULLPTR},
    {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR}
};


static pyqt5ClassPluginDef plugin_QHelpIndexModel = {
    &::QHelpIndexModel::staticMetaObject,
    0,
    signals_QHelpIndexModel,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtHelp_QHelpIndexModel = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QHelpIndexModel,
        SIP_NULLPTR,
        &plugin_QHelpIndexModel,
    },
    {
        sipNameNr_QHelpIndexModel,
        {0, 0, 1},
        5, methods_QHelpIndexModel,
        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},
    },
    SIP_NULLPTR,
    -1,
    -1,
    supers_QHelpIndexModel,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QHelpIndexModel,
    cast_QHelpIndexModel,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    0,
};
