/*
 * Module code.
 *
 * Generated by SIP 4.12.4 on Fri Dec 30 00:39:50 2011
 *
 * 
 *  This file is part of PyKDE4.
 * 
 *  PyKDE4 is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as
 *  published by the Free Software Foundation; either version 2.1 of
 *  the License, or (at your option) any later version.
 * 
 *  PyKDE4 is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http:www.gnu.org/licenses/>.
 * 
 */

#include "sipAPIktexteditor.h"

#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/templateinterface.sip"
#include <ktexteditor/templateinterface.h>
#line 29 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"

#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/cursor.sip"
#include <ktexteditor/cursor.h>
#line 33 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 36 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 36 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 33 "/usr/local/share/py-sip/QtCore/qmap.sip"
#include <qmap.h>
#line 39 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 77 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 42 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 35 "/usr/local/share/py-sip/QtGui/qwidget.sip"
#include <qwidget.h>
#line 45 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"


class sipKTextEditor_TemplateInterface : public KTextEditor::TemplateInterface
{
public:
    sipKTextEditor_TemplateInterface();
    virtual ~sipKTextEditor_TemplateInterface();

    /*
     * There is a public method for every protected method visible from
     * this class.
     */
    bool sipProtect_insertTemplateTextImplementation(const KTextEditor::Cursor&,const QString&,const QMap<QString,QString>&);

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    bool insertTemplateTextImplementation(const KTextEditor::Cursor&,const QString&,const QMap<QString,QString>&);

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[1];
};

sipKTextEditor_TemplateInterface::sipKTextEditor_TemplateInterface(): KTextEditor::TemplateInterface(), sipPySelf(0)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipKTextEditor_TemplateInterface::~sipKTextEditor_TemplateInterface()
{
    sipCommonDtor(sipPySelf);
}

bool sipKTextEditor_TemplateInterface::insertTemplateTextImplementation(const KTextEditor::Cursor& a0,const QString& a1,const QMap<QString,QString>& a2)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[0],sipPySelf,sipName_TemplateInterface,sipName_insertTemplateTextImplementation);

    if (!sipMeth)
        return 0;

    extern bool sipVH_ktexteditor_12(sip_gilstate_t,PyObject *,const KTextEditor::Cursor&,const QString&,const QMap<QString,QString>&);

    return sipVH_ktexteditor_12(sipGILState,sipMeth,a0,a1,a2);
}

bool sipKTextEditor_TemplateInterface::sipProtect_insertTemplateTextImplementation(const KTextEditor::Cursor& a0,const QString& a1,const QMap<QString,QString>& a2)
{
    return insertTemplateTextImplementation(a0,a1,a2);
}


extern "C" {static PyObject *meth_KTextEditor_TemplateInterface_expandMacros(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_TemplateInterface_expandMacros(PyObject *, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        QMap<QString,QString> * a0;
        int a0State = 0;
        QWidget * a1;

        if (sipParseArgs(&sipParseErr, sipArgs, "J1J8", sipType_QMap_0100QString_0100QString,&a0, &a0State, sipType_QWidget, &a1))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = KTextEditor::TemplateInterface::expandMacros(*a0,a1);
            Py_END_ALLOW_THREADS
            sipReleaseType(a0,sipType_QMap_0100QString_0100QString,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_TemplateInterface, sipName_expandMacros, NULL);

    return NULL;
}


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

    {
        const KTextEditor::Cursor * a0;
        const QString * a1;
        int a1State = 0;
        const QMap<QString,QString> * a2;
        int a2State = 0;
        KTextEditor::TemplateInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9J1J1", &sipSelf, sipType_KTextEditor_TemplateInterface, &sipCpp, sipType_KTextEditor_Cursor, &a0, sipType_QString,&a1, &a1State, sipType_QMap_0100QString_0100QString,&a2, &a2State))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->insertTemplateText(*a0,*a1,*a2);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a1),sipType_QString,a1State);
            sipReleaseType(const_cast<QMap<QString,QString> *>(a2),sipType_QMap_0100QString_0100QString,a2State);

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_TemplateInterface, sipName_insertTemplateText, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_TemplateInterface_insertTemplateTextImplementation(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_TemplateInterface_insertTemplateTextImplementation(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        const KTextEditor::Cursor * a0;
        const QString * a1;
        int a1State = 0;
        const QMap<QString,QString> * a2;
        int a2State = 0;
        sipKTextEditor_TemplateInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9J1J1", &sipSelf, sipType_KTextEditor_TemplateInterface, &sipCpp, sipType_KTextEditor_Cursor, &a0, sipType_QString,&a1, &a1State, sipType_QMap_0100QString_0100QString,&a2, &a2State))
        {
            bool sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_TemplateInterface, sipName_insertTemplateTextImplementation);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->sipProtect_insertTemplateTextImplementation(*a0,*a1,*a2);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a1),sipType_QString,a1State);
            sipReleaseType(const_cast<QMap<QString,QString> *>(a2),sipType_QMap_0100QString_0100QString,a2State);

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_TemplateInterface, sipName_insertTemplateTextImplementation, NULL);

    return NULL;
}


/* Cast a pointer to a type somewhere in its superclass hierarchy. */
extern "C" {static void *cast_KTextEditor_TemplateInterface(void *, const sipTypeDef *);}
static void *cast_KTextEditor_TemplateInterface(void *ptr, const sipTypeDef *targetType)
{
    if (targetType == sipType_KTextEditor_TemplateInterface)
        return ptr;

    return NULL;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipKTextEditor_TemplateInterface *>(sipCppV);
    else
        delete reinterpret_cast<KTextEditor::TemplateInterface *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void dealloc_KTextEditor_TemplateInterface(sipSimpleWrapper *);}
static void dealloc_KTextEditor_TemplateInterface(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerived(sipSelf))
        reinterpret_cast<sipKTextEditor_TemplateInterface *>(sipGetAddress(sipSelf))->sipPySelf = NULL;

    if (sipIsPyOwned(sipSelf))
    {
        release_KTextEditor_TemplateInterface(sipGetAddress(sipSelf),sipSelf->flags);
    }
}


extern "C" {static void *init_KTextEditor_TemplateInterface(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_KTextEditor_TemplateInterface(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    sipKTextEditor_TemplateInterface *sipCpp = 0;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, ""))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipKTextEditor_TemplateInterface();
            Py_END_ALLOW_THREADS

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return NULL;
}


static PyMethodDef methods_KTextEditor_TemplateInterface[] = {
    {SIP_MLNAME_CAST(sipName_expandMacros), meth_KTextEditor_TemplateInterface_expandMacros, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_insertTemplateText), meth_KTextEditor_TemplateInterface_insertTemplateText, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_insertTemplateTextImplementation), meth_KTextEditor_TemplateInterface_insertTemplateTextImplementation, METH_VARARGS, NULL}
};


pyqt4ClassTypeDef sipTypeDef_ktexteditor_KTextEditor_TemplateInterface = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_ABSTRACT|SIP_TYPE_CLASS,
        sipNameNr_KTextEditor__TemplateInterface,
        {0}
    },
    {
        sipNameNr_TemplateInterface,
        {1, 255, 0},
        3, methods_KTextEditor_TemplateInterface,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    sipNameNr_PyQt4_QtCore_pyqtWrapperType,
    -1,
    0,
    0,
    init_KTextEditor_TemplateInterface,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KTextEditor_TemplateInterface,
    0,
    0,
    0,
    release_KTextEditor_TemplateInterface,
    cast_KTextEditor_TemplateInterface,
    0,
    0,
    0
},
    0,
    0,
    0
};

#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/smartrange.sip"
#include <ktexteditor/smartrange.h>
#line 333 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"

#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/smartrange.sip"
#include <ktexteditor/smartrange.h>
#line 337 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"


extern "C" {static int slot_KTextEditor_SmartRange_InsertBehaviors___bool__(PyObject *);}
static int slot_KTextEditor_SmartRange_InsertBehaviors___bool__(PyObject *sipSelf)
{
    KTextEditor::SmartRange::InsertBehaviors *sipCpp = reinterpret_cast<KTextEditor::SmartRange::InsertBehaviors *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KTextEditor_SmartRange_InsertBehaviors));

    if (!sipCpp)
        return -1;


    {
        {
            int sipRes = 0;

#line 331 "/usr/local/share/py-sip/QtCore/qglobal.sip"
        sipRes = (sipCpp->operator int() != 0);
#line 355 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"

            return sipRes;
        }
    }

    return 0;
}


extern "C" {static PyObject *slot_KTextEditor_SmartRange_InsertBehaviors___ne__(PyObject *,PyObject *);}
static PyObject *slot_KTextEditor_SmartRange_InsertBehaviors___ne__(PyObject *sipSelf,PyObject *sipArg)
{
    KTextEditor::SmartRange::InsertBehaviors *sipCpp = reinterpret_cast<KTextEditor::SmartRange::InsertBehaviors *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KTextEditor_SmartRange_InsertBehaviors));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        const KTextEditor::SmartRange::InsertBehaviors * a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_KTextEditor_SmartRange_InsertBehaviors, &a0, &a0State))
        {
            bool sipRes = 0;

#line 326 "/usr/local/share/py-sip/QtCore/qglobal.sip"
        sipRes = (sipCpp->operator int() != a0->operator int());
#line 385 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
            sipReleaseType(const_cast<KTextEditor::SmartRange::InsertBehaviors *>(a0),sipType_KTextEditor_SmartRange_InsertBehaviors,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_ktexteditor,ne_slot,sipType_KTextEditor_SmartRange_InsertBehaviors,sipSelf,sipArg);
}


extern "C" {static PyObject *slot_KTextEditor_SmartRange_InsertBehaviors___eq__(PyObject *,PyObject *);}
static PyObject *slot_KTextEditor_SmartRange_InsertBehaviors___eq__(PyObject *sipSelf,PyObject *sipArg)
{
    KTextEditor::SmartRange::InsertBehaviors *sipCpp = reinterpret_cast<KTextEditor::SmartRange::InsertBehaviors *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KTextEditor_SmartRange_InsertBehaviors));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        const KTextEditor::SmartRange::InsertBehaviors * a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_KTextEditor_SmartRange_InsertBehaviors, &a0, &a0State))
        {
            bool sipRes = 0;

#line 321 "/usr/local/share/py-sip/QtCore/qglobal.sip"
        sipRes = (sipCpp->operator int() == a0->operator int());
#line 421 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
            sipReleaseType(const_cast<KTextEditor::SmartRange::InsertBehaviors *>(a0),sipType_KTextEditor_SmartRange_InsertBehaviors,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_ktexteditor,eq_slot,sipType_KTextEditor_SmartRange_InsertBehaviors,sipSelf,sipArg);
}


extern "C" {static PyObject *slot_KTextEditor_SmartRange_InsertBehaviors___invert__(PyObject *);}
static PyObject *slot_KTextEditor_SmartRange_InsertBehaviors___invert__(PyObject *sipSelf)
{
    KTextEditor::SmartRange::InsertBehaviors *sipCpp = reinterpret_cast<KTextEditor::SmartRange::InsertBehaviors *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KTextEditor_SmartRange_InsertBehaviors));

    if (!sipCpp)
        return 0;


    {
        {
            KTextEditor::SmartRange::InsertBehaviors *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new KTextEditor::SmartRange::InsertBehaviors(~(*sipCpp));
            Py_END_ALLOW_THREADS

            return sipConvertFromNewType(sipRes,sipType_KTextEditor_SmartRange_InsertBehaviors,NULL);
        }
    }

    return 0;
}


extern "C" {static PyObject *slot_KTextEditor_SmartRange_InsertBehaviors___and__(PyObject *,PyObject *);}
static PyObject *slot_KTextEditor_SmartRange_InsertBehaviors___and__(PyObject *sipArg0,PyObject *sipArg1)
{
    PyObject *sipParseErr = NULL;

    {
        KTextEditor::SmartRange::InsertBehaviors * a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_KTextEditor_SmartRange_InsertBehaviors, &a0, &a0State, &a1))
        {
            KTextEditor::SmartRange::InsertBehaviors *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new KTextEditor::SmartRange::InsertBehaviors((*a0 & a1));
            Py_END_ALLOW_THREADS
            sipReleaseType(a0,sipType_KTextEditor_SmartRange_InsertBehaviors,a0State);

            return sipConvertFromNewType(sipRes,sipType_KTextEditor_SmartRange_InsertBehaviors,NULL);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_ktexteditor,and_slot,NULL,sipArg0,sipArg1);
}


extern "C" {static PyObject *slot_KTextEditor_SmartRange_InsertBehaviors___xor__(PyObject *,PyObject *);}
static PyObject *slot_KTextEditor_SmartRange_InsertBehaviors___xor__(PyObject *sipArg0,PyObject *sipArg1)
{
    PyObject *sipParseErr = NULL;

    {
        KTextEditor::SmartRange::InsertBehaviors * a0;
        int a0State = 0;
        KTextEditor::SmartRange::InsertBehaviors * a1;
        int a1State = 0;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1J1", sipType_KTextEditor_SmartRange_InsertBehaviors, &a0, &a0State, sipType_KTextEditor_SmartRange_InsertBehaviors, &a1, &a1State))
        {
            KTextEditor::SmartRange::InsertBehaviors *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new KTextEditor::SmartRange::InsertBehaviors((*a0 ^ *a1));
            Py_END_ALLOW_THREADS
            sipReleaseType(a0,sipType_KTextEditor_SmartRange_InsertBehaviors,a0State);
            sipReleaseType(a1,sipType_KTextEditor_SmartRange_InsertBehaviors,a1State);

            return sipConvertFromNewType(sipRes,sipType_KTextEditor_SmartRange_InsertBehaviors,NULL);
        }
    }

    {
        KTextEditor::SmartRange::InsertBehaviors * a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_KTextEditor_SmartRange_InsertBehaviors, &a0, &a0State, &a1))
        {
            KTextEditor::SmartRange::InsertBehaviors *sipRes = 0;

#line 315 "/usr/local/share/py-sip/QtCore/qglobal.sip"
        sipRes = new KTextEditor::SmartRange::InsertBehaviors(*a0 ^ a1);
#line 530 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
            sipReleaseType(a0,sipType_KTextEditor_SmartRange_InsertBehaviors,a0State);

            return sipConvertFromNewType(sipRes,sipType_KTextEditor_SmartRange_InsertBehaviors,NULL);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_ktexteditor,xor_slot,NULL,sipArg0,sipArg1);
}


