/*
 * Interface wrapper code.
 *
 * Generated by SIP 4.19.23
 *
 * Copyright (c) 2020 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 "sipAPIQtGui.h"

#line 36 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtGui/qtextdocument.sip"
#include <qtextdocument.h>
#line 29 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"

#line 28 "sip/QtCore/qobject.sip"
#include <qobject.h>
#line 33 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 27 "sip/QtCore/qstring.sip"
#include <qstring.h>
#line 36 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 36 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtGui/qtextdocument.sip"
#include <qtextdocument.h>
#line 39 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 96 "sip/QtCore/qurl.sip"
#include <qurl.h>
#line 42 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 26 "sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 45 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 27 "sip/QtCore/qchar.sip"
#include <qchar.h>
#line 48 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 118 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtGui/qtextobject.sip"
#include <qtextobject.h>
#line 51 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 26 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtGui/qtextoption.sip"
#include <qtextoption.h>
#line 54 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 103 "sip/QtCore/qsize.sip"
#include <qsize.h>
#line 57 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 26 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtGui/qpainter.sip"
#include <qpainter.h>
#line 60 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 164 "sip/QtCore/qrect.sip"
#include <qrect.h>
#line 63 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 26 "sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 66 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 26 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtGui/qtextobject.sip"
#include <qtextobject.h>
#line 69 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 59 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtGui/qtextformat.sip"
#include <qtextformat.h>
#line 72 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 26 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtGui/qtextcursor.sip"
#include <qtextcursor.h>
#line 75 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 28 "sip/QtCore/qpycore_qvector.sip"
#include <qvector.h>
#line 78 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 26 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtGui/qpagedpaintdevice.sip"
#include <qpagedpaintdevice.h>
#line 81 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 26 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtGui/qfont.sip"
#include <qfont.h>
#line 84 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 59 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtGui/qtextobject.sip"
#include <qtextobject.h>
#line 87 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 36 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtGui/qtextdocument.sip"
#include <qtextdocument.h>
#line 90 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 26 "sip/QtCore/qregexp.sip"
#include <qregexp.h>
#line 93 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 26 "sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 96 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 30 "sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 99 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 26 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtGui/qabstracttextdocumentlayout.sip"
#include <qabstracttextdocumentlayout.h>
#line 102 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 26 "sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 146 "sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 107 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 26 "sip/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 110 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 26 "sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 113 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 247 "sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 116 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 235 "sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 119 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 38 "sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 122 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 149 "sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 125 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 26 "sip/QtCore/qthread.sip"
#include <qthread.h>
#line 128 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 26 "sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 131 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"
#line 26 "sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 134 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtGui/sipQtGuiQTextDocument.cpp"


class sipQTextDocument : public  ::QTextDocument
{
public:
    sipQTextDocument( ::QObject*);
    sipQTextDocument(const  ::QString&, ::QObject*);
    virtual ~sipQTextDocument();

    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:
     ::QVariant loadResource(int,const  ::QUrl&) SIP_OVERRIDE;
     ::QTextObject* createObject(const  ::QTextFormat&) SIP_OVERRIDE;
    void clear() 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;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[10];
};

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

sipQTextDocument::sipQTextDocument(const  ::QString& a0, ::QObject*a1):  ::QTextDocument(a0,a1), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

const QMetaObject *sipQTextDocument::metaObject() const
{
    if (sipGetInterpreter())
        return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : sip_QtGui_qt_metaobject(sipPySelf,sipType_QTextDocument);

    return  ::QTextDocument::metaObject();
}

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

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

    return _id;
}

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

    return (sip_QtGui_qt_metacast(sipPySelf, sipType_QTextDocument, _clname, &sipCpp) ? sipCpp :  ::QTextDocument::qt_metacast(_clname));
}

 ::QVariant sipQTextDocument::loadResource(int a0,const  ::QUrl& a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QTextDocument::loadResource(a0,a1);

    extern  ::QVariant sipVH_QtGui_105(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,const  ::QUrl&);

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

 ::QTextObject* sipQTextDocument::createObject(const  ::QTextFormat& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QTextDocument::createObject(a0);

    extern  ::QTextObject* sipVH_QtGui_104(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QTextFormat&);

    return sipVH_QtGui_104(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

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

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

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

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

    sipVH_QtGui_39(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

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

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

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

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

    return sipVH_QtGui_5(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

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

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

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

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

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

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

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

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

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

    sipVH_QtGui_3(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

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

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

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

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

    sipVH_QtGui_2(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

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

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

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

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

    sipVH_QtGui_1(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

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

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

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

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

    sipVH_QtGui_0(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

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

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

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

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

    sipVH_QtGui_0(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}


PyDoc_STRVAR(doc_QTextDocument_clone, "clone(self, parent: QObject = None) -> QTextDocument");

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

    {
         ::QObject* a0 = 0;
        sipWrapper *sipOwner = SIP_NULLPTR;
        const  ::QTextDocument *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|JH", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QObject, &a0, &sipOwner))
        {
             ::QTextDocument*sipRes;

            sipRes = sipCpp->clone(a0);

            return sipConvertFromNewType(sipRes,sipType_QTextDocument,(PyObject *)sipOwner);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_clone, doc_QTextDocument_clone);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_isEmpty, "isEmpty(self) -> bool");

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

    {
        const  ::QTextDocument *sipCpp;

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

            sipRes = sipCpp->isEmpty();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_isEmpty, doc_QTextDocument_isEmpty);

    return SIP_NULLPTR;
}


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

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

    {
         ::QTextDocument *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_clear, doc_QTextDocument_clear);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_setUndoRedoEnabled, "setUndoRedoEnabled(self, bool)");

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

    {
        bool a0;
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QTextDocument, &sipCpp, &a0))
        {
            sipCpp->setUndoRedoEnabled(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_setUndoRedoEnabled, doc_QTextDocument_setUndoRedoEnabled);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_isUndoRedoEnabled, "isUndoRedoEnabled(self) -> bool");

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

    {
        const  ::QTextDocument *sipCpp;

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

            sipRes = sipCpp->isUndoRedoEnabled();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_isUndoRedoEnabled, doc_QTextDocument_isUndoRedoEnabled);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_isUndoAvailable, "isUndoAvailable(self) -> bool");

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

    {
        const  ::QTextDocument *sipCpp;

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

            sipRes = sipCpp->isUndoAvailable();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_isUndoAvailable, doc_QTextDocument_isUndoAvailable);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_isRedoAvailable, "isRedoAvailable(self) -> bool");

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

    {
        const  ::QTextDocument *sipCpp;

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

            sipRes = sipCpp->isRedoAvailable();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_isRedoAvailable, doc_QTextDocument_isRedoAvailable);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_setDocumentLayout, "setDocumentLayout(self, QAbstractTextDocumentLayout)");

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

    {
         ::QAbstractTextDocumentLayout* a0;
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ:", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QAbstractTextDocumentLayout, &a0))
        {
            sipCpp->setDocumentLayout(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_setDocumentLayout, doc_QTextDocument_setDocumentLayout);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_documentLayout, "documentLayout(self) -> QAbstractTextDocumentLayout");

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

    {
        const  ::QTextDocument *sipCpp;

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

            sipRes = sipCpp->documentLayout();

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_documentLayout, doc_QTextDocument_documentLayout);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_setMetaInformation, "setMetaInformation(self, QTextDocument.MetaInformation, str)");

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

    {
         ::QTextDocument::MetaInformation a0;
        const  ::QString* a1;
        int a1State = 0;
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BEJ1", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QTextDocument_MetaInformation, &a0, sipType_QString,&a1, &a1State))
        {
            sipCpp->setMetaInformation(a0,*a1);
            sipReleaseType(const_cast< ::QString *>(a1),sipType_QString,a1State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_setMetaInformation, doc_QTextDocument_setMetaInformation);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_metaInformation, "metaInformation(self, QTextDocument.MetaInformation) -> str");

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

    {
         ::QTextDocument::MetaInformation a0;
        const  ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QTextDocument_MetaInformation, &a0))
        {
             ::QString*sipRes;

            sipRes = new  ::QString(sipCpp->metaInformation(a0));

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_metaInformation, doc_QTextDocument_metaInformation);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_toHtml, "toHtml(self, encoding: Union[QByteArray, bytes, bytearray] = QByteArray()) -> str");

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

    {
        const  ::QByteArray& a0def = QByteArray();
        const  ::QByteArray* a0 = &a0def;
        int a0State = 0;
        const  ::QTextDocument *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|J1", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QByteArray, &a0, &a0State))
        {
             ::QString*sipRes;

            sipRes = new  ::QString(sipCpp->toHtml(*a0));
            sipReleaseType(const_cast< ::QByteArray *>(a0),sipType_QByteArray,a0State);

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_toHtml, doc_QTextDocument_toHtml);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_setHtml, "setHtml(self, str)");

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

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

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_setHtml, doc_QTextDocument_setHtml);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_toPlainText, "toPlainText(self) -> str");

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

    {
        const  ::QTextDocument *sipCpp;

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

            sipRes = new  ::QString(sipCpp->toPlainText());

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_toPlainText, doc_QTextDocument_toPlainText);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_setPlainText, "setPlainText(self, str)");

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

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

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_setPlainText, doc_QTextDocument_setPlainText);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_find, "find(self, str, position: int = 0, options: QTextDocument.FindFlags = 0) -> QTextCursor\n"
"find(self, QRegExp, position: int = 0, options: QTextDocument.FindFlags = 0) -> QTextCursor\n"
"find(self, QRegularExpression, position: int = 0, options: QTextDocument.FindFlags = 0) -> QTextCursor\n"
"find(self, str, QTextCursor, options: QTextDocument.FindFlags = 0) -> QTextCursor\n"
"find(self, QRegExp, QTextCursor, options: QTextDocument.FindFlags = 0) -> QTextCursor\n"
"find(self, QRegularExpression, QTextCursor, options: QTextDocument.FindFlags = 0) -> QTextCursor");

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

    {
        const  ::QString* a0;
        int a0State = 0;
        int a1 = 0;
         ::QTextDocument::FindFlags a2def = 0;
         ::QTextDocument::FindFlags* a2 = &a2def;
        int a2State = 0;
        const  ::QTextDocument *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|iJ1", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QString,&a0, &a0State, &a1, sipType_QTextDocument_FindFlags, &a2, &a2State))
        {
             ::QTextCursor*sipRes;

            sipRes = new  ::QTextCursor(sipCpp->find(*a0,a1,*a2));
            sipReleaseType(const_cast< ::QString *>(a0),sipType_QString,a0State);
            sipReleaseType(a2,sipType_QTextDocument_FindFlags,a2State);

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

    {
        const  ::QRegExp* a0;
        int a1 = 0;
         ::QTextDocument::FindFlags a2def = 0;
         ::QTextDocument::FindFlags* a2 = &a2def;
        int a2State = 0;
        const  ::QTextDocument *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9|iJ1", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QRegExp, &a0, &a1, sipType_QTextDocument_FindFlags, &a2, &a2State))
        {
             ::QTextCursor*sipRes;

            sipRes = new  ::QTextCursor(sipCpp->find(*a0,a1,*a2));
            sipReleaseType(a2,sipType_QTextDocument_FindFlags,a2State);

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

    {
        const  ::QRegularExpression* a0;
        int a1 = 0;
         ::QTextDocument::FindFlags a2def = 0;
         ::QTextDocument::FindFlags* a2 = &a2def;
        int a2State = 0;
        const  ::QTextDocument *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9|iJ1", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QRegularExpression, &a0, &a1, sipType_QTextDocument_FindFlags, &a2, &a2State))
        {
             ::QTextCursor*sipRes;

            sipRes = new  ::QTextCursor(sipCpp->find(*a0,a1,*a2));
            sipReleaseType(a2,sipType_QTextDocument_FindFlags,a2State);

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

    {
        const  ::QString* a0;
        int a0State = 0;
        const  ::QTextCursor* a1;
         ::QTextDocument::FindFlags a2def = 0;
         ::QTextDocument::FindFlags* a2 = &a2def;
        int a2State = 0;
        const  ::QTextDocument *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1J9|J1", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QString,&a0, &a0State, sipType_QTextCursor, &a1, sipType_QTextDocument_FindFlags, &a2, &a2State))
        {
             ::QTextCursor*sipRes;

            sipRes = new  ::QTextCursor(sipCpp->find(*a0,*a1,*a2));
            sipReleaseType(const_cast< ::QString *>(a0),sipType_QString,a0State);
            sipReleaseType(a2,sipType_QTextDocument_FindFlags,a2State);

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

    {
        const  ::QRegExp* a0;
        const  ::QTextCursor* a1;
         ::QTextDocument::FindFlags a2def = 0;
         ::QTextDocument::FindFlags* a2 = &a2def;
        int a2State = 0;
        const  ::QTextDocument *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9J9|J1", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QRegExp, &a0, sipType_QTextCursor, &a1, sipType_QTextDocument_FindFlags, &a2, &a2State))
        {
             ::QTextCursor*sipRes;

            sipRes = new  ::QTextCursor(sipCpp->find(*a0,*a1,*a2));
            sipReleaseType(a2,sipType_QTextDocument_FindFlags,a2State);

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

    {
        const  ::QRegularExpression* a0;
        const  ::QTextCursor* a1;
         ::QTextDocument::FindFlags a2def = 0;
         ::QTextDocument::FindFlags* a2 = &a2def;
        int a2State = 0;
        const  ::QTextDocument *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9J9|J1", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QRegularExpression, &a0, sipType_QTextCursor, &a1, sipType_QTextDocument_FindFlags, &a2, &a2State))
        {
             ::QTextCursor*sipRes;

            sipRes = new  ::QTextCursor(sipCpp->find(*a0,*a1,*a2));
            sipReleaseType(a2,sipType_QTextDocument_FindFlags,a2State);

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_find, doc_QTextDocument_find);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_rootFrame, "rootFrame(self) -> QTextFrame");

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

    {
        const  ::QTextDocument *sipCpp;

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

            sipRes = sipCpp->rootFrame();

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_rootFrame, doc_QTextDocument_rootFrame);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_object, "object(self, int) -> QTextObject");

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

    {
        int a0;
        const  ::QTextDocument *sipCpp;

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

            sipRes = sipCpp->object(a0);

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_object, doc_QTextDocument_object);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_objectForFormat, "objectForFormat(self, QTextFormat) -> QTextObject");

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

    {
        const  ::QTextFormat* a0;
        const  ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QTextFormat, &a0))
        {
             ::QTextObject*sipRes;

            sipRes = sipCpp->objectForFormat(*a0);

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_objectForFormat, doc_QTextDocument_objectForFormat);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_findBlock, "findBlock(self, int) -> QTextBlock");

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

    {
        int a0;
        const  ::QTextDocument *sipCpp;

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

            sipRes = new  ::QTextBlock(sipCpp->findBlock(a0));

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_findBlock, doc_QTextDocument_findBlock);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_begin, "begin(self) -> QTextBlock");

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

    {
        const  ::QTextDocument *sipCpp;

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

            sipRes = new  ::QTextBlock(sipCpp->begin());

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_begin, doc_QTextDocument_begin);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_end, "end(self) -> QTextBlock");

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

    {
        const  ::QTextDocument *sipCpp;

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

            sipRes = new  ::QTextBlock(sipCpp->end());

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_end, doc_QTextDocument_end);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_setPageSize, "setPageSize(self, QSizeF)");

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

    {
        const  ::QSizeF* a0;
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QSizeF, &a0))
        {
            sipCpp->setPageSize(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_setPageSize, doc_QTextDocument_setPageSize);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_pageSize, "pageSize(self) -> QSizeF");

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

    {
        const  ::QTextDocument *sipCpp;

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

            sipRes = new  ::QSizeF(sipCpp->pageSize());

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_pageSize, doc_QTextDocument_pageSize);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_setDefaultFont, "setDefaultFont(self, QFont)");

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

    {
        const  ::QFont* a0;
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QFont, &a0))
        {
            sipCpp->setDefaultFont(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_setDefaultFont, doc_QTextDocument_setDefaultFont);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_defaultFont, "defaultFont(self) -> QFont");

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

    {
        const  ::QTextDocument *sipCpp;

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

            sipRes = new  ::QFont(sipCpp->defaultFont());

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_defaultFont, doc_QTextDocument_defaultFont);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_pageCount, "pageCount(self) -> int");

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

    {
        const  ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTextDocument, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->pageCount();

            return SIPLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_pageCount, doc_QTextDocument_pageCount);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_isModified, "isModified(self) -> bool");

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

    {
        const  ::QTextDocument *sipCpp;

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

            sipRes = sipCpp->isModified();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_isModified, doc_QTextDocument_isModified);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_print_, "print_(self, QPagedPaintDevice)");

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

    {
         ::QPagedPaintDevice* a0;
        const  ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QPagedPaintDevice, &a0))
        {
            sipCpp->print(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_print_, doc_QTextDocument_print_);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_print, "print(self, QPagedPaintDevice)");

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

    {
         ::QPagedPaintDevice* a0;
        const  ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QPagedPaintDevice, &a0))
        {
            sipCpp->print(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_print, doc_QTextDocument_print);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_resource, "resource(self, int, QUrl) -> Any");

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

    {
        int a0;
        const  ::QUrl* a1;
        const  ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BiJ9", &sipSelf, sipType_QTextDocument, &sipCpp, &a0, sipType_QUrl, &a1))
        {
             ::QVariant*sipRes;

            sipRes = new  ::QVariant(sipCpp->resource(a0,*a1));

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_resource, doc_QTextDocument_resource);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_addResource, "addResource(self, int, QUrl, Any)");

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

    {
        int a0;
        const  ::QUrl* a1;
        const  ::QVariant* a2;
        int a2State = 0;
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BiJ9J1", &sipSelf, sipType_QTextDocument, &sipCpp, &a0, sipType_QUrl, &a1, sipType_QVariant, &a2, &a2State))
        {
            sipCpp->addResource(a0,*a1,*a2);
            sipReleaseType(const_cast< ::QVariant *>(a2),sipType_QVariant,a2State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_addResource, doc_QTextDocument_addResource);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_allFormats, "allFormats(self) -> List[QTextFormat]");

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

    {
        const  ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTextDocument, &sipCpp))
        {
            QVector< ::QTextFormat>*sipRes;

            sipRes = new QVector< ::QTextFormat>(sipCpp->allFormats());

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_allFormats, doc_QTextDocument_allFormats);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_markContentsDirty, "markContentsDirty(self, int, int)");

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

    {
        int a0;
        int a1;
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bii", &sipSelf, sipType_QTextDocument, &sipCpp, &a0, &a1))
        {
            sipCpp->markContentsDirty(a0,a1);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_markContentsDirty, doc_QTextDocument_markContentsDirty);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_setUseDesignMetrics, "setUseDesignMetrics(self, bool)");

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

    {
        bool a0;
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QTextDocument, &sipCpp, &a0))
        {
            sipCpp->setUseDesignMetrics(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_setUseDesignMetrics, doc_QTextDocument_setUseDesignMetrics);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_useDesignMetrics, "useDesignMetrics(self) -> bool");

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

    {
        const  ::QTextDocument *sipCpp;

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

            sipRes = sipCpp->useDesignMetrics();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_useDesignMetrics, doc_QTextDocument_useDesignMetrics);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_undo, "undo(self)\n"
"undo(self, QTextCursor)");

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

    {
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTextDocument, &sipCpp))
        {
            sipCpp->undo();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
         ::QTextCursor* a0;
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QTextCursor, &a0))
        {
            sipCpp->undo(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_undo, doc_QTextDocument_undo);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_redo, "redo(self)\n"
"redo(self, QTextCursor)");

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

    {
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTextDocument, &sipCpp))
        {
            sipCpp->redo();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
         ::QTextCursor* a0;
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QTextCursor, &a0))
        {
            sipCpp->redo(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_redo, doc_QTextDocument_redo);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_setModified, "setModified(self, on: bool = True)");

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

    {
        bool a0 = 1;
         ::QTextDocument *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|b", &sipSelf, sipType_QTextDocument, &sipCpp, &a0))
        {
            sipCpp->setModified(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_setModified, doc_QTextDocument_setModified);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_createObject, "createObject(self, QTextFormat) -> QTextObject");

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

    {
        const  ::QTextFormat* a0;
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pJ9", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QTextFormat, &a0))
        {
             ::QTextObject*sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QTextDocument::createObject(*a0) : sipCpp->createObject(*a0));

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_createObject, doc_QTextDocument_createObject);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_loadResource, "loadResource(self, int, QUrl) -> Any");

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

    {
        int a0;
        const  ::QUrl* a1;
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "piJ9", &sipSelf, sipType_QTextDocument, &sipCpp, &a0, sipType_QUrl, &a1))
        {
             ::QVariant*sipRes;

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

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_loadResource, doc_QTextDocument_loadResource);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_drawContents, "drawContents(self, QPainter, rect: QRectF = QRectF())");

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

    {
         ::QPainter* a0;
        const  ::QRectF& a1def = QRectF();
        const  ::QRectF* a1 = &a1def;
         ::QTextDocument *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8|J9", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QPainter, &a0, sipType_QRectF, &a1))
        {
            sipCpp->drawContents(a0,*a1);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_drawContents, doc_QTextDocument_drawContents);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_setTextWidth, "setTextWidth(self, float)");

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

    {
         ::qreal a0;
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bd", &sipSelf, sipType_QTextDocument, &sipCpp, &a0))
        {
            sipCpp->setTextWidth(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_setTextWidth, doc_QTextDocument_setTextWidth);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_textWidth, "textWidth(self) -> float");

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

    {
        const  ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTextDocument, &sipCpp))
        {
             ::qreal sipRes;

            sipRes = sipCpp->textWidth();

            return PyFloat_FromDouble(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_textWidth, doc_QTextDocument_textWidth);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_idealWidth, "idealWidth(self) -> float");

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

    {
        const  ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTextDocument, &sipCpp))
        {
             ::qreal sipRes;

            sipRes = sipCpp->idealWidth();

            return PyFloat_FromDouble(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_idealWidth, doc_QTextDocument_idealWidth);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_adjustSize, "adjustSize(self)");

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

    {
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTextDocument, &sipCpp))
        {
            sipCpp->adjustSize();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_adjustSize, doc_QTextDocument_adjustSize);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_size, "size(self) -> QSizeF");

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

    {
        const  ::QTextDocument *sipCpp;

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

            sipRes = new  ::QSizeF(sipCpp->size());

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_size, doc_QTextDocument_size);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_blockCount, "blockCount(self) -> int");

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

    {
        const  ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTextDocument, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->blockCount();

            return SIPLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_blockCount, doc_QTextDocument_blockCount);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_setDefaultStyleSheet, "setDefaultStyleSheet(self, str)");

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

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

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_setDefaultStyleSheet, doc_QTextDocument_setDefaultStyleSheet);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_defaultStyleSheet, "defaultStyleSheet(self) -> str");

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

    {
        const  ::QTextDocument *sipCpp;

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

            sipRes = new  ::QString(sipCpp->defaultStyleSheet());

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_defaultStyleSheet, doc_QTextDocument_defaultStyleSheet);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_maximumBlockCount, "maximumBlockCount(self) -> int");

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

    {
        const  ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTextDocument, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->maximumBlockCount();

            return SIPLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_maximumBlockCount, doc_QTextDocument_maximumBlockCount);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_setMaximumBlockCount, "setMaximumBlockCount(self, int)");

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

    {
        int a0;
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QTextDocument, &sipCpp, &a0))
        {
            sipCpp->setMaximumBlockCount(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_setMaximumBlockCount, doc_QTextDocument_setMaximumBlockCount);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_defaultTextOption, "defaultTextOption(self) -> QTextOption");

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

    {
        const  ::QTextDocument *sipCpp;

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

            sipRes = new  ::QTextOption(sipCpp->defaultTextOption());

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_defaultTextOption, doc_QTextDocument_defaultTextOption);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_setDefaultTextOption, "setDefaultTextOption(self, QTextOption)");

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

    {
        const  ::QTextOption* a0;
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QTextOption, &a0))
        {
            sipCpp->setDefaultTextOption(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_setDefaultTextOption, doc_QTextDocument_setDefaultTextOption);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_revision, "revision(self) -> int");

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

    {
        const  ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTextDocument, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->revision();

            return SIPLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_revision, doc_QTextDocument_revision);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_findBlockByNumber, "findBlockByNumber(self, int) -> QTextBlock");

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

    {
        int a0;
        const  ::QTextDocument *sipCpp;

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

            sipRes = new  ::QTextBlock(sipCpp->findBlockByNumber(a0));

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_findBlockByNumber, doc_QTextDocument_findBlockByNumber);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_findBlockByLineNumber, "findBlockByLineNumber(self, int) -> QTextBlock");

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

    {
        int a0;
        const  ::QTextDocument *sipCpp;

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

            sipRes = new  ::QTextBlock(sipCpp->findBlockByLineNumber(a0));

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_findBlockByLineNumber, doc_QTextDocument_findBlockByLineNumber);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_firstBlock, "firstBlock(self) -> QTextBlock");

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

    {
        const  ::QTextDocument *sipCpp;

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

            sipRes = new  ::QTextBlock(sipCpp->firstBlock());

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_firstBlock, doc_QTextDocument_firstBlock);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_lastBlock, "lastBlock(self) -> QTextBlock");

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

    {
        const  ::QTextDocument *sipCpp;

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

            sipRes = new  ::QTextBlock(sipCpp->lastBlock());

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_lastBlock, doc_QTextDocument_lastBlock);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_indentWidth, "indentWidth(self) -> float");

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

    {
        const  ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTextDocument, &sipCpp))
        {
             ::qreal sipRes;

            sipRes = sipCpp->indentWidth();

            return PyFloat_FromDouble(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_indentWidth, doc_QTextDocument_indentWidth);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_setIndentWidth, "setIndentWidth(self, float)");

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

    {
         ::qreal a0;
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bd", &sipSelf, sipType_QTextDocument, &sipCpp, &a0))
        {
            sipCpp->setIndentWidth(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_setIndentWidth, doc_QTextDocument_setIndentWidth);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_characterAt, "characterAt(self, int) -> str");

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

    {
        int a0;
        const  ::QTextDocument *sipCpp;

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

            sipRes = new  ::QChar(sipCpp->characterAt(a0));

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_characterAt, doc_QTextDocument_characterAt);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_documentMargin, "documentMargin(self) -> float");

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

    {
        const  ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTextDocument, &sipCpp))
        {
             ::qreal sipRes;

            sipRes = sipCpp->documentMargin();

            return PyFloat_FromDouble(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_documentMargin, doc_QTextDocument_documentMargin);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_setDocumentMargin, "setDocumentMargin(self, float)");

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

    {
         ::qreal a0;
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bd", &sipSelf, sipType_QTextDocument, &sipCpp, &a0))
        {
            sipCpp->setDocumentMargin(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_setDocumentMargin, doc_QTextDocument_setDocumentMargin);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_lineCount, "lineCount(self) -> int");

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

    {
        const  ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTextDocument, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->lineCount();

            return SIPLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_lineCount, doc_QTextDocument_lineCount);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_characterCount, "characterCount(self) -> int");

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

    {
        const  ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTextDocument, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->characterCount();

            return SIPLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_characterCount, doc_QTextDocument_characterCount);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_availableUndoSteps, "availableUndoSteps(self) -> int");

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

    {
        const  ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTextDocument, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->availableUndoSteps();

            return SIPLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_availableUndoSteps, doc_QTextDocument_availableUndoSteps);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_availableRedoSteps, "availableRedoSteps(self) -> int");

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

    {
        const  ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTextDocument, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->availableRedoSteps();

            return SIPLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_availableRedoSteps, doc_QTextDocument_availableRedoSteps);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_clearUndoRedoStacks, "clearUndoRedoStacks(self, stacks: QTextDocument.Stacks = QTextDocument.UndoAndRedoStacks)");

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

    {
         ::QTextDocument::Stacks a0 = QTextDocument::UndoAndRedoStacks;
         ::QTextDocument *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|E", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QTextDocument_Stacks, &a0))
        {
            sipCpp->clearUndoRedoStacks(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_clearUndoRedoStacks, doc_QTextDocument_clearUndoRedoStacks);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_defaultCursorMoveStyle, "defaultCursorMoveStyle(self) -> Qt.CursorMoveStyle");

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

    {
        const  ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTextDocument, &sipCpp))
        {
             ::Qt::CursorMoveStyle sipRes;

            sipRes = sipCpp->defaultCursorMoveStyle();

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_defaultCursorMoveStyle, doc_QTextDocument_defaultCursorMoveStyle);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_setDefaultCursorMoveStyle, "setDefaultCursorMoveStyle(self, Qt.CursorMoveStyle)");

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

    {
         ::Qt::CursorMoveStyle a0;
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_Qt_CursorMoveStyle, &a0))
        {
            sipCpp->setDefaultCursorMoveStyle(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_setDefaultCursorMoveStyle, doc_QTextDocument_setDefaultCursorMoveStyle);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_baseUrl, "baseUrl(self) -> QUrl");

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

    {
        const  ::QTextDocument *sipCpp;

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

            sipRes = new  ::QUrl(sipCpp->baseUrl());

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_baseUrl, doc_QTextDocument_baseUrl);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_setBaseUrl, "setBaseUrl(self, QUrl)");

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

    {
        const  ::QUrl* a0;
         ::QTextDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QUrl, &a0))
        {
            sipCpp->setBaseUrl(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_setBaseUrl, doc_QTextDocument_setBaseUrl);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_toRawText, "toRawText(self) -> str");

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

    {
        const  ::QTextDocument *sipCpp;

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

            sipRes = new  ::QString(sipCpp->toRawText());

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_toRawText, doc_QTextDocument_toRawText);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_toMarkdown, "toMarkdown(self, features: Union[QTextDocument.MarkdownFeatures, QTextDocument.MarkdownFeature] = QTextDocument.MarkdownDialectGitHub) -> str");

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

    {
         ::QTextDocument::MarkdownFeatures a0def = QTextDocument::MarkdownDialectGitHub;
         ::QTextDocument::MarkdownFeatures* a0 = &a0def;
        int a0State = 0;
        const  ::QTextDocument *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|J1", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QTextDocument_MarkdownFeatures, &a0, &a0State))
        {
             ::QString*sipRes;

            sipRes = new  ::QString(sipCpp->toMarkdown(*a0));
            sipReleaseType(a0,sipType_QTextDocument_MarkdownFeatures,a0State);

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

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_toMarkdown, doc_QTextDocument_toMarkdown);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextDocument_setMarkdown, "setMarkdown(self, str, features: Union[QTextDocument.MarkdownFeatures, QTextDocument.MarkdownFeature] = QTextDocument.MarkdownDialectGitHub)");

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

    {
        const  ::QString* a0;
        int a0State = 0;
         ::QTextDocument::MarkdownFeatures a1def = QTextDocument::MarkdownDialectGitHub;
         ::QTextDocument::MarkdownFeatures* a1 = &a1def;
        int a1State = 0;
         ::QTextDocument *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|J1", &sipSelf, sipType_QTextDocument, &sipCpp, sipType_QString,&a0, &a0State, sipType_QTextDocument_MarkdownFeatures, &a1, &a1State))
        {
            sipCpp->setMarkdown(*a0,*a1);
            sipReleaseType(const_cast< ::QString *>(a0),sipType_QString,a0State);
            sipReleaseType(a1,sipType_QTextDocument_MarkdownFeatures,a1State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextDocument, sipName_setMarkdown, doc_QTextDocument_setMarkdown);

    return SIP_NULLPTR;
}


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

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

    return sipCppV;
}


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

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


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


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

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


extern "C" {static void *init_type_QTextDocument(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QTextDocument(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **sipOwner, PyObject **sipParseErr)
{
    sipQTextDocument *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 sipQTextDocument(a0);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::QString* a0;
        int a0State = 0;
         ::QObject* a1 = 0;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J1|JH", sipType_QString,&a0, &a0State, sipType_QObject, &a1, sipOwner))
        {
            sipCpp = new sipQTextDocument(*a0,a1);
            sipReleaseType(const_cast< ::QString *>(a0),sipType_QString,a0State);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_QTextDocument[] = {
    {SIP_MLNAME_CAST(sipName_addResource), meth_QTextDocument_addResource, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_addResource)},
    {SIP_MLNAME_CAST(sipName_adjustSize), meth_QTextDocument_adjustSize, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_adjustSize)},
    {SIP_MLNAME_CAST(sipName_allFormats), meth_QTextDocument_allFormats, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_allFormats)},
    {SIP_MLNAME_CAST(sipName_availableRedoSteps), meth_QTextDocument_availableRedoSteps, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_availableRedoSteps)},
    {SIP_MLNAME_CAST(sipName_availableUndoSteps), meth_QTextDocument_availableUndoSteps, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_availableUndoSteps)},
    {SIP_MLNAME_CAST(sipName_baseUrl), meth_QTextDocument_baseUrl, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_baseUrl)},
    {SIP_MLNAME_CAST(sipName_begin), meth_QTextDocument_begin, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_begin)},
    {SIP_MLNAME_CAST(sipName_blockCount), meth_QTextDocument_blockCount, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_blockCount)},
    {SIP_MLNAME_CAST(sipName_characterAt), meth_QTextDocument_characterAt, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_characterAt)},
    {SIP_MLNAME_CAST(sipName_characterCount), meth_QTextDocument_characterCount, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_characterCount)},
    {SIP_MLNAME_CAST(sipName_clear), meth_QTextDocument_clear, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_clear)},
    {SIP_MLNAME_CAST(sipName_clearUndoRedoStacks), SIP_MLMETH_CAST(meth_QTextDocument_clearUndoRedoStacks), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_QTextDocument_clearUndoRedoStacks)},
    {SIP_MLNAME_CAST(sipName_clone), SIP_MLMETH_CAST(meth_QTextDocument_clone), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_QTextDocument_clone)},
    {SIP_MLNAME_CAST(sipName_createObject), meth_QTextDocument_createObject, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_createObject)},
    {SIP_MLNAME_CAST(sipName_defaultCursorMoveStyle), meth_QTextDocument_defaultCursorMoveStyle, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_defaultCursorMoveStyle)},
    {SIP_MLNAME_CAST(sipName_defaultFont), meth_QTextDocument_defaultFont, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_defaultFont)},
    {SIP_MLNAME_CAST(sipName_defaultStyleSheet), meth_QTextDocument_defaultStyleSheet, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_defaultStyleSheet)},
    {SIP_MLNAME_CAST(sipName_defaultTextOption), meth_QTextDocument_defaultTextOption, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_defaultTextOption)},
    {SIP_MLNAME_CAST(sipName_documentLayout), meth_QTextDocument_documentLayout, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_documentLayout)},
    {SIP_MLNAME_CAST(sipName_documentMargin), meth_QTextDocument_documentMargin, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_documentMargin)},
    {SIP_MLNAME_CAST(sipName_drawContents), SIP_MLMETH_CAST(meth_QTextDocument_drawContents), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_QTextDocument_drawContents)},
    {SIP_MLNAME_CAST(sipName_end), meth_QTextDocument_end, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_end)},
    {SIP_MLNAME_CAST(sipName_find), SIP_MLMETH_CAST(meth_QTextDocument_find), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_QTextDocument_find)},
    {SIP_MLNAME_CAST(sipName_findBlock), meth_QTextDocument_findBlock, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_findBlock)},
    {SIP_MLNAME_CAST(sipName_findBlockByLineNumber), meth_QTextDocument_findBlockByLineNumber, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_findBlockByLineNumber)},
    {SIP_MLNAME_CAST(sipName_findBlockByNumber), meth_QTextDocument_findBlockByNumber, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_findBlockByNumber)},
    {SIP_MLNAME_CAST(sipName_firstBlock), meth_QTextDocument_firstBlock, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_firstBlock)},
    {SIP_MLNAME_CAST(sipName_idealWidth), meth_QTextDocument_idealWidth, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_idealWidth)},
    {SIP_MLNAME_CAST(sipName_indentWidth), meth_QTextDocument_indentWidth, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_indentWidth)},
    {SIP_MLNAME_CAST(sipName_isEmpty), meth_QTextDocument_isEmpty, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_isEmpty)},
    {SIP_MLNAME_CAST(sipName_isModified), meth_QTextDocument_isModified, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_isModified)},
    {SIP_MLNAME_CAST(sipName_isRedoAvailable), meth_QTextDocument_isRedoAvailable, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_isRedoAvailable)},
    {SIP_MLNAME_CAST(sipName_isUndoAvailable), meth_QTextDocument_isUndoAvailable, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_isUndoAvailable)},
    {SIP_MLNAME_CAST(sipName_isUndoRedoEnabled), meth_QTextDocument_isUndoRedoEnabled, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_isUndoRedoEnabled)},
    {SIP_MLNAME_CAST(sipName_lastBlock), meth_QTextDocument_lastBlock, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_lastBlock)},
    {SIP_MLNAME_CAST(sipName_lineCount), meth_QTextDocument_lineCount, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_lineCount)},
    {SIP_MLNAME_CAST(sipName_loadResource), meth_QTextDocument_loadResource, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_loadResource)},
    {SIP_MLNAME_CAST(sipName_markContentsDirty), meth_QTextDocument_markContentsDirty, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_markContentsDirty)},
    {SIP_MLNAME_CAST(sipName_maximumBlockCount), meth_QTextDocument_maximumBlockCount, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_maximumBlockCount)},
    {SIP_MLNAME_CAST(sipName_metaInformation), meth_QTextDocument_metaInformation, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_metaInformation)},
    {SIP_MLNAME_CAST(sipName_object), meth_QTextDocument_object, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_object)},
    {SIP_MLNAME_CAST(sipName_objectForFormat), meth_QTextDocument_objectForFormat, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_objectForFormat)},
    {SIP_MLNAME_CAST(sipName_pageCount), meth_QTextDocument_pageCount, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_pageCount)},
    {SIP_MLNAME_CAST(sipName_pageSize), meth_QTextDocument_pageSize, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_pageSize)},
    {SIP_MLNAME_CAST(sipName_print), meth_QTextDocument_print, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_print)},
    {SIP_MLNAME_CAST(sipName_print_), meth_QTextDocument_print_, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_print_)},
    {SIP_MLNAME_CAST(sipName_redo), meth_QTextDocument_redo, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_redo)},
    {SIP_MLNAME_CAST(sipName_resource), meth_QTextDocument_resource, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_resource)},
    {SIP_MLNAME_CAST(sipName_revision), meth_QTextDocument_revision, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_revision)},
    {SIP_MLNAME_CAST(sipName_rootFrame), meth_QTextDocument_rootFrame, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_rootFrame)},
    {SIP_MLNAME_CAST(sipName_setBaseUrl), meth_QTextDocument_setBaseUrl, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_setBaseUrl)},
    {SIP_MLNAME_CAST(sipName_setDefaultCursorMoveStyle), meth_QTextDocument_setDefaultCursorMoveStyle, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_setDefaultCursorMoveStyle)},
    {SIP_MLNAME_CAST(sipName_setDefaultFont), meth_QTextDocument_setDefaultFont, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_setDefaultFont)},
    {SIP_MLNAME_CAST(sipName_setDefaultStyleSheet), meth_QTextDocument_setDefaultStyleSheet, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_setDefaultStyleSheet)},
    {SIP_MLNAME_CAST(sipName_setDefaultTextOption), meth_QTextDocument_setDefaultTextOption, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_setDefaultTextOption)},
    {SIP_MLNAME_CAST(sipName_setDocumentLayout), meth_QTextDocument_setDocumentLayout, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_setDocumentLayout)},
    {SIP_MLNAME_CAST(sipName_setDocumentMargin), meth_QTextDocument_setDocumentMargin, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_setDocumentMargin)},
    {SIP_MLNAME_CAST(sipName_setHtml), meth_QTextDocument_setHtml, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_setHtml)},
    {SIP_MLNAME_CAST(sipName_setIndentWidth), meth_QTextDocument_setIndentWidth, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_setIndentWidth)},
    {SIP_MLNAME_CAST(sipName_setMarkdown), SIP_MLMETH_CAST(meth_QTextDocument_setMarkdown), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_QTextDocument_setMarkdown)},
    {SIP_MLNAME_CAST(sipName_setMaximumBlockCount), meth_QTextDocument_setMaximumBlockCount, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_setMaximumBlockCount)},
    {SIP_MLNAME_CAST(sipName_setMetaInformation), meth_QTextDocument_setMetaInformation, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_setMetaInformation)},
    {SIP_MLNAME_CAST(sipName_setModified), SIP_MLMETH_CAST(meth_QTextDocument_setModified), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_QTextDocument_setModified)},
    {SIP_MLNAME_CAST(sipName_setPageSize), meth_QTextDocument_setPageSize, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_setPageSize)},
    {SIP_MLNAME_CAST(sipName_setPlainText), meth_QTextDocument_setPlainText, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_setPlainText)},
    {SIP_MLNAME_CAST(sipName_setTextWidth), meth_QTextDocument_setTextWidth, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_setTextWidth)},
    {SIP_MLNAME_CAST(sipName_setUndoRedoEnabled), meth_QTextDocument_setUndoRedoEnabled, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_setUndoRedoEnabled)},
    {SIP_MLNAME_CAST(sipName_setUseDesignMetrics), meth_QTextDocument_setUseDesignMetrics, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_setUseDesignMetrics)},
    {SIP_MLNAME_CAST(sipName_size), meth_QTextDocument_size, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_size)},
    {SIP_MLNAME_CAST(sipName_textWidth), meth_QTextDocument_textWidth, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_textWidth)},
    {SIP_MLNAME_CAST(sipName_toHtml), SIP_MLMETH_CAST(meth_QTextDocument_toHtml), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_QTextDocument_toHtml)},
    {SIP_MLNAME_CAST(sipName_toMarkdown), SIP_MLMETH_CAST(meth_QTextDocument_toMarkdown), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_QTextDocument_toMarkdown)},
    {SIP_MLNAME_CAST(sipName_toPlainText), meth_QTextDocument_toPlainText, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_toPlainText)},
    {SIP_MLNAME_CAST(sipName_toRawText), meth_QTextDocument_toRawText, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_toRawText)},
    {SIP_MLNAME_CAST(sipName_undo), meth_QTextDocument_undo, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_undo)},
    {SIP_MLNAME_CAST(sipName_useDesignMetrics), meth_QTextDocument_useDesignMetrics, METH_VARARGS, SIP_MLDOC_CAST(doc_QTextDocument_useDesignMetrics)}
};

static sipEnumMemberDef enummembers_QTextDocument[] = {
    {sipName_DocumentTitle, static_cast<int>( ::QTextDocument::DocumentTitle), 307},
    {sipName_DocumentUrl, static_cast<int>( ::QTextDocument::DocumentUrl), 307},
    {sipName_FindBackward, static_cast<int>( ::QTextDocument::FindBackward), 303},
    {sipName_FindCaseSensitively, static_cast<int>( ::QTextDocument::FindCaseSensitively), 303},
    {sipName_FindWholeWords, static_cast<int>( ::QTextDocument::FindWholeWords), 303},
    {sipName_HtmlResource, static_cast<int>( ::QTextDocument::HtmlResource), 308},
    {sipName_ImageResource, static_cast<int>( ::QTextDocument::ImageResource), 308},
    {sipName_MarkdownDialectCommonMark, static_cast<int>( ::QTextDocument::MarkdownDialectCommonMark), 305},
    {sipName_MarkdownDialectGitHub, static_cast<int>( ::QTextDocument::MarkdownDialectGitHub), 305},
    {sipName_MarkdownNoHTML, static_cast<int>( ::QTextDocument::MarkdownNoHTML), 305},
    {sipName_MarkdownResource, static_cast<int>( ::QTextDocument::MarkdownResource), 308},
    {sipName_RedoStack, static_cast<int>( ::QTextDocument::RedoStack), 309},
    {sipName_StyleSheetResource, static_cast<int>( ::QTextDocument::StyleSheetResource), 308},
    {sipName_UndoAndRedoStacks, static_cast<int>( ::QTextDocument::UndoAndRedoStacks), 309},
    {sipName_UndoStack, static_cast<int>( ::QTextDocument::UndoStack), 309},
    {sipName_UnknownResource, static_cast<int>( ::QTextDocument::UnknownResource), 308},
    {sipName_UserResource, static_cast<int>( ::QTextDocument::UserResource), 308},
};

PyDoc_STRVAR(doc_QTextDocument, "\1QTextDocument(parent: QObject = None)\n"
"QTextDocument(str, parent: QObject = None)");


/* Define this type's signals. */
static const pyqt5QtSignal signals_QTextDocument[] = {
    {"baseUrlChanged(QUrl)", "\1baseUrlChanged(self, QUrl)", SIP_NULLPTR, SIP_NULLPTR},
    {"documentLayoutChanged()", "\1documentLayoutChanged(self)", SIP_NULLPTR, SIP_NULLPTR},
    {"undoCommandAdded()", "\1undoCommandAdded(self)", SIP_NULLPTR, SIP_NULLPTR},
    {"undoAvailable(bool)", "\1undoAvailable(self, bool)", SIP_NULLPTR, SIP_NULLPTR},
    {"redoAvailable(bool)", "\1redoAvailable(self, bool)", SIP_NULLPTR, SIP_NULLPTR},
    {"modificationChanged(bool)", "\1modificationChanged(self, bool)", SIP_NULLPTR, SIP_NULLPTR},
    {"cursorPositionChanged(QTextCursor)", "\1cursorPositionChanged(self, QTextCursor)", SIP_NULLPTR, SIP_NULLPTR},
    {"contentsChanged()", "\1contentsChanged(self)", SIP_NULLPTR, SIP_NULLPTR},
    {"contentsChange(int,int,int)", "\1contentsChange(self, int, int, int)", SIP_NULLPTR, SIP_NULLPTR},
    {"blockCountChanged(int)", "\1blockCountChanged(self, int)", SIP_NULLPTR, SIP_NULLPTR},
    {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR}
};


static pyqt5ClassPluginDef plugin_QTextDocument = {
    & ::QTextDocument::staticMetaObject,
    0,
    signals_QTextDocument,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtGui_QTextDocument = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QTextDocument,
        {SIP_NULLPTR},
        &plugin_QTextDocument
    },
    {
        sipNameNr_QTextDocument,
        {0, 0, 1},
        76, methods_QTextDocument,
        17, enummembers_QTextDocument,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QTextDocument,
    -1,
    -1,
    supers_QTextDocument,
    SIP_NULLPTR,
    init_type_QTextDocument,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_QTextDocument,
    SIP_NULLPTR,
    array_QTextDocument,
    SIP_NULLPTR,
    release_QTextDocument,
    cast_QTextDocument,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