extern "C" {static PyObject *slot_KTextEditor_SmartRange_InsertBehaviors___or__(PyObject *,PyObject *);}
static PyObject *slot_KTextEditor_SmartRange_InsertBehaviors___or__(PyObject *sipArg0,PyObject *sipArg1)
{
    PyObject *sipParseErr = NULL;

    {
        KTextEditor::SmartRange::InsertBehaviors * a0;
        int a0State = 0;
        KTextEditor::SmartRange::InsertBehaviors * a1;
        int a1State = 0;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1J1", sipType_KTextEditor_SmartRange_InsertBehaviors, &a0, &a0State, sipType_KTextEditor_SmartRange_InsertBehaviors, &a1, &a1State))
        {
            KTextEditor::SmartRange::InsertBehaviors *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new KTextEditor::SmartRange::InsertBehaviors((*a0 | *a1));
            Py_END_ALLOW_THREADS
            sipReleaseType(a0,sipType_KTextEditor_SmartRange_InsertBehaviors,a0State);
            sipReleaseType(a1,sipType_KTextEditor_SmartRange_InsertBehaviors,a1State);

            return sipConvertFromNewType(sipRes,sipType_KTextEditor_SmartRange_InsertBehaviors,NULL);
        }
    }

    {
        KTextEditor::SmartRange::InsertBehaviors * a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_KTextEditor_SmartRange_InsertBehaviors, &a0, &a0State, &a1))
        {
            KTextEditor::SmartRange::InsertBehaviors *sipRes = 0;

#line 310 "/usr/local/share/py-sip/QtCore/qglobal.sip"
        sipRes = new KTextEditor::SmartRange::InsertBehaviors(*a0 | a1);
#line 582 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
            sipReleaseType(a0,sipType_KTextEditor_SmartRange_InsertBehaviors,a0State);

            return sipConvertFromNewType(sipRes,sipType_KTextEditor_SmartRange_InsertBehaviors,NULL);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_ktexteditor,or_slot,NULL,sipArg0,sipArg1);
}


extern "C" {static PyObject *slot_KTextEditor_SmartRange_InsertBehaviors___int__(PyObject *);}
static PyObject *slot_KTextEditor_SmartRange_InsertBehaviors___int__(PyObject *sipSelf)
{
    KTextEditor::SmartRange::InsertBehaviors *sipCpp = reinterpret_cast<KTextEditor::SmartRange::InsertBehaviors *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KTextEditor_SmartRange_InsertBehaviors));

    if (!sipCpp)
        return 0;


    {
        {
            int sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = *sipCpp;
            Py_END_ALLOW_THREADS

            return SIPLong_FromLong(sipRes);
        }
    }

    return 0;
}


extern "C" {static PyObject *slot_KTextEditor_SmartRange_InsertBehaviors___ixor__(PyObject *,PyObject *);}
static PyObject *slot_KTextEditor_SmartRange_InsertBehaviors___ixor__(PyObject *sipSelf,PyObject *sipArg)
{
    if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_KTextEditor_SmartRange_InsertBehaviors)))
    {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
    }

    KTextEditor::SmartRange::InsertBehaviors *sipCpp = reinterpret_cast<KTextEditor::SmartRange::InsertBehaviors *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KTextEditor_SmartRange_InsertBehaviors));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        KTextEditor::SmartRange::InsertBehaviors * a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_KTextEditor_SmartRange_InsertBehaviors, &a0, &a0State))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->KTextEditor::SmartRange::InsertBehaviors::operator^=(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(a0,sipType_KTextEditor_SmartRange_InsertBehaviors,a0State);

            Py_INCREF(sipSelf);
            return sipSelf;
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    PyErr_Clear();

    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
}


extern "C" {static PyObject *slot_KTextEditor_SmartRange_InsertBehaviors___ior__(PyObject *,PyObject *);}
static PyObject *slot_KTextEditor_SmartRange_InsertBehaviors___ior__(PyObject *sipSelf,PyObject *sipArg)
{
    if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_KTextEditor_SmartRange_InsertBehaviors)))
    {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
    }

    KTextEditor::SmartRange::InsertBehaviors *sipCpp = reinterpret_cast<KTextEditor::SmartRange::InsertBehaviors *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KTextEditor_SmartRange_InsertBehaviors));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        KTextEditor::SmartRange::InsertBehaviors * a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_KTextEditor_SmartRange_InsertBehaviors, &a0, &a0State))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->KTextEditor::SmartRange::InsertBehaviors::operator|=(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(a0,sipType_KTextEditor_SmartRange_InsertBehaviors,a0State);

            Py_INCREF(sipSelf);
            return sipSelf;
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    PyErr_Clear();

    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
}


extern "C" {static PyObject *slot_KTextEditor_SmartRange_InsertBehaviors___iand__(PyObject *,PyObject *);}
static PyObject *slot_KTextEditor_SmartRange_InsertBehaviors___iand__(PyObject *sipSelf,PyObject *sipArg)
{
    if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_KTextEditor_SmartRange_InsertBehaviors)))
    {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
    }

    KTextEditor::SmartRange::InsertBehaviors *sipCpp = reinterpret_cast<KTextEditor::SmartRange::InsertBehaviors *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KTextEditor_SmartRange_InsertBehaviors));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->KTextEditor::SmartRange::InsertBehaviors::operator&=(a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(sipSelf);
            return sipSelf;
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    PyErr_Clear();

    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
}


/* Cast a pointer to a type somewhere in its superclass hierarchy. */
extern "C" {static void *cast_KTextEditor_SmartRange_InsertBehaviors(void *, const sipTypeDef *);}
static void *cast_KTextEditor_SmartRange_InsertBehaviors(void *ptr, const sipTypeDef *targetType)
{
    if (targetType == sipType_KTextEditor_SmartRange_InsertBehaviors)
        return ptr;

    return NULL;
}


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

    delete reinterpret_cast<KTextEditor::SmartRange::InsertBehaviors *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void assign_KTextEditor_SmartRange_InsertBehaviors(void *, SIP_SSIZE_T, const void *);}
static void assign_KTextEditor_SmartRange_InsertBehaviors(void *sipDst, SIP_SSIZE_T sipDstIdx, const void *sipSrc)
{
    reinterpret_cast<KTextEditor::SmartRange::InsertBehaviors *>(sipDst)[sipDstIdx] = *reinterpret_cast<const KTextEditor::SmartRange::InsertBehaviors *>(sipSrc);
}


extern "C" {static void *array_KTextEditor_SmartRange_InsertBehaviors(SIP_SSIZE_T);}
static void *array_KTextEditor_SmartRange_InsertBehaviors(SIP_SSIZE_T sipNrElem)
{
    return new KTextEditor::SmartRange::InsertBehaviors[sipNrElem];
}


extern "C" {static void *copy_KTextEditor_SmartRange_InsertBehaviors(const void *, SIP_SSIZE_T);}
static void *copy_KTextEditor_SmartRange_InsertBehaviors(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new KTextEditor::SmartRange::InsertBehaviors(reinterpret_cast<const KTextEditor::SmartRange::InsertBehaviors *>(sipSrc)[sipSrcIdx]);
}


extern "C" {static void dealloc_KTextEditor_SmartRange_InsertBehaviors(sipSimpleWrapper *);}
static void dealloc_KTextEditor_SmartRange_InsertBehaviors(sipSimpleWrapper *sipSelf)
{
    if (sipIsPyOwned(sipSelf))
    {
        release_KTextEditor_SmartRange_InsertBehaviors(sipGetAddress(sipSelf),0);
    }
}


extern "C" {static void *init_KTextEditor_SmartRange_InsertBehaviors(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_KTextEditor_SmartRange_InsertBehaviors(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    KTextEditor::SmartRange::InsertBehaviors *sipCpp = 0;

    {
        const KTextEditor::SmartRange::InsertBehaviors * a0;
        int a0State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J1", sipType_KTextEditor_SmartRange_InsertBehaviors, &a0, &a0State))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new KTextEditor::SmartRange::InsertBehaviors(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<KTextEditor::SmartRange::InsertBehaviors *>(a0),sipType_KTextEditor_SmartRange_InsertBehaviors,a0State);

            return sipCpp;
        }
    }

    {
        int a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "i", &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new KTextEditor::SmartRange::InsertBehaviors(a0);
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, ""))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new KTextEditor::SmartRange::InsertBehaviors();
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    return NULL;
}


extern "C" {static int convertTo_KTextEditor_SmartRange_InsertBehaviors(PyObject *, void **, int *, PyObject *);}
static int convertTo_KTextEditor_SmartRange_InsertBehaviors(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
    KTextEditor::SmartRange::InsertBehaviors **sipCppPtr = reinterpret_cast<KTextEditor::SmartRange::InsertBehaviors **>(sipCppPtrV);

#line 336 "/usr/local/share/py-sip/QtCore/qglobal.sip"
// Allow an instance of the base enum whenever a KTextEditor::SmartRange::InsertBehaviors is expected.

if (sipIsErr == NULL)
    return (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_KTextEditor_SmartRange_InsertBehavior)) ||
            sipCanConvertToType(sipPy, sipType_KTextEditor_SmartRange_InsertBehaviors, SIP_NO_CONVERTORS));

if (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_KTextEditor_SmartRange_InsertBehavior)))
{
    *sipCppPtr = new KTextEditor::SmartRange::InsertBehaviors(SIPLong_AsLong(sipPy));

    return sipGetState(sipTransferObj);
}

*sipCppPtr = reinterpret_cast<KTextEditor::SmartRange::InsertBehaviors *>(sipConvertToType(sipPy, sipType_KTextEditor_SmartRange_InsertBehaviors, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr));

return 0;
#line 877 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
}


/* Define this type's Python slots. */
static sipPySlotDef slots_KTextEditor_SmartRange_InsertBehaviors[] = {
    {(void *)slot_KTextEditor_SmartRange_InsertBehaviors___bool__, bool_slot},
    {(void *)slot_KTextEditor_SmartRange_InsertBehaviors___ne__, ne_slot},
    {(void *)slot_KTextEditor_SmartRange_InsertBehaviors___eq__, eq_slot},
    {(void *)slot_KTextEditor_SmartRange_InsertBehaviors___invert__, invert_slot},
    {(void *)slot_KTextEditor_SmartRange_InsertBehaviors___and__, and_slot},
    {(void *)slot_KTextEditor_SmartRange_InsertBehaviors___xor__, xor_slot},
    {(void *)slot_KTextEditor_SmartRange_InsertBehaviors___or__, or_slot},
    {(void *)slot_KTextEditor_SmartRange_InsertBehaviors___int__, int_slot},
    {(void *)slot_KTextEditor_SmartRange_InsertBehaviors___ixor__, ixor_slot},
    {(void *)slot_KTextEditor_SmartRange_InsertBehaviors___ior__, ior_slot},
    {(void *)slot_KTextEditor_SmartRange_InsertBehaviors___iand__, iand_slot},
    {0, (sipPySlotType)0}
};


pyqt4ClassTypeDef sipTypeDef_ktexteditor_KTextEditor_SmartRange_InsertBehaviors = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_CLASS,
        sipNameNr_KTextEditor__SmartRange__InsertBehaviors,
        {0}
    },
    {
        sipNameNr_InsertBehaviors,
        {46, 255, 0},
        0, 0,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    sipNameNr_PyQt4_QtCore_pyqtWrapperType,
    -1,
    0,
    slots_KTextEditor_SmartRange_InsertBehaviors,
    init_KTextEditor_SmartRange_InsertBehaviors,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KTextEditor_SmartRange_InsertBehaviors,
    assign_KTextEditor_SmartRange_InsertBehaviors,
    array_KTextEditor_SmartRange_InsertBehaviors,
    copy_KTextEditor_SmartRange_InsertBehaviors,
    release_KTextEditor_SmartRange_InsertBehaviors,
    cast_KTextEditor_SmartRange_InsertBehaviors,
    convertTo_KTextEditor_SmartRange_InsertBehaviors,
    0,
    0
},
    0,
    1,
    0
};

#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/smartrange.sip"
#include <ktexteditor/smartrange.h>
#line 950 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"

#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/smartcursor.sip"
#include <ktexteditor/smartcursor.h>
#line 954 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/smartrange.sip"
#include <ktexteditor/smartrange.h>
#line 957 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/rangefeedback.sip"
#include <ktexteditor/rangefeedback.h>
#line 960 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/cursor.sip"
#include <ktexteditor/cursor.h>
#line 963 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/range.sip"
#include <ktexteditor/range.h>
#line 966 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 60 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/rangefeedback.sip"
#include <ktexteditor/rangefeedback.h>
#line 969 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 120 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 972 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 120 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 975 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 120 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 978 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kdeui/kaction.sip"
#include <kaction.h>
#line 981 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 340 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kdecore/typedefs.sip"
#include <ksharedptr.h>
#line 984 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/attribute.sip"
#include <ktexteditor/attribute.h>
#line 987 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 656 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kdecore/typedefs.sip"
#include <qstack.h>
#line 990 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 120 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 993 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 36 "/usr/local/share/py-sip/QtCore/qstringlist.sip"
#include <qstringlist.h>
#line 996 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/document.sip"
#include <ktexteditor/document.h>

#include <ktexteditor/modificationinterface.h>
#include <ktexteditor/markinterface.h>
#include <ktexteditor/searchinterface.h>
#include <ktexteditor/sessionconfiginterface.h>
#include <ktexteditor/smartinterface.h>
#include <ktexteditor/templateinterface.h>
#include <ktexteditor/variableinterface.h>
#line 1007 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"


class sipKTextEditor_SmartRange : public KTextEditor::SmartRange
{
public:
    sipKTextEditor_SmartRange(KTextEditor::SmartCursor *,KTextEditor::SmartCursor *,KTextEditor::SmartRange *,KTextEditor::SmartRange::InsertBehaviors);
    virtual ~sipKTextEditor_SmartRange();

    /*
     * There is a public method for every protected method visible from
     * this class.
     */
    void sipProtectVirt_rangeChanged(bool,KTextEditor::Cursor *,const KTextEditor::Range&);
    void sipProtectVirt_checkFeedback(bool);
    KTextEditor::SmartRangeNotifier * sipProtect_createNotifier();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    bool isSmartRange() const;
    KTextEditor::SmartRange * toSmartRange() const;
    void setRange(const KTextEditor::Range&);
    bool confineToRange(const KTextEditor::Range&);
    bool expandToRange(const KTextEditor::Range&);
    QStringList text(bool) const;
    bool replaceText(const QStringList&,bool);
    bool removeText(bool);
    void setParentRange(KTextEditor::SmartRange *);
    void rangeChanged(KTextEditor::Cursor *,const KTextEditor::Range&);
    void checkFeedback();
    KTextEditor::SmartRangeNotifier * createNotifier();
    bool isValid() const;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[13];
};

sipKTextEditor_SmartRange::sipKTextEditor_SmartRange(KTextEditor::SmartCursor *a0,KTextEditor::SmartCursor *a1,KTextEditor::SmartRange *a2,KTextEditor::SmartRange::InsertBehaviors a3): KTextEditor::SmartRange(a0,a1,a2,a3), sipPySelf(0)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipKTextEditor_SmartRange::~sipKTextEditor_SmartRange()
{
    sipCommonDtor(sipPySelf);
}

bool sipKTextEditor_SmartRange::isSmartRange() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[0]),sipPySelf,NULL,sipName_isSmartRange);

    if (!sipMeth)
        return KTextEditor::SmartRange::isSmartRange();

    typedef bool (*sipVH_QtCore_7)(sip_gilstate_t,PyObject *);

    return ((sipVH_QtCore_7)(sipModuleAPI_ktexteditor_QtCore->em_virthandlers[7]))(sipGILState,sipMeth);
}

KTextEditor::SmartRange * sipKTextEditor_SmartRange::toSmartRange() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[1]),sipPySelf,NULL,sipName_toSmartRange);

    if (!sipMeth)
        return KTextEditor::SmartRange::toSmartRange();

    extern KTextEditor::SmartRange * sipVH_ktexteditor_19(sip_gilstate_t,PyObject *);

    return sipVH_ktexteditor_19(sipGILState,sipMeth);
}

void sipKTextEditor_SmartRange::setRange(const KTextEditor::Range& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[2],sipPySelf,NULL,sipName_setRange);

    if (!sipMeth)
    {
        KTextEditor::SmartRange::setRange(a0);
        return;
    }

    extern void sipVH_ktexteditor_18(sip_gilstate_t,PyObject *,const KTextEditor::Range&);

    sipVH_ktexteditor_18(sipGILState,sipMeth,a0);
}

bool sipKTextEditor_SmartRange::confineToRange(const KTextEditor::Range& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[3],sipPySelf,NULL,sipName_confineToRange);

    if (!sipMeth)
        return KTextEditor::SmartRange::confineToRange(a0);

    extern bool sipVH_ktexteditor_2(sip_gilstate_t,PyObject *,const KTextEditor::Range&);

    return sipVH_ktexteditor_2(sipGILState,sipMeth,a0);
}

bool sipKTextEditor_SmartRange::expandToRange(const KTextEditor::Range& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[4],sipPySelf,NULL,sipName_expandToRange);

    if (!sipMeth)
        return KTextEditor::SmartRange::expandToRange(a0);

    extern bool sipVH_ktexteditor_2(sip_gilstate_t,PyObject *,const KTextEditor::Range&);

    return sipVH_ktexteditor_2(sipGILState,sipMeth,a0);
}

QStringList sipKTextEditor_SmartRange::text(bool a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[5]),sipPySelf,NULL,sipName_text);

    if (!sipMeth)
        return KTextEditor::SmartRange::text(a0);

    extern QStringList sipVH_ktexteditor_17(sip_gilstate_t,PyObject *,bool);

    return sipVH_ktexteditor_17(sipGILState,sipMeth,a0);
}

bool sipKTextEditor_SmartRange::replaceText(const QStringList& a0,bool a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[6],sipPySelf,NULL,sipName_replaceText);

    if (!sipMeth)
        return KTextEditor::SmartRange::replaceText(a0,a1);

    extern bool sipVH_ktexteditor_16(sip_gilstate_t,PyObject *,const QStringList&,bool);

    return sipVH_ktexteditor_16(sipGILState,sipMeth,a0,a1);
}

bool sipKTextEditor_SmartRange::removeText(bool a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[7],sipPySelf,NULL,sipName_removeText);

    if (!sipMeth)
        return KTextEditor::SmartRange::removeText(a0);

    typedef bool (*sipVH_QtGui_11)(sip_gilstate_t,PyObject *,bool);

    return ((sipVH_QtGui_11)(sipModuleAPI_ktexteditor_QtGui->em_virthandlers[11]))(sipGILState,sipMeth,a0);
}

void sipKTextEditor_SmartRange::setParentRange(KTextEditor::SmartRange *a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[8],sipPySelf,NULL,sipName_setParentRange);

    if (!sipMeth)
    {
        KTextEditor::SmartRange::setParentRange(a0);
        return;
    }

    extern void sipVH_ktexteditor_15(sip_gilstate_t,PyObject *,KTextEditor::SmartRange *);

    sipVH_ktexteditor_15(sipGILState,sipMeth,a0);
}

void sipKTextEditor_SmartRange::rangeChanged(KTextEditor::Cursor *a0,const KTextEditor::Range& a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[9],sipPySelf,NULL,sipName_rangeChanged);

    if (!sipMeth)
    {
        KTextEditor::SmartRange::rangeChanged(a0,a1);
        return;
    }

    extern void sipVH_ktexteditor_14(sip_gilstate_t,PyObject *,KTextEditor::Cursor *,const KTextEditor::Range&);

    sipVH_ktexteditor_14(sipGILState,sipMeth,a0,a1);
}

void sipKTextEditor_SmartRange::checkFeedback()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[10],sipPySelf,NULL,sipName_checkFeedback);

    if (!sipMeth)
    {
        KTextEditor::SmartRange::checkFeedback();
        return;
    }

    typedef void (*sipVH_QtCore_11)(sip_gilstate_t,PyObject *);

    ((sipVH_QtCore_11)(sipModuleAPI_ktexteditor_QtCore->em_virthandlers[11]))(sipGILState,sipMeth);
}

KTextEditor::SmartRangeNotifier * sipKTextEditor_SmartRange::createNotifier()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[11],sipPySelf,sipName_SmartRange,sipName_createNotifier);

    if (!sipMeth)
        return 0;

    extern KTextEditor::SmartRangeNotifier * sipVH_ktexteditor_13(sip_gilstate_t,PyObject *);

    return sipVH_ktexteditor_13(sipGILState,sipMeth);
}

bool sipKTextEditor_SmartRange::isValid() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[12]),sipPySelf,NULL,sipName_isValid);

    if (!sipMeth)
        return KTextEditor::Range::isValid();

    typedef bool (*sipVH_QtCore_7)(sip_gilstate_t,PyObject *);

    return ((sipVH_QtCore_7)(sipModuleAPI_ktexteditor_QtCore->em_virthandlers[7]))(sipGILState,sipMeth);
}

void sipKTextEditor_SmartRange::sipProtectVirt_rangeChanged(bool sipSelfWasArg,KTextEditor::Cursor *a0,const KTextEditor::Range& a1)
{
    (sipSelfWasArg ? KTextEditor::SmartRange::rangeChanged(a0,a1) : rangeChanged(a0,a1));
}

void sipKTextEditor_SmartRange::sipProtectVirt_checkFeedback(bool sipSelfWasArg)
{
    (sipSelfWasArg ? KTextEditor::SmartRange::checkFeedback() : checkFeedback());
}

KTextEditor::SmartRangeNotifier * sipKTextEditor_SmartRange::sipProtect_createNotifier()
{
    return createNotifier();
}


extern "C" {static PyObject *meth_KTextEditor_SmartRange_isSmartRange(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartRange_isSmartRange(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        KTextEditor::SmartRange *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->KTextEditor::SmartRange::isSmartRange() : sipCpp->isSmartRange());
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_isSmartRange, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartRange_toSmartRange(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartRange_toSmartRange(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp))
        {
            KTextEditor::SmartRange *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->KTextEditor::SmartRange::toSmartRange() : sipCpp->toSmartRange());
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartRange,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_toSmartRange, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartRange_setRange(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartRange_setRange(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        const KTextEditor::Range * a0;
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, sipType_KTextEditor_Range, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp->KTextEditor::SmartRange::setRange(*a0) : sipCpp->setRange(*a0));
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_setRange, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp))
        {
            KTextEditor::SmartCursor *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = &sipCpp->smartStart();
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartCursor,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_smartStart, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp))
        {
            KTextEditor::SmartCursor *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = &sipCpp->smartEnd();
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartCursor,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_smartEnd, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartRange_confineToRange(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartRange_confineToRange(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        const KTextEditor::Range * a0;
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, sipType_KTextEditor_Range, &a0))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->KTextEditor::SmartRange::confineToRange(*a0) : sipCpp->confineToRange(*a0));
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_confineToRange, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartRange_expandToRange(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartRange_expandToRange(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        const KTextEditor::Range * a0;
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, sipType_KTextEditor_Range, &a0))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->KTextEditor::SmartRange::expandToRange(*a0) : sipCpp->expandToRange(*a0));
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_expandToRange, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp))
        {
            KTextEditor::Document *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->document();
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_KTextEditor_Document,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_document, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartRange_text(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartRange_text(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        bool a0 = 0;
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B|b", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, &a0))
        {
            QStringList *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QStringList((sipSelfWasArg ? sipCpp->KTextEditor::SmartRange::text(a0) : sipCpp->text(a0)));
            Py_END_ALLOW_THREADS

            return sipConvertFromNewType(sipRes,sipType_QStringList,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_text, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartRange_replaceText(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartRange_replaceText(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        const QStringList * a0;
        int a0State = 0;
        bool a1 = 0;
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1|b", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, sipType_QStringList,&a0, &a0State, &a1))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->KTextEditor::SmartRange::replaceText(*a0,a1) : sipCpp->replaceText(*a0,a1));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QStringList *>(a0),sipType_QStringList,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_replaceText, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartRange_removeText(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartRange_removeText(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        bool a0 = 0;
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B|b", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, &a0))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->KTextEditor::SmartRange::removeText(a0) : sipCpp->removeText(a0));
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_removeText, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp))
        {
            KTextEditor::SmartRange::InsertBehaviors *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new KTextEditor::SmartRange::InsertBehaviors(sipCpp->insertBehavior());
            Py_END_ALLOW_THREADS

            return sipConvertFromNewType(sipRes,sipType_KTextEditor_SmartRange_InsertBehaviors,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_insertBehavior, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRange::InsertBehaviors * a0;
        int a0State = 0;
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, sipType_KTextEditor_SmartRange_InsertBehaviors, &a0, &a0State))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->setInsertBehavior(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(a0,sipType_KTextEditor_SmartRange_InsertBehaviors,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_setInsertBehavior, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp))
        {
            KTextEditor::SmartRange *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->parentRange();
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartRange,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_parentRange, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartRange_setParentRange(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartRange_setParentRange(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        KTextEditor::SmartRange * a0;
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, sipType_KTextEditor_SmartRange, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp->KTextEditor::SmartRange::setParentRange(a0) : sipCpp->setParentRange(a0));
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_setParentRange, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRange * a0;
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, sipType_KTextEditor_SmartRange, &a0))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->hasParent(a0);
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_hasParent, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRange *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->depth();
            Py_END_ALLOW_THREADS

            return SIPLong_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_depth, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp))
        {
            KTextEditor::SmartRange *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->topParentRange();
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartRange,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_topParentRange, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp))
        {
            QList<KTextEditor::SmartRange *> *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QList<KTextEditor::SmartRange *>(sipCpp->childRanges());
            Py_END_ALLOW_THREADS

            return sipConvertFromNewType(sipRes,sipType_QList_0101KTextEditor_SmartRange,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_childRanges, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->clearChildRanges();
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_clearChildRanges, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->deleteChildRanges();
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_deleteChildRanges, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->clearAndDeleteChildRanges();
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_clearAndDeleteChildRanges, NULL);

    return NULL;
}


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

    {
        const KTextEditor::SmartRange * a0;
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, sipType_KTextEditor_SmartRange, &a0))
        {
            KTextEditor::SmartRange *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->childBefore(a0);
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartRange,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_childBefore, NULL);

    return NULL;
}


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

    {
        const KTextEditor::SmartRange * a0;
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, sipType_KTextEditor_SmartRange, &a0))
        {
            KTextEditor::SmartRange *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->childAfter(a0);
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartRange,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_childAfter, NULL);

    return NULL;
}


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

    {
        const KTextEditor::Range * a0;
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, sipType_KTextEditor_Range, &a0))
        {
            KTextEditor::SmartRange *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->mostSpecificRange(*a0);
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartRange,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_mostSpecificRange, NULL);

    return NULL;
}


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

    {
        const KTextEditor::Cursor * a0;
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, sipType_KTextEditor_Cursor, &a0))
        {
            KTextEditor::SmartRange *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->firstRangeContaining(*a0);
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartRange,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_firstRangeContaining, NULL);

    return NULL;
}


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

    {
        const KTextEditor::Cursor * a0;
        QStack<KTextEditor::SmartRange *> * a1 = 0;
        int a1State = 0;
        QStack<KTextEditor::SmartRange *> * a2 = 0;
        int a2State = 0;
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9|J0J0", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, sipType_KTextEditor_Cursor, &a0, sipType_QStack_0101KTextEditor_SmartRange,&a1, &a1State, sipType_QStack_0101KTextEditor_SmartRange,&a2, &a2State))
        {
            KTextEditor::SmartRange *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->deepestRangeContaining(*a0,a1,a2);
            Py_END_ALLOW_THREADS
            sipReleaseType(a1,sipType_QStack_0101KTextEditor_SmartRange,a1State);
            sipReleaseType(a2,sipType_QStack_0101KTextEditor_SmartRange,a2State);

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartRange,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_deepestRangeContaining, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp))
        {
            KTextEditor::Attribute::Ptr *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new KTextEditor::Attribute::Ptr(sipCpp->attribute());
            Py_END_ALLOW_THREADS

            return sipConvertFromNewType(sipRes,sipType_KSharedPtr_0100KTextEditor_Attribute,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_attribute, NULL);

    return NULL;
}


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

    {
        KTextEditor::Attribute::Ptr * a0;
        int a0State = 0;
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, sipType_KSharedPtr_0100KTextEditor_Attribute,&a0, &a0State))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->setAttribute(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(a0,sipType_KSharedPtr_0100KTextEditor_Attribute,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_setAttribute, NULL);

    return NULL;
}


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

    {
        KAction * a0;
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, sipType_KAction, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->associateAction(a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_associateAction, NULL);

    return NULL;
}


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

    {
        KAction * a0;
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, sipType_KAction, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->dissociateAction(a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_dissociateAction, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp))
        {
            QList<KAction *> *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QList<KAction *>(sipCpp->associatedActions());
            Py_END_ALLOW_THREADS

            return sipConvertFromNewType(sipRes,sipType_QList_0101KAction,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_associatedActions, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->clearAssociatedActions();
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_clearAssociatedActions, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp))
        {
            KTextEditor::SmartRangeNotifier *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->primaryNotifier();
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartRangeNotifier,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_primaryNotifier, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp))
        {
            QList<KTextEditor::SmartRangeNotifier *> *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QList<KTextEditor::SmartRangeNotifier *>(sipCpp->notifiers());
            Py_END_ALLOW_THREADS

            return sipConvertFromNewType(sipRes,sipType_QList_0101KTextEditor_SmartRangeNotifier,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_notifiers, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRangeNotifier * a0;
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, sipType_KTextEditor_SmartRangeNotifier, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->addNotifier(a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_addNotifier, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRangeNotifier * a0;
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, sipType_KTextEditor_SmartRangeNotifier, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->removeNotifier(a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_removeNotifier, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->deletePrimaryNotifier();
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_deletePrimaryNotifier, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp))
        {
            QList<KTextEditor::SmartRangeWatcher *> *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QList<KTextEditor::SmartRangeWatcher *>(sipCpp->watchers());
            Py_END_ALLOW_THREADS

            return sipConvertFromNewType(sipRes,sipType_QList_0101KTextEditor_SmartRangeWatcher,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_watchers, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRangeWatcher * a0;
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, sipType_KTextEditor_SmartRangeWatcher, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->addWatcher(a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_addWatcher, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartRangeWatcher * a0;
        KTextEditor::SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, sipType_KTextEditor_SmartRangeWatcher, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->removeWatcher(a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_removeWatcher, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartRange_rangeChanged(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartRange_rangeChanged(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        KTextEditor::Cursor * a0;
        const KTextEditor::Range * a1;
        sipKTextEditor_SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8J9", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp, sipType_KTextEditor_Cursor, &a0, sipType_KTextEditor_Range, &a1))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtectVirt_rangeChanged(sipSelfWasArg,a0,*a1);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_rangeChanged, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartRange_checkFeedback(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartRange_checkFeedback(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        sipKTextEditor_SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtectVirt_checkFeedback(sipSelfWasArg);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_checkFeedback, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartRange_createNotifier(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartRange_createNotifier(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        sipKTextEditor_SmartRange *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartRange, &sipCpp))
        {
            KTextEditor::SmartRangeNotifier *sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartRange, sipName_createNotifier);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->sipProtect_createNotifier();
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartRangeNotifier,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartRange, sipName_createNotifier, NULL);

    return NULL;
}


/* Cast a pointer to a type somewhere in its superclass hierarchy. */
extern "C" {static void *cast_KTextEditor_SmartRange(void *, const sipTypeDef *);}
static void *cast_KTextEditor_SmartRange(void *ptr, const sipTypeDef *targetType)
{
    void *res;

    if (targetType == sipType_KTextEditor_SmartRange)
        return ptr;

    if ((res = ((const sipClassTypeDef *)sipType_KTextEditor_Range)->ctd_cast((KTextEditor::Range *)(KTextEditor::SmartRange *)ptr,targetType)) != NULL)
        return res;

    return NULL;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipKTextEditor_SmartRange *>(sipCppV);
    else
        delete reinterpret_cast<KTextEditor::SmartRange *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void dealloc_KTextEditor_SmartRange(sipSimpleWrapper *);}
static void dealloc_KTextEditor_SmartRange(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerived(sipSelf))
        reinterpret_cast<sipKTextEditor_SmartRange *>(sipGetAddress(sipSelf))->sipPySelf = NULL;

    if (sipIsPyOwned(sipSelf))
    {
        release_KTextEditor_SmartRange(sipGetAddress(sipSelf),sipSelf->flags);
    }
}


extern "C" {static void *init_KTextEditor_SmartRange(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_KTextEditor_SmartRange(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    sipKTextEditor_SmartRange *sipCpp = 0;

    {
        KTextEditor::SmartCursor * a0;
        KTextEditor::SmartCursor * a1;
        KTextEditor::SmartRange * a2 = 0;
        KTextEditor::SmartRange::InsertBehaviors a3def = KTextEditor::SmartRange::DoNotExpand;
        KTextEditor::SmartRange::InsertBehaviors * a3 = &a3def;
        int a3State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J8J8|J8J1", sipType_KTextEditor_SmartCursor, &a0, sipType_KTextEditor_SmartCursor, &a1, sipType_KTextEditor_SmartRange, &a2, sipType_KTextEditor_SmartRange_InsertBehaviors, &a3, &a3State))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipKTextEditor_SmartRange(a0,a1,a2,*a3);
            Py_END_ALLOW_THREADS
            sipReleaseType(a3,sipType_KTextEditor_SmartRange_InsertBehaviors,a3State);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return NULL;
}


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


static PyMethodDef methods_KTextEditor_SmartRange[] = {
    {SIP_MLNAME_CAST(sipName_addNotifier), meth_KTextEditor_SmartRange_addNotifier, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_addWatcher), meth_KTextEditor_SmartRange_addWatcher, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_associateAction), meth_KTextEditor_SmartRange_associateAction, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_associatedActions), meth_KTextEditor_SmartRange_associatedActions, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_attribute), meth_KTextEditor_SmartRange_attribute, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_checkFeedback), meth_KTextEditor_SmartRange_checkFeedback, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_childAfter), meth_KTextEditor_SmartRange_childAfter, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_childBefore), meth_KTextEditor_SmartRange_childBefore, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_childRanges), meth_KTextEditor_SmartRange_childRanges, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_clearAndDeleteChildRanges), meth_KTextEditor_SmartRange_clearAndDeleteChildRanges, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_clearAssociatedActions), meth_KTextEditor_SmartRange_clearAssociatedActions, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_clearChildRanges), meth_KTextEditor_SmartRange_clearChildRanges, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_confineToRange), meth_KTextEditor_SmartRange_confineToRange, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_createNotifier), meth_KTextEditor_SmartRange_createNotifier, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_deepestRangeContaining), meth_KTextEditor_SmartRange_deepestRangeContaining, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_deleteChildRanges), meth_KTextEditor_SmartRange_deleteChildRanges, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_deletePrimaryNotifier), meth_KTextEditor_SmartRange_deletePrimaryNotifier, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_depth), meth_KTextEditor_SmartRange_depth, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_dissociateAction), meth_KTextEditor_SmartRange_dissociateAction, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_document), meth_KTextEditor_SmartRange_document, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_expandToRange), meth_KTextEditor_SmartRange_expandToRange, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_firstRangeContaining), meth_KTextEditor_SmartRange_firstRangeContaining, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_hasParent), meth_KTextEditor_SmartRange_hasParent, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_insertBehavior), meth_KTextEditor_SmartRange_insertBehavior, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_isSmartRange), meth_KTextEditor_SmartRange_isSmartRange, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_mostSpecificRange), meth_KTextEditor_SmartRange_mostSpecificRange, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_notifiers), meth_KTextEditor_SmartRange_notifiers, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_parentRange), meth_KTextEditor_SmartRange_parentRange, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_primaryNotifier), meth_KTextEditor_SmartRange_primaryNotifier, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_rangeChanged), meth_KTextEditor_SmartRange_rangeChanged, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_removeNotifier), meth_KTextEditor_SmartRange_removeNotifier, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_removeText), meth_KTextEditor_SmartRange_removeText, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_removeWatcher), meth_KTextEditor_SmartRange_removeWatcher, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_replaceText), meth_KTextEditor_SmartRange_replaceText, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setAttribute), meth_KTextEditor_SmartRange_setAttribute, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setInsertBehavior), meth_KTextEditor_SmartRange_setInsertBehavior, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setParentRange), meth_KTextEditor_SmartRange_setParentRange, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setRange), meth_KTextEditor_SmartRange_setRange, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_smartEnd), meth_KTextEditor_SmartRange_smartEnd, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_smartStart), meth_KTextEditor_SmartRange_smartStart, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_text), meth_KTextEditor_SmartRange_text, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_toSmartRange), meth_KTextEditor_SmartRange_toSmartRange, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_topParentRange), meth_KTextEditor_SmartRange_topParentRange, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_watchers), meth_KTextEditor_SmartRange_watchers, METH_VARARGS, NULL}
};

static sipEnumMemberDef enummembers_KTextEditor_SmartRange[] = {
    {sipName_DoNotExpand, KTextEditor::SmartRange::DoNotExpand, 47},
    {sipName_ExpandLeft, KTextEditor::SmartRange::ExpandLeft, 47},
    {sipName_ExpandRight, KTextEditor::SmartRange::ExpandRight, 47},
};


pyqt4ClassTypeDef sipTypeDef_ktexteditor_KTextEditor_SmartRange = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_ABSTRACT|SIP_TYPE_CLASS,
        sipNameNr_KTextEditor__SmartRange,
        {0}
    },
    {
        sipNameNr_SmartRange,
        {1, 255, 0},
        44, methods_KTextEditor_SmartRange,
        3, enummembers_KTextEditor_SmartRange,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    supers_KTextEditor_SmartRange,
    0,
    init_KTextEditor_SmartRange,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KTextEditor_SmartRange,
    0,
    0,
    0,
    release_KTextEditor_SmartRange,
    cast_KTextEditor_SmartRange,
    0,
    0,
    0
},
    0,
    0,
    0
};

#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/smartinterface.sip"
#include <ktexteditor/smartinterface.h>
#line 2695 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"

#line 340 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kdecore/typedefs.sip"
#include <ksharedptr.h>
#line 2699 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/attribute.sip"
#include <ktexteditor/attribute.h>
#line 2702 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/view.sip"
#include <ktexteditor/view.h>

#include <ktexteditor/codecompletioninterface.h>
#include <ktexteditor/sessionconfiginterface.h>
#include <ktexteditor/texthintinterface.h>
#line 2709 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 120 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 2712 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/smartrange.sip"
#include <ktexteditor/smartrange.h>
#line 2715 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/range.sip"
#include <ktexteditor/range.h>
#line 2718 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/smartrange.sip"
#include <ktexteditor/smartrange.h>
#line 2721 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/cursor.sip"
#include <ktexteditor/cursor.h>
#line 2724 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/smartcursor.sip"
#include <ktexteditor/smartcursor.h>
#line 2727 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 31 "/usr/local/share/py-sip/QtCore/qmutex.sip"
#include <qmutex.h>
#line 2730 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"


class sipKTextEditor_SmartInterface : public KTextEditor::SmartInterface
{
public:
    sipKTextEditor_SmartInterface();
    virtual ~sipKTextEditor_SmartInterface();

    /*
     * There is a public method for every protected method visible from
     * this class.
     */
    void sipProtect_attributeDynamic(KTextEditor::Attribute::Ptr);
    void sipProtect_attributeNotDynamic(KTextEditor::Attribute::Ptr);

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    void clearSmartInterface();
    int currentRevision() const;
    void releaseRevision(int) const;
    void useRevision(int);
    KTextEditor::Cursor translateFromRevision(const KTextEditor::Cursor&,KTextEditor::SmartCursor::InsertBehavior) const;
    KTextEditor::Range translateFromRevision(const KTextEditor::Range&,KTextEditor::SmartRange::InsertBehaviors) const;
    KTextEditor::SmartCursor * newSmartCursor(const KTextEditor::Cursor&,KTextEditor::SmartCursor::InsertBehavior);
    void deleteCursors();
    KTextEditor::SmartRange * newSmartRange(const KTextEditor::Range&,KTextEditor::SmartRange *,KTextEditor::SmartRange::InsertBehaviors);
    KTextEditor::SmartRange * newSmartRange(KTextEditor::SmartCursor *,KTextEditor::SmartCursor *,KTextEditor::SmartRange *,KTextEditor::SmartRange::InsertBehaviors);
    void unbindSmartRange(KTextEditor::SmartRange *);
    void deleteRanges();
    void addHighlightToDocument(KTextEditor::SmartRange *,bool);
    void removeHighlightFromDocument(KTextEditor::SmartRange *);
    const QList<KTextEditor::SmartRange *> documentHighlights() const;
    void clearDocumentHighlights();
    void addHighlightToView(KTextEditor::View *,KTextEditor::SmartRange *,bool);
    void removeHighlightFromView(KTextEditor::View *,KTextEditor::SmartRange *);
    const QList<KTextEditor::SmartRange *> viewHighlights(KTextEditor::View *) const;
    void clearViewHighlights(KTextEditor::View *);
    void addActionsToDocument(KTextEditor::SmartRange *);
    void removeActionsFromDocument(KTextEditor::SmartRange *);
    const QList<KTextEditor::SmartRange *> documentActions() const;
    void clearDocumentActions();
    void addActionsToView(KTextEditor::View *,KTextEditor::SmartRange *);
    void removeActionsFromView(KTextEditor::View *,KTextEditor::SmartRange *);
    const QList<KTextEditor::SmartRange *> viewActions(KTextEditor::View *) const;
    void clearViewActions(KTextEditor::View *);
    void attributeDynamic(KTextEditor::Attribute::Ptr);
    void attributeNotDynamic(KTextEditor::Attribute::Ptr);

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[30];
};

sipKTextEditor_SmartInterface::sipKTextEditor_SmartInterface(): KTextEditor::SmartInterface(), sipPySelf(0)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipKTextEditor_SmartInterface::~sipKTextEditor_SmartInterface()
{
    sipCommonDtor(sipPySelf);
}

void sipKTextEditor_SmartInterface::clearSmartInterface()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[0],sipPySelf,sipName_SmartInterface,sipName_clearSmartInterface);

    if (!sipMeth)
        return;

    typedef void (*sipVH_QtCore_11)(sip_gilstate_t,PyObject *);

    ((sipVH_QtCore_11)(sipModuleAPI_ktexteditor_QtCore->em_virthandlers[11]))(sipGILState,sipMeth);
}

int sipKTextEditor_SmartInterface::currentRevision() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[1]),sipPySelf,sipName_SmartInterface,sipName_currentRevision);

    if (!sipMeth)
        return 0;

    typedef int (*sipVH_QtCore_6)(sip_gilstate_t,PyObject *);

    return ((sipVH_QtCore_6)(sipModuleAPI_ktexteditor_QtCore->em_virthandlers[6]))(sipGILState,sipMeth);
}

void sipKTextEditor_SmartInterface::releaseRevision(int a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[2]),sipPySelf,sipName_SmartInterface,sipName_releaseRevision);

    if (!sipMeth)
        return;

    typedef void (*sipVH_QtCore_4)(sip_gilstate_t,PyObject *,int);

    ((sipVH_QtCore_4)(sipModuleAPI_ktexteditor_QtCore->em_virthandlers[4]))(sipGILState,sipMeth,a0);
}

void sipKTextEditor_SmartInterface::useRevision(int a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[3],sipPySelf,sipName_SmartInterface,sipName_useRevision);

    if (!sipMeth)
        return;

    typedef void (*sipVH_QtCore_4)(sip_gilstate_t,PyObject *,int);

    ((sipVH_QtCore_4)(sipModuleAPI_ktexteditor_QtCore->em_virthandlers[4]))(sipGILState,sipMeth,a0);
}

KTextEditor::Cursor sipKTextEditor_SmartInterface::translateFromRevision(const KTextEditor::Cursor& a0,KTextEditor::SmartCursor::InsertBehavior a1) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[4]),sipPySelf,NULL,sipName_translateFromRevision);

    if (!sipMeth)
        return KTextEditor::SmartInterface::translateFromRevision(a0,a1);

    extern KTextEditor::Cursor sipVH_ktexteditor_31(sip_gilstate_t,PyObject *,const KTextEditor::Cursor&,KTextEditor::SmartCursor::InsertBehavior);

    return sipVH_ktexteditor_31(sipGILState,sipMeth,a0,a1);
}

KTextEditor::Range sipKTextEditor_SmartInterface::translateFromRevision(const KTextEditor::Range& a0,KTextEditor::SmartRange::InsertBehaviors a1) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[5]),sipPySelf,NULL,sipName_translateFromRevision);

    if (!sipMeth)
        return KTextEditor::SmartInterface::translateFromRevision(a0,a1);

    extern KTextEditor::Range sipVH_ktexteditor_30(sip_gilstate_t,PyObject *,const KTextEditor::Range&,KTextEditor::SmartRange::InsertBehaviors);

    return sipVH_ktexteditor_30(sipGILState,sipMeth,a0,a1);
}

KTextEditor::SmartCursor * sipKTextEditor_SmartInterface::newSmartCursor(const KTextEditor::Cursor& a0,KTextEditor::SmartCursor::InsertBehavior a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[6],sipPySelf,sipName_SmartInterface,sipName_newSmartCursor);

    if (!sipMeth)
        return 0;

    extern KTextEditor::SmartCursor * sipVH_ktexteditor_29(sip_gilstate_t,PyObject *,const KTextEditor::Cursor&,KTextEditor::SmartCursor::InsertBehavior);

    return sipVH_ktexteditor_29(sipGILState,sipMeth,a0,a1);
}

void sipKTextEditor_SmartInterface::deleteCursors()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[7],sipPySelf,sipName_SmartInterface,sipName_deleteCursors);

    if (!sipMeth)
        return;

    typedef void (*sipVH_QtCore_11)(sip_gilstate_t,PyObject *);

    ((sipVH_QtCore_11)(sipModuleAPI_ktexteditor_QtCore->em_virthandlers[11]))(sipGILState,sipMeth);
}

KTextEditor::SmartRange * sipKTextEditor_SmartInterface::newSmartRange(const KTextEditor::Range& a0,KTextEditor::SmartRange *a1,KTextEditor::SmartRange::InsertBehaviors a2)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[8],sipPySelf,sipName_SmartInterface,sipName_newSmartRange);

    if (!sipMeth)
        return 0;

    extern KTextEditor::SmartRange * sipVH_ktexteditor_28(sip_gilstate_t,PyObject *,const KTextEditor::Range&,KTextEditor::SmartRange *,KTextEditor::SmartRange::InsertBehaviors);

    return sipVH_ktexteditor_28(sipGILState,sipMeth,a0,a1,a2);
}

KTextEditor::SmartRange * sipKTextEditor_SmartInterface::newSmartRange(KTextEditor::SmartCursor *a0,KTextEditor::SmartCursor *a1,KTextEditor::SmartRange *a2,KTextEditor::SmartRange::InsertBehaviors a3)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[9],sipPySelf,sipName_SmartInterface,sipName_newSmartRange);

    if (!sipMeth)
        return 0;

    extern KTextEditor::SmartRange * sipVH_ktexteditor_27(sip_gilstate_t,PyObject *,KTextEditor::SmartCursor *,KTextEditor::SmartCursor *,KTextEditor::SmartRange *,KTextEditor::SmartRange::InsertBehaviors);

    return sipVH_ktexteditor_27(sipGILState,sipMeth,a0,a1,a2,a3);
}

void sipKTextEditor_SmartInterface::unbindSmartRange(KTextEditor::SmartRange *a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[10],sipPySelf,sipName_SmartInterface,sipName_unbindSmartRange);

    if (!sipMeth)
        return;

    extern void sipVH_ktexteditor_15(sip_gilstate_t,PyObject *,KTextEditor::SmartRange *);

    sipVH_ktexteditor_15(sipGILState,sipMeth,a0);
}

void sipKTextEditor_SmartInterface::deleteRanges()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[11],sipPySelf,sipName_SmartInterface,sipName_deleteRanges);

    if (!sipMeth)
        return;

    typedef void (*sipVH_QtCore_11)(sip_gilstate_t,PyObject *);

    ((sipVH_QtCore_11)(sipModuleAPI_ktexteditor_QtCore->em_virthandlers[11]))(sipGILState,sipMeth);
}

void sipKTextEditor_SmartInterface::addHighlightToDocument(KTextEditor::SmartRange *a0,bool a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[12],sipPySelf,sipName_SmartInterface,sipName_addHighlightToDocument);

    if (!sipMeth)
        return;

    extern void sipVH_ktexteditor_26(sip_gilstate_t,PyObject *,KTextEditor::SmartRange *,bool);

    sipVH_ktexteditor_26(sipGILState,sipMeth,a0,a1);
}

void sipKTextEditor_SmartInterface::removeHighlightFromDocument(KTextEditor::SmartRange *a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[13],sipPySelf,sipName_SmartInterface,sipName_removeHighlightFromDocument);

    if (!sipMeth)
        return;

    extern void sipVH_ktexteditor_15(sip_gilstate_t,PyObject *,KTextEditor::SmartRange *);

    sipVH_ktexteditor_15(sipGILState,sipMeth,a0);
}

const QList<KTextEditor::SmartRange *> sipKTextEditor_SmartInterface::documentHighlights() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[14]),sipPySelf,sipName_SmartInterface,sipName_documentHighlights);

    if (!sipMeth)
        return QList<KTextEditor::SmartRange *>();

    extern const QList<KTextEditor::SmartRange *> sipVH_ktexteditor_24(sip_gilstate_t,PyObject *);

    return sipVH_ktexteditor_24(sipGILState,sipMeth);
}

void sipKTextEditor_SmartInterface::clearDocumentHighlights()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[15],sipPySelf,sipName_SmartInterface,sipName_clearDocumentHighlights);

    if (!sipMeth)
        return;

    typedef void (*sipVH_QtCore_11)(sip_gilstate_t,PyObject *);

    ((sipVH_QtCore_11)(sipModuleAPI_ktexteditor_QtCore->em_virthandlers[11]))(sipGILState,sipMeth);
}

void sipKTextEditor_SmartInterface::addHighlightToView(KTextEditor::View *a0,KTextEditor::SmartRange *a1,bool a2)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[16],sipPySelf,sipName_SmartInterface,sipName_addHighlightToView);

    if (!sipMeth)
        return;

    extern void sipVH_ktexteditor_25(sip_gilstate_t,PyObject *,KTextEditor::View *,KTextEditor::SmartRange *,bool);

    sipVH_ktexteditor_25(sipGILState,sipMeth,a0,a1,a2);
}

void sipKTextEditor_SmartInterface::removeHighlightFromView(KTextEditor::View *a0,KTextEditor::SmartRange *a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[17],sipPySelf,sipName_SmartInterface,sipName_removeHighlightFromView);

    if (!sipMeth)
        return;

    extern void sipVH_ktexteditor_23(sip_gilstate_t,PyObject *,KTextEditor::View *,KTextEditor::SmartRange *);

    sipVH_ktexteditor_23(sipGILState,sipMeth,a0,a1);
}

const QList<KTextEditor::SmartRange *> sipKTextEditor_SmartInterface::viewHighlights(KTextEditor::View *a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[18]),sipPySelf,sipName_SmartInterface,sipName_viewHighlights);

    if (!sipMeth)
        return QList<KTextEditor::SmartRange *>();

    extern const QList<KTextEditor::SmartRange *> sipVH_ktexteditor_22(sip_gilstate_t,PyObject *,KTextEditor::View *);

    return sipVH_ktexteditor_22(sipGILState,sipMeth,a0);
}

void sipKTextEditor_SmartInterface::clearViewHighlights(KTextEditor::View *a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[19],sipPySelf,sipName_SmartInterface,sipName_clearViewHighlights);

    if (!sipMeth)
        return;

    extern void sipVH_ktexteditor_21(sip_gilstate_t,PyObject *,KTextEditor::View *);

    sipVH_ktexteditor_21(sipGILState,sipMeth,a0);
}

void sipKTextEditor_SmartInterface::addActionsToDocument(KTextEditor::SmartRange *a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[20],sipPySelf,sipName_SmartInterface,sipName_addActionsToDocument);

    if (!sipMeth)
        return;

    extern void sipVH_ktexteditor_15(sip_gilstate_t,PyObject *,KTextEditor::SmartRange *);

    sipVH_ktexteditor_15(sipGILState,sipMeth,a0);
}

void sipKTextEditor_SmartInterface::removeActionsFromDocument(KTextEditor::SmartRange *a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[21],sipPySelf,sipName_SmartInterface,sipName_removeActionsFromDocument);

    if (!sipMeth)
        return;

    extern void sipVH_ktexteditor_15(sip_gilstate_t,PyObject *,KTextEditor::SmartRange *);

    sipVH_ktexteditor_15(sipGILState,sipMeth,a0);
}

const QList<KTextEditor::SmartRange *> sipKTextEditor_SmartInterface::documentActions() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[22]),sipPySelf,sipName_SmartInterface,sipName_documentActions);

    if (!sipMeth)
        return QList<KTextEditor::SmartRange *>();

    extern const QList<KTextEditor::SmartRange *> sipVH_ktexteditor_24(sip_gilstate_t,PyObject *);

    return sipVH_ktexteditor_24(sipGILState,sipMeth);
}

void sipKTextEditor_SmartInterface::clearDocumentActions()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[23],sipPySelf,sipName_SmartInterface,sipName_clearDocumentActions);

    if (!sipMeth)
        return;

    typedef void (*sipVH_QtCore_11)(sip_gilstate_t,PyObject *);

    ((sipVH_QtCore_11)(sipModuleAPI_ktexteditor_QtCore->em_virthandlers[11]))(sipGILState,sipMeth);
}

void sipKTextEditor_SmartInterface::addActionsToView(KTextEditor::View *a0,KTextEditor::SmartRange *a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[24],sipPySelf,sipName_SmartInterface,sipName_addActionsToView);

    if (!sipMeth)
        return;

    extern void sipVH_ktexteditor_23(sip_gilstate_t,PyObject *,KTextEditor::View *,KTextEditor::SmartRange *);

    sipVH_ktexteditor_23(sipGILState,sipMeth,a0,a1);
}

void sipKTextEditor_SmartInterface::removeActionsFromView(KTextEditor::View *a0,KTextEditor::SmartRange *a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[25],sipPySelf,sipName_SmartInterface,sipName_removeActionsFromView);

    if (!sipMeth)
        return;

    extern void sipVH_ktexteditor_23(sip_gilstate_t,PyObject *,KTextEditor::View *,KTextEditor::SmartRange *);

    sipVH_ktexteditor_23(sipGILState,sipMeth,a0,a1);
}

const QList<KTextEditor::SmartRange *> sipKTextEditor_SmartInterface::viewActions(KTextEditor::View *a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[26]),sipPySelf,sipName_SmartInterface,sipName_viewActions);

    if (!sipMeth)
        return QList<KTextEditor::SmartRange *>();

    extern const QList<KTextEditor::SmartRange *> sipVH_ktexteditor_22(sip_gilstate_t,PyObject *,KTextEditor::View *);

    return sipVH_ktexteditor_22(sipGILState,sipMeth,a0);
}

void sipKTextEditor_SmartInterface::clearViewActions(KTextEditor::View *a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[27],sipPySelf,sipName_SmartInterface,sipName_clearViewActions);

    if (!sipMeth)
        return;

    extern void sipVH_ktexteditor_21(sip_gilstate_t,PyObject *,KTextEditor::View *);

    sipVH_ktexteditor_21(sipGILState,sipMeth,a0);
}

void sipKTextEditor_SmartInterface::attributeDynamic(KTextEditor::Attribute::Ptr a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[28],sipPySelf,sipName_SmartInterface,sipName_attributeDynamic);

    if (!sipMeth)
        return;

    extern void sipVH_ktexteditor_20(sip_gilstate_t,PyObject *,KSharedPtr<KTextEditor::Attribute>);

    sipVH_ktexteditor_20(sipGILState,sipMeth,a0);
}

void sipKTextEditor_SmartInterface::attributeNotDynamic(KTextEditor::Attribute::Ptr a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[29],sipPySelf,sipName_SmartInterface,sipName_attributeNotDynamic);

    if (!sipMeth)
        return;

    extern void sipVH_ktexteditor_20(sip_gilstate_t,PyObject *,KSharedPtr<KTextEditor::Attribute>);

    sipVH_ktexteditor_20(sipGILState,sipMeth,a0);
}

void sipKTextEditor_SmartInterface::sipProtect_attributeDynamic(KTextEditor::Attribute::Ptr a0)
{
    attributeDynamic(a0);
}

void sipKTextEditor_SmartInterface::sipProtect_attributeNotDynamic(KTextEditor::Attribute::Ptr a0)
{
    attributeNotDynamic(a0);
}


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

    {
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp))
        {
            QMutex *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->smartMutex();
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_QMutex,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_smartMutex, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_clearSmartInterface(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_clearSmartInterface(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_clearSmartInterface);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->clearSmartInterface();
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_clearSmartInterface, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartInterface *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->clearOnDocumentReload();
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_clearOnDocumentReload, NULL);

    return NULL;
}


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

    {
        bool a0;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->setClearOnDocumentReload(a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_setClearOnDocumentReload, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_currentRevision(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_currentRevision(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::SmartInterface *sipCpp;

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

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_currentRevision);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->currentRevision();
            Py_END_ALLOW_THREADS

            return SIPLong_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_currentRevision, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_releaseRevision(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_releaseRevision(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        int a0;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, &a0))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_releaseRevision);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->releaseRevision(a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_releaseRevision, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_useRevision(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_useRevision(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        int a0;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, &a0))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_useRevision);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->useRevision(a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_useRevision, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->clearRevision();
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_clearRevision, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_translateFromRevision(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_translateFromRevision(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        const KTextEditor::Cursor * a0;
        KTextEditor::SmartCursor::InsertBehavior a1 = KTextEditor::SmartCursor::StayOnInsert;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9|E", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, sipType_KTextEditor_Cursor, &a0, sipType_KTextEditor_SmartCursor_InsertBehavior, &a1))
        {
            KTextEditor::Cursor *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new KTextEditor::Cursor((sipSelfWasArg ? sipCpp->KTextEditor::SmartInterface::translateFromRevision(*a0,a1) : sipCpp->translateFromRevision(*a0,a1)));
            Py_END_ALLOW_THREADS

            return sipConvertFromNewType(sipRes,sipType_KTextEditor_Cursor,NULL);
        }
    }

    {
        const KTextEditor::Range * a0;
        KTextEditor::SmartRange::InsertBehaviors * a1;
        int a1State = 0;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9J1", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, sipType_KTextEditor_Range, &a0, sipType_KTextEditor_SmartRange_InsertBehaviors, &a1, &a1State))
        {
            KTextEditor::Range *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new KTextEditor::Range((sipSelfWasArg ? sipCpp->KTextEditor::SmartInterface::translateFromRevision(*a0,*a1) : sipCpp->translateFromRevision(*a0,*a1)));
            Py_END_ALLOW_THREADS
            sipReleaseType(a1,sipType_KTextEditor_SmartRange_InsertBehaviors,a1State);

            return sipConvertFromNewType(sipRes,sipType_KTextEditor_Range,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_translateFromRevision, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_newSmartCursor(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_newSmartCursor(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        const KTextEditor::Cursor& a0def = KTextEditor::Cursor::start();
        const KTextEditor::Cursor * a0 = &a0def;
        KTextEditor::SmartCursor::InsertBehavior a1 = KTextEditor::SmartCursor::MoveOnInsert;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B|J9E", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, sipType_KTextEditor_Cursor, &a0, sipType_KTextEditor_SmartCursor_InsertBehavior, &a1))
        {
            KTextEditor::SmartCursor *sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_newSmartCursor);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->newSmartCursor(*a0,a1);
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartCursor,NULL);
        }
    }

    {
        int a0;
        int a1;
        KTextEditor::SmartCursor::InsertBehavior a2 = KTextEditor::SmartCursor::MoveOnInsert;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bii|E", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, &a0, &a1, sipType_KTextEditor_SmartCursor_InsertBehavior, &a2))
        {
            KTextEditor::SmartCursor *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->newSmartCursor(a0,a1,a2);
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartCursor,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_newSmartCursor, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_deleteCursors(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_deleteCursors(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_deleteCursors);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->deleteCursors();
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_deleteCursors, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_newSmartRange(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_newSmartRange(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        const KTextEditor::Range& a0def = KTextEditor::Range();
        const KTextEditor::Range * a0 = &a0def;
        KTextEditor::SmartRange * a1 = 0;
        KTextEditor::SmartRange::InsertBehaviors a2def = KTextEditor::SmartRange::DoNotExpand;
        KTextEditor::SmartRange::InsertBehaviors * a2 = &a2def;
        int a2State = 0;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B|J9J8J1", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, sipType_KTextEditor_Range, &a0, sipType_KTextEditor_SmartRange, &a1, sipType_KTextEditor_SmartRange_InsertBehaviors, &a2, &a2State))
        {
            KTextEditor::SmartRange *sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_newSmartRange);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->newSmartRange(*a0,a1,*a2);
            Py_END_ALLOW_THREADS
            sipReleaseType(a2,sipType_KTextEditor_SmartRange_InsertBehaviors,a2State);

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartRange,NULL);
        }
    }

    {
        const KTextEditor::Cursor * a0;
        const KTextEditor::Cursor * a1;
        KTextEditor::SmartRange * a2 = 0;
        KTextEditor::SmartRange::InsertBehaviors a3def = KTextEditor::SmartRange::DoNotExpand;
        KTextEditor::SmartRange::InsertBehaviors * a3 = &a3def;
        int a3State = 0;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9J9|J8J1", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, sipType_KTextEditor_Cursor, &a0, sipType_KTextEditor_Cursor, &a1, sipType_KTextEditor_SmartRange, &a2, sipType_KTextEditor_SmartRange_InsertBehaviors, &a3, &a3State))
        {
            KTextEditor::SmartRange *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->newSmartRange(*a0,*a1,a2,*a3);
            Py_END_ALLOW_THREADS
            sipReleaseType(a3,sipType_KTextEditor_SmartRange_InsertBehaviors,a3State);

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartRange,NULL);
        }
    }

    {
        int a0;
        int a1;
        int a2;
        int a3;
        KTextEditor::SmartRange * a4 = 0;
        KTextEditor::SmartRange::InsertBehaviors a5def = KTextEditor::SmartRange::DoNotExpand;
        KTextEditor::SmartRange::InsertBehaviors * a5 = &a5def;
        int a5State = 0;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Biiii|J8J1", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, &a0, &a1, &a2, &a3, sipType_KTextEditor_SmartRange, &a4, sipType_KTextEditor_SmartRange_InsertBehaviors, &a5, &a5State))
        {
            KTextEditor::SmartRange *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->newSmartRange(a0,a1,a2,a3,a4,*a5);
            Py_END_ALLOW_THREADS
            sipReleaseType(a5,sipType_KTextEditor_SmartRange_InsertBehaviors,a5State);

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartRange,NULL);
        }
    }

    {
        KTextEditor::SmartCursor * a0;
        KTextEditor::SmartCursor * a1;
        KTextEditor::SmartRange * a2 = 0;
        KTextEditor::SmartRange::InsertBehaviors a3def = KTextEditor::SmartRange::DoNotExpand;
        KTextEditor::SmartRange::InsertBehaviors * a3 = &a3def;
        int a3State = 0;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8J8|J8J1", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, sipType_KTextEditor_SmartCursor, &a0, sipType_KTextEditor_SmartCursor, &a1, sipType_KTextEditor_SmartRange, &a2, sipType_KTextEditor_SmartRange_InsertBehaviors, &a3, &a3State))
        {
            KTextEditor::SmartRange *sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_newSmartRange);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->newSmartRange(a0,a1,a2,*a3);
            Py_END_ALLOW_THREADS
            sipReleaseType(a3,sipType_KTextEditor_SmartRange_InsertBehaviors,a3State);

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartRange,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_newSmartRange, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_unbindSmartRange(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_unbindSmartRange(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::SmartRange * a0;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, sipType_KTextEditor_SmartRange, &a0))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_unbindSmartRange);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->unbindSmartRange(a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_unbindSmartRange, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_deleteRanges(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_deleteRanges(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_deleteRanges);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->deleteRanges();
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_deleteRanges, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_addHighlightToDocument(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_addHighlightToDocument(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::SmartRange * a0;
        bool a1 = 0;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8|b", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, sipType_KTextEditor_SmartRange, &a0, &a1))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_addHighlightToDocument);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->addHighlightToDocument(a0,a1);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_addHighlightToDocument, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_removeHighlightFromDocument(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_removeHighlightFromDocument(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::SmartRange * a0;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, sipType_KTextEditor_SmartRange, &a0))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_removeHighlightFromDocument);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->removeHighlightFromDocument(a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_removeHighlightFromDocument, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_documentHighlights(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_documentHighlights(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp))
        {
            QList<KTextEditor::SmartRange *> *sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_documentHighlights);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QList<KTextEditor::SmartRange *>(sipCpp->documentHighlights());
            Py_END_ALLOW_THREADS

            return sipConvertFromNewType(sipRes,sipType_QList_0101KTextEditor_SmartRange,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_documentHighlights, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_clearDocumentHighlights(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_clearDocumentHighlights(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_clearDocumentHighlights);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->clearDocumentHighlights();
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_clearDocumentHighlights, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_addHighlightToView(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_addHighlightToView(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::View * a0;
        KTextEditor::SmartRange * a1;
        bool a2 = 0;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8J8|b", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, sipType_KTextEditor_View, &a0, sipType_KTextEditor_SmartRange, &a1, &a2))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_addHighlightToView);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->addHighlightToView(a0,a1,a2);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_addHighlightToView, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_removeHighlightFromView(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_removeHighlightFromView(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::View * a0;
        KTextEditor::SmartRange * a1;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8J8", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, sipType_KTextEditor_View, &a0, sipType_KTextEditor_SmartRange, &a1))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_removeHighlightFromView);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->removeHighlightFromView(a0,a1);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_removeHighlightFromView, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_viewHighlights(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_viewHighlights(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::View * a0;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, sipType_KTextEditor_View, &a0))
        {
            QList<KTextEditor::SmartRange *> *sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_viewHighlights);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QList<KTextEditor::SmartRange *>(sipCpp->viewHighlights(a0));
            Py_END_ALLOW_THREADS

            return sipConvertFromNewType(sipRes,sipType_QList_0101KTextEditor_SmartRange,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_viewHighlights, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_clearViewHighlights(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_clearViewHighlights(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::View * a0;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, sipType_KTextEditor_View, &a0))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_clearViewHighlights);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->clearViewHighlights(a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_clearViewHighlights, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_addActionsToDocument(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_addActionsToDocument(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::SmartRange * a0;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, sipType_KTextEditor_SmartRange, &a0))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_addActionsToDocument);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->addActionsToDocument(a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_addActionsToDocument, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_removeActionsFromDocument(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_removeActionsFromDocument(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::SmartRange * a0;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, sipType_KTextEditor_SmartRange, &a0))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_removeActionsFromDocument);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->removeActionsFromDocument(a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_removeActionsFromDocument, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_documentActions(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_documentActions(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp))
        {
            QList<KTextEditor::SmartRange *> *sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_documentActions);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QList<KTextEditor::SmartRange *>(sipCpp->documentActions());
            Py_END_ALLOW_THREADS

            return sipConvertFromNewType(sipRes,sipType_QList_0101KTextEditor_SmartRange,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_documentActions, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_clearDocumentActions(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_clearDocumentActions(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_clearDocumentActions);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->clearDocumentActions();
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_clearDocumentActions, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_addActionsToView(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_addActionsToView(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::View * a0;
        KTextEditor::SmartRange * a1;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8J8", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, sipType_KTextEditor_View, &a0, sipType_KTextEditor_SmartRange, &a1))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_addActionsToView);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->addActionsToView(a0,a1);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_addActionsToView, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_removeActionsFromView(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_removeActionsFromView(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::View * a0;
        KTextEditor::SmartRange * a1;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8J8", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, sipType_KTextEditor_View, &a0, sipType_KTextEditor_SmartRange, &a1))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_removeActionsFromView);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->removeActionsFromView(a0,a1);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_removeActionsFromView, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_viewActions(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_viewActions(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::View * a0;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, sipType_KTextEditor_View, &a0))
        {
            QList<KTextEditor::SmartRange *> *sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_viewActions);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QList<KTextEditor::SmartRange *>(sipCpp->viewActions(a0));
            Py_END_ALLOW_THREADS

            return sipConvertFromNewType(sipRes,sipType_QList_0101KTextEditor_SmartRange,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_viewActions, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_clearViewActions(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_clearViewActions(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::View * a0;
        KTextEditor::SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, sipType_KTextEditor_View, &a0))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_clearViewActions);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->clearViewActions(a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_clearViewActions, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_attributeDynamic(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_attributeDynamic(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::Attribute::Ptr * a0;
        int a0State = 0;
        sipKTextEditor_SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, sipType_KSharedPtr_0100KTextEditor_Attribute,&a0, &a0State))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_attributeDynamic);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtect_attributeDynamic(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(a0,sipType_KSharedPtr_0100KTextEditor_Attribute,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_attributeDynamic, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartInterface_attributeNotDynamic(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartInterface_attributeNotDynamic(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::Attribute::Ptr * a0;
        int a0State = 0;
        sipKTextEditor_SmartInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KTextEditor_SmartInterface, &sipCpp, sipType_KSharedPtr_0100KTextEditor_Attribute,&a0, &a0State))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartInterface, sipName_attributeNotDynamic);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtect_attributeNotDynamic(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(a0,sipType_KSharedPtr_0100KTextEditor_Attribute,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartInterface, sipName_attributeNotDynamic, NULL);

    return NULL;
}


/* Cast a pointer to a type somewhere in its superclass hierarchy. */
extern "C" {static void *cast_KTextEditor_SmartInterface(void *, const sipTypeDef *);}
static void *cast_KTextEditor_SmartInterface(void *ptr, const sipTypeDef *targetType)
{
    if (targetType == sipType_KTextEditor_SmartInterface)
        return ptr;

    return NULL;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipKTextEditor_SmartInterface *>(sipCppV);
    else
        delete reinterpret_cast<KTextEditor::SmartInterface *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void dealloc_KTextEditor_SmartInterface(sipSimpleWrapper *);}
static void dealloc_KTextEditor_SmartInterface(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerived(sipSelf))
        reinterpret_cast<sipKTextEditor_SmartInterface *>(sipGetAddress(sipSelf))->sipPySelf = NULL;

    if (sipIsPyOwned(sipSelf))
    {
        release_KTextEditor_SmartInterface(sipGetAddress(sipSelf),sipSelf->flags);
    }
}


extern "C" {static void *init_KTextEditor_SmartInterface(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_KTextEditor_SmartInterface(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    sipKTextEditor_SmartInterface *sipCpp = 0;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, ""))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipKTextEditor_SmartInterface();
            Py_END_ALLOW_THREADS

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return NULL;
}


static PyMethodDef methods_KTextEditor_SmartInterface[] = {
    {SIP_MLNAME_CAST(sipName_addActionsToDocument), meth_KTextEditor_SmartInterface_addActionsToDocument, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_addActionsToView), meth_KTextEditor_SmartInterface_addActionsToView, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_addHighlightToDocument), meth_KTextEditor_SmartInterface_addHighlightToDocument, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_addHighlightToView), meth_KTextEditor_SmartInterface_addHighlightToView, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_attributeDynamic), meth_KTextEditor_SmartInterface_attributeDynamic, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_attributeNotDynamic), meth_KTextEditor_SmartInterface_attributeNotDynamic, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_clearDocumentActions), meth_KTextEditor_SmartInterface_clearDocumentActions, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_clearDocumentHighlights), meth_KTextEditor_SmartInterface_clearDocumentHighlights, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_clearOnDocumentReload), meth_KTextEditor_SmartInterface_clearOnDocumentReload, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_clearRevision), meth_KTextEditor_SmartInterface_clearRevision, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_clearSmartInterface), meth_KTextEditor_SmartInterface_clearSmartInterface, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_clearViewActions), meth_KTextEditor_SmartInterface_clearViewActions, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_clearViewHighlights), meth_KTextEditor_SmartInterface_clearViewHighlights, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_currentRevision), meth_KTextEditor_SmartInterface_currentRevision, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_deleteCursors), meth_KTextEditor_SmartInterface_deleteCursors, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_deleteRanges), meth_KTextEditor_SmartInterface_deleteRanges, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_documentActions), meth_KTextEditor_SmartInterface_documentActions, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_documentHighlights), meth_KTextEditor_SmartInterface_documentHighlights, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_newSmartCursor), meth_KTextEditor_SmartInterface_newSmartCursor, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_newSmartRange), meth_KTextEditor_SmartInterface_newSmartRange, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_releaseRevision), meth_KTextEditor_SmartInterface_releaseRevision, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_removeActionsFromDocument), meth_KTextEditor_SmartInterface_removeActionsFromDocument, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_removeActionsFromView), meth_KTextEditor_SmartInterface_removeActionsFromView, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_removeHighlightFromDocument), meth_KTextEditor_SmartInterface_removeHighlightFromDocument, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_removeHighlightFromView), meth_KTextEditor_SmartInterface_removeHighlightFromView, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setClearOnDocumentReload), meth_KTextEditor_SmartInterface_setClearOnDocumentReload, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_smartMutex), meth_KTextEditor_SmartInterface_smartMutex, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_translateFromRevision), meth_KTextEditor_SmartInterface_translateFromRevision, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_unbindSmartRange), meth_KTextEditor_SmartInterface_unbindSmartRange, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_useRevision), meth_KTextEditor_SmartInterface_useRevision, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_viewActions), meth_KTextEditor_SmartInterface_viewActions, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_viewHighlights), meth_KTextEditor_SmartInterface_viewHighlights, METH_VARARGS, NULL}
};


pyqt4ClassTypeDef sipTypeDef_ktexteditor_KTextEditor_SmartInterface = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_ABSTRACT|SIP_TYPE_CLASS,
        sipNameNr_KTextEditor__SmartInterface,
        {0}
    },
    {
        sipNameNr_SmartInterface,
        {1, 255, 0},
        32, methods_KTextEditor_SmartInterface,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    sipNameNr_PyQt4_QtCore_pyqtWrapperType,
    -1,
    0,
    0,
    init_KTextEditor_SmartInterface,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KTextEditor_SmartInterface,
    0,
    0,
    0,
    release_KTextEditor_SmartInterface,
    cast_KTextEditor_SmartInterface,
    0,
    0,
    0
},
    0,
    0,
    0
};

#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/smartcursor.sip"
#include <ktexteditor/smartcursor.h>
#line 4595 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"

#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/cursor.sip"
#include <ktexteditor/cursor.h>
#line 4599 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/document.sip"
#include <ktexteditor/document.h>

#include <ktexteditor/modificationinterface.h>
#include <ktexteditor/markinterface.h>
#include <ktexteditor/searchinterface.h>
#include <ktexteditor/sessionconfiginterface.h>
#include <ktexteditor/smartinterface.h>
#include <ktexteditor/templateinterface.h>
#include <ktexteditor/variableinterface.h>
#line 4610 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/cursorfeedback.sip"
#include <ktexteditor/cursorfeedback.h>
#line 4613 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 50 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/cursorfeedback.sip"
#include <ktexteditor/cursorfeedback.h>
#line 4616 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 36 "/usr/local/share/py-sip/QtCore/qstringlist.sip"
#include <qstringlist.h>
#line 4619 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 72 "/usr/local/share/py-sip/QtCore/qchar.sip"
#include <qchar.h>
#line 4622 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/smartrange.sip"
#include <ktexteditor/smartrange.h>
#line 4625 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/range.sip"
#include <ktexteditor/range.h>
#line 4628 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"


class sipKTextEditor_SmartCursor : public KTextEditor::SmartCursor
{
public:
    sipKTextEditor_SmartCursor(const KTextEditor::Cursor&,KTextEditor::Document *,KTextEditor::SmartCursor::InsertBehavior);
    virtual ~sipKTextEditor_SmartCursor();

    /*
     * There is a public method for every protected method visible from
     * this class.
     */
    void sipProtectVirt_setRange(bool,KTextEditor::Range *);
    void sipProtect_cursorChangedDirectly(const KTextEditor::Cursor&);

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    bool isSmartCursor() const;
    KTextEditor::SmartCursor * toSmartCursor() const;
    bool atEndOfLine() const;
    bool atEndOfDocument() const;
    bool isValid() const;
    bool insertText(const QStringList&,bool);
    bool advance(int,KTextEditor::SmartCursor::AdvanceMode);
    bool hasNotifier() const;
    KTextEditor::SmartCursorNotifier * notifier();
    void deleteNotifier();
    KTextEditor::SmartCursorWatcher * watcher() const;
    void setWatcher(KTextEditor::SmartCursorWatcher *);
    void setPosition(const KTextEditor::Cursor&);
    int line() const;
    void setLine(int);
    void setColumn(int);
    void setRange(KTextEditor::Range *);

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[17];
};

sipKTextEditor_SmartCursor::sipKTextEditor_SmartCursor(const KTextEditor::Cursor& a0,KTextEditor::Document *a1,KTextEditor::SmartCursor::InsertBehavior a2): KTextEditor::SmartCursor(a0,a1,a2), sipPySelf(0)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipKTextEditor_SmartCursor::~sipKTextEditor_SmartCursor()
{
    sipCommonDtor(sipPySelf);
}

bool sipKTextEditor_SmartCursor::isSmartCursor() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[0]),sipPySelf,NULL,sipName_isSmartCursor);

    if (!sipMeth)
        return KTextEditor::SmartCursor::isSmartCursor();

    typedef bool (*sipVH_QtCore_7)(sip_gilstate_t,PyObject *);

    return ((sipVH_QtCore_7)(sipModuleAPI_ktexteditor_QtCore->em_virthandlers[7]))(sipGILState,sipMeth);
}

KTextEditor::SmartCursor * sipKTextEditor_SmartCursor::toSmartCursor() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[1]),sipPySelf,NULL,sipName_toSmartCursor);

    if (!sipMeth)
        return KTextEditor::SmartCursor::toSmartCursor();

    extern KTextEditor::SmartCursor * sipVH_ktexteditor_36(sip_gilstate_t,PyObject *);

    return sipVH_ktexteditor_36(sipGILState,sipMeth);
}

bool sipKTextEditor_SmartCursor::atEndOfLine() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[2]),sipPySelf,NULL,sipName_atEndOfLine);

    if (!sipMeth)
        return KTextEditor::SmartCursor::atEndOfLine();

    typedef bool (*sipVH_QtCore_7)(sip_gilstate_t,PyObject *);

    return ((sipVH_QtCore_7)(sipModuleAPI_ktexteditor_QtCore->em_virthandlers[7]))(sipGILState,sipMeth);
}

bool sipKTextEditor_SmartCursor::atEndOfDocument() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[3]),sipPySelf,NULL,sipName_atEndOfDocument);

    if (!sipMeth)
        return KTextEditor::SmartCursor::atEndOfDocument();

    typedef bool (*sipVH_QtCore_7)(sip_gilstate_t,PyObject *);

    return ((sipVH_QtCore_7)(sipModuleAPI_ktexteditor_QtCore->em_virthandlers[7]))(sipGILState,sipMeth);
}

bool sipKTextEditor_SmartCursor::isValid() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[4]),sipPySelf,NULL,sipName_isValid);

    if (!sipMeth)
        return KTextEditor::SmartCursor::isValid();

    typedef bool (*sipVH_QtCore_7)(sip_gilstate_t,PyObject *);

    return ((sipVH_QtCore_7)(sipModuleAPI_ktexteditor_QtCore->em_virthandlers[7]))(sipGILState,sipMeth);
}

bool sipKTextEditor_SmartCursor::insertText(const QStringList& a0,bool a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[5],sipPySelf,NULL,sipName_insertText);

    if (!sipMeth)
        return KTextEditor::SmartCursor::insertText(a0,a1);

    extern bool sipVH_ktexteditor_16(sip_gilstate_t,PyObject *,const QStringList&,bool);

    return sipVH_ktexteditor_16(sipGILState,sipMeth,a0,a1);
}

bool sipKTextEditor_SmartCursor::advance(int a0,KTextEditor::SmartCursor::AdvanceMode a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[6],sipPySelf,NULL,sipName_advance);

    if (!sipMeth)
        return KTextEditor::SmartCursor::advance(a0,a1);

    extern bool sipVH_ktexteditor_35(sip_gilstate_t,PyObject *,int,KTextEditor::SmartCursor::AdvanceMode);

    return sipVH_ktexteditor_35(sipGILState,sipMeth,a0,a1);
}

bool sipKTextEditor_SmartCursor::hasNotifier() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[7]),sipPySelf,sipName_SmartCursor,sipName_hasNotifier);

    if (!sipMeth)
        return 0;

    typedef bool (*sipVH_QtCore_7)(sip_gilstate_t,PyObject *);

    return ((sipVH_QtCore_7)(sipModuleAPI_ktexteditor_QtCore->em_virthandlers[7]))(sipGILState,sipMeth);
}

KTextEditor::SmartCursorNotifier * sipKTextEditor_SmartCursor::notifier()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[8],sipPySelf,sipName_SmartCursor,sipName_notifier);

    if (!sipMeth)
        return 0;

    extern KTextEditor::SmartCursorNotifier * sipVH_ktexteditor_34(sip_gilstate_t,PyObject *);

    return sipVH_ktexteditor_34(sipGILState,sipMeth);
}

void sipKTextEditor_SmartCursor::deleteNotifier()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[9],sipPySelf,sipName_SmartCursor,sipName_deleteNotifier);

    if (!sipMeth)
        return;

    typedef void (*sipVH_QtCore_11)(sip_gilstate_t,PyObject *);

    ((sipVH_QtCore_11)(sipModuleAPI_ktexteditor_QtCore->em_virthandlers[11]))(sipGILState,sipMeth);
}

KTextEditor::SmartCursorWatcher * sipKTextEditor_SmartCursor::watcher() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[10]),sipPySelf,sipName_SmartCursor,sipName_watcher);

    if (!sipMeth)
        return 0;

    extern KTextEditor::SmartCursorWatcher * sipVH_ktexteditor_33(sip_gilstate_t,PyObject *);

    return sipVH_ktexteditor_33(sipGILState,sipMeth);
}

void sipKTextEditor_SmartCursor::setWatcher(KTextEditor::SmartCursorWatcher *a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[11],sipPySelf,sipName_SmartCursor,sipName_setWatcher);

    if (!sipMeth)
        return;

    extern void sipVH_ktexteditor_32(sip_gilstate_t,PyObject *,KTextEditor::SmartCursorWatcher *);

    sipVH_ktexteditor_32(sipGILState,sipMeth,a0);
}

void sipKTextEditor_SmartCursor::setPosition(const KTextEditor::Cursor& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[12],sipPySelf,NULL,sipName_setPosition);

    if (!sipMeth)
    {
        KTextEditor::Cursor::setPosition(a0);
        return;
    }

    extern void sipVH_ktexteditor_79(sip_gilstate_t,PyObject *,const KTextEditor::Cursor&);

    sipVH_ktexteditor_79(sipGILState,sipMeth,a0);
}

int sipKTextEditor_SmartCursor::line() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[13]),sipPySelf,NULL,sipName_line);

    if (!sipMeth)
        return KTextEditor::Cursor::line();

    typedef int (*sipVH_QtCore_6)(sip_gilstate_t,PyObject *);

    return ((sipVH_QtCore_6)(sipModuleAPI_ktexteditor_QtCore->em_virthandlers[6]))(sipGILState,sipMeth);
}

void sipKTextEditor_SmartCursor::setLine(int a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[14],sipPySelf,NULL,sipName_setLine);

    if (!sipMeth)
    {
        KTextEditor::Cursor::setLine(a0);
        return;
    }

    typedef void (*sipVH_QtCore_4)(sip_gilstate_t,PyObject *,int);

    ((sipVH_QtCore_4)(sipModuleAPI_ktexteditor_QtCore->em_virthandlers[4]))(sipGILState,sipMeth,a0);
}

void sipKTextEditor_SmartCursor::setColumn(int a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[15],sipPySelf,NULL,sipName_setColumn);

    if (!sipMeth)
    {
        KTextEditor::Cursor::setColumn(a0);
        return;
    }

    typedef void (*sipVH_QtCore_4)(sip_gilstate_t,PyObject *,int);

    ((sipVH_QtCore_4)(sipModuleAPI_ktexteditor_QtCore->em_virthandlers[4]))(sipGILState,sipMeth,a0);
}

void sipKTextEditor_SmartCursor::setRange(KTextEditor::Range *a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[16],sipPySelf,NULL,sipName_setRange);

    if (!sipMeth)
    {
        KTextEditor::Cursor::setRange(a0);
        return;
    }

    extern void sipVH_ktexteditor_78(sip_gilstate_t,PyObject *,KTextEditor::Range *);

    sipVH_ktexteditor_78(sipGILState,sipMeth,a0);
}

void sipKTextEditor_SmartCursor::sipProtectVirt_setRange(bool sipSelfWasArg,KTextEditor::Range *a0)
{
    (sipSelfWasArg ? KTextEditor::Cursor::setRange(a0) : setRange(a0));
}

void sipKTextEditor_SmartCursor::sipProtect_cursorChangedDirectly(const KTextEditor::Cursor& a0)
{
    KTextEditor::Cursor::cursorChangedDirectly(a0);
}


extern "C" {static PyObject *meth_KTextEditor_SmartCursor_setRange(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartCursor_setRange(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        KTextEditor::Range * a0;
        sipKTextEditor_SmartCursor *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KTextEditor_SmartCursor, &sipCpp, sipType_KTextEditor_Range, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtectVirt_setRange(sipSelfWasArg,a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartCursor, sipName_setRange, NULL);

    return NULL;
}


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

    {
        const KTextEditor::Cursor * a0;
        sipKTextEditor_SmartCursor *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_KTextEditor_SmartCursor, &sipCpp, sipType_KTextEditor_Cursor, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtect_cursorChangedDirectly(*a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartCursor, sipName_cursorChangedDirectly, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartCursor_isSmartCursor(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartCursor_isSmartCursor(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        KTextEditor::SmartCursor *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->KTextEditor::SmartCursor::isSmartCursor() : sipCpp->isSmartCursor());
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartCursor, sipName_isSmartCursor, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartCursor_toSmartCursor(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartCursor_toSmartCursor(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        KTextEditor::SmartCursor *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartCursor, &sipCpp))
        {
            KTextEditor::SmartCursor *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->KTextEditor::SmartCursor::toSmartCursor() : sipCpp->toSmartCursor());
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartCursor,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartCursor, sipName_toSmartCursor, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartCursor *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartCursor, &sipCpp))
        {
            KTextEditor::SmartRange *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->smartRange();
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartRange,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartCursor, sipName_smartRange, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartCursor *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartCursor, &sipCpp))
        {
            KTextEditor::Document *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->document();
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_KTextEditor_Document,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartCursor, sipName_document, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartCursor_atEndOfLine(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartCursor_atEndOfLine(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        KTextEditor::SmartCursor *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->KTextEditor::SmartCursor::atEndOfLine() : sipCpp->atEndOfLine());
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartCursor, sipName_atEndOfLine, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartCursor_atEndOfDocument(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartCursor_atEndOfDocument(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        KTextEditor::SmartCursor *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->KTextEditor::SmartCursor::atEndOfDocument() : sipCpp->atEndOfDocument());
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartCursor, sipName_atEndOfDocument, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartCursor_isValid(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartCursor_isValid(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        KTextEditor::SmartCursor *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->KTextEditor::SmartCursor::isValid() : sipCpp->isValid());
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartCursor, sipName_isValid, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartCursor *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartCursor, &sipCpp))
        {
            QChar *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QChar(sipCpp->character());
            Py_END_ALLOW_THREADS

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

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartCursor, sipName_character, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartCursor_insertText(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartCursor_insertText(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        const QStringList * a0;
        int a0State = 0;
        bool a1 = 0;
        KTextEditor::SmartCursor *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1|b", &sipSelf, sipType_KTextEditor_SmartCursor, &sipCpp, sipType_QStringList,&a0, &a0State, &a1))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->KTextEditor::SmartCursor::insertText(*a0,a1) : sipCpp->insertText(*a0,a1));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QStringList *>(a0),sipType_QStringList,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartCursor, sipName_insertText, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartCursor_advance(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartCursor_advance(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        int a0;
        KTextEditor::SmartCursor::AdvanceMode a1 = KTextEditor::SmartCursor::ByCharacter;
        KTextEditor::SmartCursor *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi|E", &sipSelf, sipType_KTextEditor_SmartCursor, &sipCpp, &a0, sipType_KTextEditor_SmartCursor_AdvanceMode, &a1))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->KTextEditor::SmartCursor::advance(a0,a1) : sipCpp->advance(a0,a1));
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartCursor, sipName_advance, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartCursor *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartCursor, &sipCpp))
        {
            KTextEditor::SmartCursor::InsertBehavior sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->insertBehavior();
            Py_END_ALLOW_THREADS

            return sipConvertFromEnum(sipRes,sipType_KTextEditor_SmartCursor_InsertBehavior);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartCursor, sipName_insertBehavior, NULL);

    return NULL;
}


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

    {
        KTextEditor::SmartCursor::InsertBehavior a0;
        KTextEditor::SmartCursor *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_KTextEditor_SmartCursor, &sipCpp, sipType_KTextEditor_SmartCursor_InsertBehavior, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->setInsertBehavior(a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartCursor, sipName_setInsertBehavior, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartCursor_hasNotifier(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartCursor_hasNotifier(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::SmartCursor *sipCpp;

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

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartCursor, sipName_hasNotifier);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->hasNotifier();
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartCursor, sipName_hasNotifier, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartCursor_notifier(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartCursor_notifier(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::SmartCursor *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartCursor, &sipCpp))
        {
            KTextEditor::SmartCursorNotifier *sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartCursor, sipName_notifier);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->notifier();
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartCursorNotifier,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartCursor, sipName_notifier, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartCursor_deleteNotifier(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartCursor_deleteNotifier(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::SmartCursor *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartCursor, &sipCpp))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartCursor, sipName_deleteNotifier);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->deleteNotifier();
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartCursor, sipName_deleteNotifier, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartCursor_watcher(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartCursor_watcher(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::SmartCursor *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SmartCursor, &sipCpp))
        {
            KTextEditor::SmartCursorWatcher *sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartCursor, sipName_watcher);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->watcher();
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_KTextEditor_SmartCursorWatcher,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartCursor, sipName_watcher, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SmartCursor_setWatcher(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SmartCursor_setWatcher(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::SmartCursorWatcher * a0 = 0;
        KTextEditor::SmartCursor *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B|J8", &sipSelf, sipType_KTextEditor_SmartCursor, &sipCpp, sipType_KTextEditor_SmartCursorWatcher, &a0))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SmartCursor, sipName_setWatcher);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->setWatcher(a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SmartCursor, sipName_setWatcher, NULL);

    return NULL;
}


/* Cast a pointer to a type somewhere in its superclass hierarchy. */
extern "C" {static void *cast_KTextEditor_SmartCursor(void *, const sipTypeDef *);}
static void *cast_KTextEditor_SmartCursor(void *ptr, const sipTypeDef *targetType)
{
    void *res;

    if (targetType == sipType_KTextEditor_SmartCursor)
        return ptr;

    if ((res = ((const sipClassTypeDef *)sipType_KTextEditor_Cursor)->ctd_cast((KTextEditor::Cursor *)(KTextEditor::SmartCursor *)ptr,targetType)) != NULL)
        return res;

    return NULL;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipKTextEditor_SmartCursor *>(sipCppV);
    else
        delete reinterpret_cast<KTextEditor::SmartCursor *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void dealloc_KTextEditor_SmartCursor(sipSimpleWrapper *);}
static void dealloc_KTextEditor_SmartCursor(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerived(sipSelf))
        reinterpret_cast<sipKTextEditor_SmartCursor *>(sipGetAddress(sipSelf))->sipPySelf = NULL;

    if (sipIsPyOwned(sipSelf))
    {
        release_KTextEditor_SmartCursor(sipGetAddress(sipSelf),sipSelf->flags);
    }
}


extern "C" {static void *init_KTextEditor_SmartCursor(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_KTextEditor_SmartCursor(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    sipKTextEditor_SmartCursor *sipCpp = 0;

    {
        const KTextEditor::Cursor * a0;
        KTextEditor::Document * a1;
        KTextEditor::SmartCursor::InsertBehavior a2;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9J8E", sipType_KTextEditor_Cursor, &a0, sipType_KTextEditor_Document, &a1, sipType_KTextEditor_SmartCursor_InsertBehavior, &a2))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipKTextEditor_SmartCursor(*a0,a1,a2);
            Py_END_ALLOW_THREADS

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return NULL;
}


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


static PyMethodDef methods_KTextEditor_SmartCursor[] = {
    {SIP_MLNAME_CAST(sipName_advance), meth_KTextEditor_SmartCursor_advance, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_atEndOfDocument), meth_KTextEditor_SmartCursor_atEndOfDocument, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_atEndOfLine), meth_KTextEditor_SmartCursor_atEndOfLine, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_character), meth_KTextEditor_SmartCursor_character, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_cursorChangedDirectly), meth_KTextEditor_SmartCursor_cursorChangedDirectly, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_deleteNotifier), meth_KTextEditor_SmartCursor_deleteNotifier, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_document), meth_KTextEditor_SmartCursor_document, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_hasNotifier), meth_KTextEditor_SmartCursor_hasNotifier, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_insertBehavior), meth_KTextEditor_SmartCursor_insertBehavior, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_insertText), meth_KTextEditor_SmartCursor_insertText, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_isSmartCursor), meth_KTextEditor_SmartCursor_isSmartCursor, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_isValid), meth_KTextEditor_SmartCursor_isValid, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_notifier), meth_KTextEditor_SmartCursor_notifier, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setInsertBehavior), meth_KTextEditor_SmartCursor_setInsertBehavior, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setRange), meth_KTextEditor_SmartCursor_setRange, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setWatcher), meth_KTextEditor_SmartCursor_setWatcher, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_smartRange), meth_KTextEditor_SmartCursor_smartRange, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_toSmartCursor), meth_KTextEditor_SmartCursor_toSmartCursor, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_watcher), meth_KTextEditor_SmartCursor_watcher, METH_VARARGS, NULL}
};

static sipEnumMemberDef enummembers_KTextEditor_SmartCursor[] = {
    {sipName_ByCharacter, KTextEditor::SmartCursor::ByCharacter, 41},
    {sipName_ByCursorPosition, KTextEditor::SmartCursor::ByCursorPosition, 41},
    {sipName_MoveOnInsert, KTextEditor::SmartCursor::MoveOnInsert, 42},
    {sipName_StayOnInsert, KTextEditor::SmartCursor::StayOnInsert, 42},
};


pyqt4ClassTypeDef sipTypeDef_ktexteditor_KTextEditor_SmartCursor = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_ABSTRACT|SIP_TYPE_CLASS,
        sipNameNr_KTextEditor__SmartCursor,
        {0}
    },
    {
        sipNameNr_SmartCursor,
        {1, 255, 0},
        19, methods_KTextEditor_SmartCursor,
        4, enummembers_KTextEditor_SmartCursor,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    supers_KTextEditor_SmartCursor,
    0,
    init_KTextEditor_SmartCursor,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KTextEditor_SmartCursor,
    0,
    0,
    0,
    release_KTextEditor_SmartCursor,
    cast_KTextEditor_SmartCursor,
    0,
    0,
    0
},
    0,
    0,
    0
};

#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sessionconfiginterface.sip"
#include <ktexteditor/sessionconfiginterface.h>
#line 5682 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"

#line 32 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kdecore/kconfiggroup.sip"
#include <kconfiggroup.h>
#line 5686 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"


class sipKTextEditor_SessionConfigInterface : public KTextEditor::SessionConfigInterface
{
public:
    sipKTextEditor_SessionConfigInterface();
    virtual ~sipKTextEditor_SessionConfigInterface();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    void readSessionConfig(const KConfigGroup&);
    void writeSessionConfig(KConfigGroup&);

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[2];
};

sipKTextEditor_SessionConfigInterface::sipKTextEditor_SessionConfigInterface(): KTextEditor::SessionConfigInterface(), sipPySelf(0)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipKTextEditor_SessionConfigInterface::~sipKTextEditor_SessionConfigInterface()
{
    sipCommonDtor(sipPySelf);
}

void sipKTextEditor_SessionConfigInterface::readSessionConfig(const KConfigGroup& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[0],sipPySelf,sipName_SessionConfigInterface,sipName_readSessionConfig);

    if (!sipMeth)
        return;

    typedef void (*sipVH_kdeui_66)(sip_gilstate_t,PyObject *,const KConfigGroup&);

    ((sipVH_kdeui_66)(sipModuleAPI_ktexteditor_kdeui->em_virthandlers[66]))(sipGILState,sipMeth,a0);
}

void sipKTextEditor_SessionConfigInterface::writeSessionConfig(KConfigGroup& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[1],sipPySelf,sipName_SessionConfigInterface,sipName_writeSessionConfig);

    if (!sipMeth)
        return;

    typedef void (*sipVH_kdeui_67)(sip_gilstate_t,PyObject *,KConfigGroup&);

    ((sipVH_kdeui_67)(sipModuleAPI_ktexteditor_kdeui->em_virthandlers[67]))(sipGILState,sipMeth,a0);
}


extern "C" {static PyObject *meth_KTextEditor_SessionConfigInterface_readSessionConfig(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SessionConfigInterface_readSessionConfig(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        const KConfigGroup * a0;
        KTextEditor::SessionConfigInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_KTextEditor_SessionConfigInterface, &sipCpp, sipType_KConfigGroup, &a0))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SessionConfigInterface, sipName_readSessionConfig);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->readSessionConfig(*a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SessionConfigInterface, sipName_readSessionConfig, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SessionConfigInterface_writeSessionConfig(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SessionConfigInterface_writeSessionConfig(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KConfigGroup * a0;
        KTextEditor::SessionConfigInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_KTextEditor_SessionConfigInterface, &sipCpp, sipType_KConfigGroup, &a0))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SessionConfigInterface, sipName_writeSessionConfig);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipCpp->writeSessionConfig(*a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SessionConfigInterface, sipName_writeSessionConfig, NULL);

    return NULL;
}


/* Cast a pointer to a type somewhere in its superclass hierarchy. */
extern "C" {static void *cast_KTextEditor_SessionConfigInterface(void *, const sipTypeDef *);}
static void *cast_KTextEditor_SessionConfigInterface(void *ptr, const sipTypeDef *targetType)
{
    if (targetType == sipType_KTextEditor_SessionConfigInterface)
        return ptr;

    return NULL;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipKTextEditor_SessionConfigInterface *>(sipCppV);
    else
        delete reinterpret_cast<KTextEditor::SessionConfigInterface *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void dealloc_KTextEditor_SessionConfigInterface(sipSimpleWrapper *);}
static void dealloc_KTextEditor_SessionConfigInterface(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerived(sipSelf))
        reinterpret_cast<sipKTextEditor_SessionConfigInterface *>(sipGetAddress(sipSelf))->sipPySelf = NULL;

    if (sipIsPyOwned(sipSelf))
    {
        release_KTextEditor_SessionConfigInterface(sipGetAddress(sipSelf),sipSelf->flags);
    }
}


extern "C" {static void *init_KTextEditor_SessionConfigInterface(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_KTextEditor_SessionConfigInterface(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    sipKTextEditor_SessionConfigInterface *sipCpp = 0;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, ""))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipKTextEditor_SessionConfigInterface();
            Py_END_ALLOW_THREADS

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return NULL;
}


static PyMethodDef methods_KTextEditor_SessionConfigInterface[] = {
    {SIP_MLNAME_CAST(sipName_readSessionConfig), meth_KTextEditor_SessionConfigInterface_readSessionConfig, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_writeSessionConfig), meth_KTextEditor_SessionConfigInterface_writeSessionConfig, METH_VARARGS, NULL}
};


pyqt4ClassTypeDef sipTypeDef_ktexteditor_KTextEditor_SessionConfigInterface = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_ABSTRACT|SIP_TYPE_CLASS,
        sipNameNr_KTextEditor__SessionConfigInterface,
        {0}
    },
    {
        sipNameNr_SessionConfigInterface,
        {1, 255, 0},
        2, methods_KTextEditor_SessionConfigInterface,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    sipNameNr_PyQt4_QtCore_pyqtWrapperType,
    -1,
    0,
    0,
    init_KTextEditor_SessionConfigInterface,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KTextEditor_SessionConfigInterface,
    0,
    0,
    0,
    release_KTextEditor_SessionConfigInterface,
    cast_KTextEditor_SessionConfigInterface,
    0,
    0,
    0
},
    0,
    0,
    0
};

#line 52 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/searchinterface.sip"
#include <ktexteditor/searchinterface.h>
#line 5941 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"

#line 33 "/usr/local/share/py-sip/QtCore/qvector.sip"
#include <qvector.h>
#line 5945 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 30 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/range.sip"
#include <ktexteditor/range.h>
#line 5948 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"
#line 36 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 5951 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/ktexteditor/sipktexteditorpart2.cpp"


class sipKTextEditor_SearchInterface : public KTextEditor::SearchInterface
{
public:
    sipKTextEditor_SearchInterface();
    virtual ~sipKTextEditor_SearchInterface();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    QVector<KTextEditor::Range> searchText(const KTextEditor::Range&,const QString&,const KTextEditor::Search::SearchOptions);
    KTextEditor::Search::SearchOptions supportedSearchOptions() const;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[2];
};

sipKTextEditor_SearchInterface::sipKTextEditor_SearchInterface(): KTextEditor::SearchInterface(), sipPySelf(0)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipKTextEditor_SearchInterface::~sipKTextEditor_SearchInterface()
{
    sipCommonDtor(sipPySelf);
}

QVector<KTextEditor::Range> sipKTextEditor_SearchInterface::searchText(const KTextEditor::Range& a0,const QString& a1,const KTextEditor::Search::SearchOptions a2)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[0],sipPySelf,sipName_SearchInterface,sipName_searchText);

    if (!sipMeth)
        return QVector<KTextEditor::Range>();

    extern QVector<KTextEditor::Range> sipVH_ktexteditor_38(sip_gilstate_t,PyObject *,const KTextEditor::Range&,const QString&,const KTextEditor::Search::SearchOptions);

    return sipVH_ktexteditor_38(sipGILState,sipMeth,a0,a1,a2);
}

KTextEditor::Search::SearchOptions sipKTextEditor_SearchInterface::supportedSearchOptions() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[1]),sipPySelf,sipName_SearchInterface,sipName_supportedSearchOptions);

    if (!sipMeth)
        return KTextEditor::Search::SearchOptions();

    extern KTextEditor::Search::SearchOptions sipVH_ktexteditor_37(sip_gilstate_t,PyObject *);

    return sipVH_ktexteditor_37(sipGILState,sipMeth);
}


extern "C" {static PyObject *meth_KTextEditor_SearchInterface_searchText(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SearchInterface_searchText(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        const KTextEditor::Range * a0;
        const QString * a1;
        int a1State = 0;
        const KTextEditor::Search::SearchOptions a2def = KTextEditor::Search::Default;
        const KTextEditor::Search::SearchOptions * a2 = &a2def;
        int a2State = 0;
        KTextEditor::SearchInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9J1|J1", &sipSelf, sipType_KTextEditor_SearchInterface, &sipCpp, sipType_KTextEditor_Range, &a0, sipType_QString,&a1, &a1State, sipType_KTextEditor_Search_SearchOptions, &a2, &a2State))
        {
            QVector<KTextEditor::Range> *sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SearchInterface, sipName_searchText);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QVector<KTextEditor::Range>(sipCpp->searchText(*a0,*a1,*a2));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a1),sipType_QString,a1State);
            sipReleaseType(const_cast<KTextEditor::Search::SearchOptions *>(a2),sipType_KTextEditor_Search_SearchOptions,a2State);

            return sipConvertFromNewType(sipRes,sipType_QVector_0100KTextEditor_Range,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SearchInterface, sipName_searchText, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_KTextEditor_SearchInterface_supportedSearchOptions(PyObject *, PyObject *);}
static PyObject *meth_KTextEditor_SearchInterface_supportedSearchOptions(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        KTextEditor::SearchInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTextEditor_SearchInterface, &sipCpp))
        {
            KTextEditor::Search::SearchOptions *sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_SearchInterface, sipName_supportedSearchOptions);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipRes = new KTextEditor::Search::SearchOptions(sipCpp->supportedSearchOptions());
            Py_END_ALLOW_THREADS

            return sipConvertFromNewType(sipRes,sipType_KTextEditor_Search_SearchOptions,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_SearchInterface, sipName_supportedSearchOptions, NULL);

    return NULL;
}


/* Cast a pointer to a type somewhere in its superclass hierarchy. */
extern "C" {static void *cast_KTextEditor_SearchInterface(void *, const sipTypeDef *);}
static void *cast_KTextEditor_SearchInterface(void *ptr, const sipTypeDef *targetType)
{
    if (targetType == sipType_KTextEditor_SearchInterface)
        return ptr;

    return NULL;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipKTextEditor_SearchInterface *>(sipCppV);
    else
        delete reinterpret_cast<KTextEditor::SearchInterface *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void dealloc_KTextEditor_SearchInterface(sipSimpleWrapper *);}
static void dealloc_KTextEditor_SearchInterface(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerived(sipSelf))
        reinterpret_cast<sipKTextEditor_SearchInterface *>(sipGetAddress(sipSelf))->sipPySelf = NULL;

    if (sipIsPyOwned(sipSelf))
    {
        release_KTextEditor_SearchInterface(sipGetAddress(sipSelf),sipSelf->flags);
    }
}


extern "C" {static void *init_KTextEditor_SearchInterface(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_KTextEditor_SearchInterface(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    sipKTextEditor_SearchInterface *sipCpp = 0;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, ""))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipKTextEditor_SearchInterface();
            Py_END_ALLOW_THREADS

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return NULL;
}


static PyMethodDef methods_KTextEditor_SearchInterface[] = {
    {SIP_MLNAME_CAST(sipName_searchText), meth_KTextEditor_SearchInterface_searchText, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_supportedSearchOptions), meth_KTextEditor_SearchInterface_supportedSearchOptions, METH_VARARGS, NULL}
};


pyqt4ClassTypeDef sipTypeDef_ktexteditor_KTextEditor_SearchInterface = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_ABSTRACT|SIP_TYPE_CLASS,
        sipNameNr_KTextEditor__SearchInterface,
        {0}
    },
    {
        sipNameNr_SearchInterface,
        {1, 255, 0},
        2, methods_KTextEditor_SearchInterface,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    sipNameNr_PyQt4_QtCore_pyqtWrapperType,
    -1,
    0,
    0,
    init_KTextEditor_SearchInterface,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KTextEditor_SearchInterface,
    0,
    0,
    0,
    release_KTextEditor_SearchInterface,
    cast_KTextEditor_SearchInterface,
    0,
    0,
    0
},
    0,
    0,
    0
};
