/*
 * Module code.
 *
 * Generated by SIP 4.18.1
 */

#include "sipAPIkparts.h"

#line 47 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/src/pykde4-4.14.3/sip/kparts/browserextension.sip"
#include <kparts/browserextension.h>
#line 12 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"

#line 31 "/usr/share/python3-sip/PyQt4/QtCore/qstringlist.sip"
#include <qstringlist.h>
#line 16 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"
#line 31 "/usr/share/python3-sip/PyQt4/QtCore/qstring.sip"
#include <qstring.h>
#line 19 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"
#line 32 "/usr/share/python3-sip/PyQt4/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 22 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"


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


    Py_END_ALLOW_THREADS
}


extern "C" {static void *init_type_KParts_BrowserArguments(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_KParts_BrowserArguments(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    KParts::BrowserArguments *sipCpp = 0;

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

            return sipCpp;
        }
    }

    {
        const KParts::BrowserArguments* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_KParts_BrowserArguments, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new KParts::BrowserArguments(*a0);
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    return NULL;
}


extern "C" {static PyObject *varget_KParts_BrowserArguments_docState(void *, PyObject *, PyObject *);}
static PyObject *varget_KParts_BrowserArguments_docState(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
    QStringList*sipVal;
    KParts::BrowserArguments *sipCpp = reinterpret_cast<KParts::BrowserArguments *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -9);
    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->docState;

    sipPy = sipConvertFromType(sipVal, sipType_QStringList, NULL);
    sipKeepReference(sipPySelf, -9, sipPy);

    return sipPy;
}


extern "C" {static int varset_KParts_BrowserArguments_docState(void *, PyObject *, PyObject *);}
static int varset_KParts_BrowserArguments_docState(void *sipSelf, PyObject *sipPy, PyObject *)
{
    QStringList*sipVal;
    KParts::BrowserArguments *sipCpp = reinterpret_cast<KParts::BrowserArguments *>(sipSelf);

    int sipValState;
    int sipIsErr = 0;

    sipVal = reinterpret_cast<QStringList *>(sipForceConvertToType(sipPy,sipType_QStringList,NULL,SIP_NOT_NONE,&sipValState,&sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->docState = *sipVal;

    sipReleaseType(sipVal, sipType_QStringList, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_KParts_BrowserArguments_frameName(void *, PyObject *, PyObject *);}
static PyObject *varget_KParts_BrowserArguments_frameName(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
    QString*sipVal;
    KParts::BrowserArguments *sipCpp = reinterpret_cast<KParts::BrowserArguments *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -10);
    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->frameName;

    sipPy = sipConvertFromType(sipVal, sipType_QString, NULL);
    sipKeepReference(sipPySelf, -10, sipPy);

    return sipPy;
}


extern "C" {static int varset_KParts_BrowserArguments_frameName(void *, PyObject *, PyObject *);}
static int varset_KParts_BrowserArguments_frameName(void *sipSelf, PyObject *sipPy, PyObject *)
{
    QString*sipVal;
    KParts::BrowserArguments *sipCpp = reinterpret_cast<KParts::BrowserArguments *>(sipSelf);

    int sipValState;
    int sipIsErr = 0;

    sipVal = reinterpret_cast<QString *>(sipForceConvertToType(sipPy,sipType_QString,NULL,SIP_NOT_NONE,&sipValState,&sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->frameName = *sipVal;

    sipReleaseType(sipVal, sipType_QString, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_KParts_BrowserArguments_postData(void *, PyObject *, PyObject *);}
static PyObject *varget_KParts_BrowserArguments_postData(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
    QByteArray*sipVal;
    KParts::BrowserArguments *sipCpp = reinterpret_cast<KParts::BrowserArguments *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -11);
    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->postData;

    sipPy = sipConvertFromType(sipVal, sipType_QByteArray, NULL);
    sipKeepReference(sipPySelf, -11, sipPy);

    return sipPy;
}


extern "C" {static int varset_KParts_BrowserArguments_postData(void *, PyObject *, PyObject *);}
static int varset_KParts_BrowserArguments_postData(void *sipSelf, PyObject *sipPy, PyObject *)
{
    QByteArray*sipVal;
    KParts::BrowserArguments *sipCpp = reinterpret_cast<KParts::BrowserArguments *>(sipSelf);

    int sipValState;
    int sipIsErr = 0;

    sipVal = reinterpret_cast<QByteArray *>(sipForceConvertToType(sipPy,sipType_QByteArray,NULL,SIP_NOT_NONE,&sipValState,&sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->postData = *sipVal;

    sipReleaseType(sipVal, sipType_QByteArray, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_KParts_BrowserArguments_softReload(void *, PyObject *, PyObject *);}
static PyObject *varget_KParts_BrowserArguments_softReload(void *sipSelf, PyObject *, PyObject *)
{
    bool sipVal;
    KParts::BrowserArguments *sipCpp = reinterpret_cast<KParts::BrowserArguments *>(sipSelf);

    sipVal = sipCpp->softReload;

    return PyBool_FromLong(sipVal);
}


extern "C" {static int varset_KParts_BrowserArguments_softReload(void *, PyObject *, PyObject *);}
static int varset_KParts_BrowserArguments_softReload(void *sipSelf, PyObject *sipPy, PyObject *)
{
    bool sipVal;
    KParts::BrowserArguments *sipCpp = reinterpret_cast<KParts::BrowserArguments *>(sipSelf);

    sipVal = (bool)SIPLong_AsLong(sipPy);

    if (PyErr_Occurred() != NULL)
        return -1;

    sipCpp->softReload = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_KParts_BrowserArguments_trustedSource(void *, PyObject *, PyObject *);}
static PyObject *varget_KParts_BrowserArguments_trustedSource(void *sipSelf, PyObject *, PyObject *)
{
    bool sipVal;
    KParts::BrowserArguments *sipCpp = reinterpret_cast<KParts::BrowserArguments *>(sipSelf);

    sipVal = sipCpp->trustedSource;

    return PyBool_FromLong(sipVal);
}


extern "C" {static int varset_KParts_BrowserArguments_trustedSource(void *, PyObject *, PyObject *);}
static int varset_KParts_BrowserArguments_trustedSource(void *sipSelf, PyObject *sipPy, PyObject *)
{
    bool sipVal;
    KParts::BrowserArguments *sipCpp = reinterpret_cast<KParts::BrowserArguments *>(sipSelf);

    sipVal = (bool)SIPLong_AsLong(sipPy);

    if (PyErr_Occurred() != NULL)
        return -1;

    sipCpp->trustedSource = sipVal;

    return 0;
}

sipVariableDef variables_KParts_BrowserArguments[] = {
    {InstanceVariable, sipName_docState, (PyMethodDef *)varget_KParts_BrowserArguments_docState, (PyMethodDef *)varset_KParts_BrowserArguments_docState, NULL, NULL},
    {InstanceVariable, sipName_frameName, (PyMethodDef *)varget_KParts_BrowserArguments_frameName, (PyMethodDef *)varset_KParts_BrowserArguments_frameName, NULL, NULL},
    {InstanceVariable, sipName_postData, (PyMethodDef *)varget_KParts_BrowserArguments_postData, (PyMethodDef *)varset_KParts_BrowserArguments_postData, NULL, NULL},
    {InstanceVariable, sipName_softReload, (PyMethodDef *)varget_KParts_BrowserArguments_softReload, (PyMethodDef *)varset_KParts_BrowserArguments_softReload, NULL, NULL},
    {InstanceVariable, sipName_trustedSource, (PyMethodDef *)varget_KParts_BrowserArguments_trustedSource, (PyMethodDef *)varset_KParts_BrowserArguments_trustedSource, NULL, NULL},
};


pyqt4ClassTypeDef sipTypeDef_kparts_KParts_BrowserArguments = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_CLASS,
        sipNameNr_KParts__BrowserArguments,
        {0}
    },
    {
        sipNameNr_BrowserArguments,
        {0, 255, 0},
        0, 0,
        0, 0,
        5, variables_KParts_BrowserArguments,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    sipNameNr_PyQt4_QtCore_pyqtWrapperType,
    -1,
    0,
    0,
    init_type_KParts_BrowserArguments,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    0,
    0,
    0,
    0,
    release_KParts_BrowserArguments,
    0,
    0,
    0,
    0,
    0,
    0,
    0
},
    0,
    0,
    0
};

#line 28 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/src/pykde4-4.14.3/sip/kparts/factory.sip"
#include <kparts/factory.h>
#line 316 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"

#line 29 "/usr/share/python3-sip/PyQt4/QtCore/qobject.sip"
#include <qobject.h>
#line 320 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"
#line 66 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/src/pykde4-4.14.3/sip/kparts/part.sip"
#include <kparts/part.h>
#line 323 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"
#line 32 "/usr/share/python3-sip/PyQt4/QtGui/qwidget.sip"
#include <qwidget.h>
#line 326 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"
#line 31 "/usr/share/python3-sip/PyQt4/QtCore/qstringlist.sip"
#include <qstringlist.h>
#line 329 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"
#line 26 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/src/pykde4-4.14.3/sip/kdecore/kcomponentdata.sip"
#include <kcomponentdata.h>
#line 332 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"
#line 31 "/usr/share/python3-sip/PyQt4/QtCore/qstring.sip"
#include <qstring.h>
#line 335 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"
#line 28 "/usr/share/python3-sip/PyQt4/QtCore/qlist.sip"
#include <qlist.h>
#line 338 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"
#line 30 "/usr/share/python3-sip/PyQt4/QtCore/qvariant.sip"
#include <qvariant.h>
#line 341 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"
#line 269 "/usr/share/python3-sip/PyQt4/QtCore/qvariant.sip"
#include <qvariant.h>
#line 344 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"
#line 26 "/usr/share/python3-sip/PyQt4/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 347 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"
#line 368 "/usr/share/python3-sip/PyQt4/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 350 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"
#line 351 "/usr/share/python3-sip/PyQt4/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 353 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"
#line 28 "/usr/share/python3-sip/PyQt4/QtCore/qlist.sip"
#include <qlist.h>
#line 356 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"
#line 32 "/usr/share/python3-sip/PyQt4/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 359 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"
#line 30 "/usr/share/python3-sip/PyQt4/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 362 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"
#line 115 "/usr/share/python3-sip/PyQt4/QtCore/qlist.sip"
#include <qlist.h>
#line 365 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"
#line 26 "/usr/share/python3-sip/PyQt4/QtCore/qthread.sip"
#include <qthread.h>
#line 368 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"
#line 30 "/usr/share/python3-sip/PyQt4/QtCore/qregexp.sip"
#include <qregexp.h>
#line 371 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"
#line 26 "/usr/share/python3-sip/PyQt4/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 374 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kparts/sipkpartspart7.cpp"


class sipKParts_Factory : public KParts::Factory
{
public:
    sipKParts_Factory(QObject*);
    virtual ~sipKParts_Factory();

    int qt_metacall(QMetaObject::Call,int,void **);
    void *qt_metacast(const char *);
    const QMetaObject *metaObject() const;

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    void disconnectNotify(const char*);
    void connectNotify(const char*);
    void customEvent(QEvent*);
    void childEvent(QChildEvent*);
    void timerEvent(QTimerEvent*);
    bool eventFilter(QObject*,QEvent*);
    bool event(QEvent*);
    QObject* create(const char*,QWidget*,QObject*,const QVariantList&,const QString&);
    QObject* createObject(QObject*,const char*,const QStringList&);
    void setupTranslations();
    KParts::Part* createPartObject(QWidget*,QObject*,const char*,const QStringList&);
    KComponentData partComponentData();

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[12];
};

sipKParts_Factory::sipKParts_Factory(QObject*a0): KParts::Factory(a0), sipPySelf(0)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

const QMetaObject *sipKParts_Factory::metaObject() const
{
    return sip_kparts_qt_metaobject(sipPySelf,sipType_KParts_Factory);
}

int sipKParts_Factory::qt_metacall(QMetaObject::Call _c,int _id,void **_a)
{
    _id = KParts::Factory::qt_metacall(_c,_id,_a);

    if (_id >= 0)
        _id = sip_kparts_qt_metacall(sipPySelf,sipType_KParts_Factory,_c,_id,_a);

    return _id;
}

void *sipKParts_Factory::qt_metacast(const char *_clname)
{
    return (sip_kparts_qt_metacast(sipPySelf, sipType_KParts_Factory, _clname)) ? this : KParts::Factory::qt_metacast(_clname);
}

void sipKParts_Factory::disconnectNotify(const char*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[0],sipPySelf,NULL,sipName_disconnectNotify);

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

    typedef void (*sipVH_QtCore_24)(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const char*);

    ((sipVH_QtCore_24)(sipModuleAPI_kparts_QtCore->em_virthandlers[24]))(sipGILState, 0, sipPySelf, sipMeth, a0);
}

void sipKParts_Factory::connectNotify(const char*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[1],sipPySelf,NULL,sipName_connectNotify);

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

    typedef void (*sipVH_QtCore_24)(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const char*);

    ((sipVH_QtCore_24)(sipModuleAPI_kparts_QtCore->em_virthandlers[24]))(sipGILState, 0, sipPySelf, sipMeth, a0);
}

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

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

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

    typedef void (*sipVH_QtCore_17)(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, QEvent*);

    ((sipVH_QtCore_17)(sipModuleAPI_kparts_QtCore->em_virthandlers[17]))(sipGILState, 0, sipPySelf, sipMeth, a0);
}

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

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

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

    typedef void (*sipVH_QtCore_25)(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, QChildEvent*);

    ((sipVH_QtCore_25)(sipModuleAPI_kparts_QtCore->em_virthandlers[25]))(sipGILState, 0, sipPySelf, sipMeth, a0);
}

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

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

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

    typedef void (*sipVH_QtCore_9)(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, QTimerEvent*);

    ((sipVH_QtCore_9)(sipModuleAPI_kparts_QtCore->em_virthandlers[9]))(sipGILState, 0, sipPySelf, sipMeth, a0);
}

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

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

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

    typedef bool (*sipVH_QtCore_18)(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, QObject*,QEvent*);

    return ((sipVH_QtCore_18)(sipModuleAPI_kparts_QtCore->em_virthandlers[18]))(sipGILState, 0, sipPySelf, sipMeth, a0, a1);
}

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

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

    if (!sipMeth)
        return KParts::Factory::event(a0);

    typedef bool (*sipVH_QtCore_5)(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, QEvent*);

    return ((sipVH_QtCore_5)(sipModuleAPI_kparts_QtCore->em_virthandlers[5]))(sipGILState, 0, sipPySelf, sipMeth, a0);
}

QObject* sipKParts_Factory::create(const char*a0,QWidget*a1,QObject*a2,const QVariantList& a3,const QString& a4)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return KParts::Factory::create(a0,a1,a2,a3,a4);

    typedef QObject* (*sipVH_kdecore_16)(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const char*,QWidget*,QObject*,const QList<QVariant>&,const QString&);

    return ((sipVH_kdecore_16)(sipModuleAPI_kparts_kdecore->em_virthandlers[16]))(sipGILState, 0, sipPySelf, sipMeth, a0, a1, a2, a3, a4);
}

QObject* sipKParts_Factory::createObject(QObject*a0,const char*a1,const QStringList& a2)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return KParts::Factory::createObject(a0,a1,a2);

    typedef QObject* (*sipVH_kdecore_17)(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, QObject*,const char*,const QStringList&);

    return ((sipVH_kdecore_17)(sipModuleAPI_kparts_kdecore->em_virthandlers[17]))(sipGILState, 0, sipPySelf, sipMeth, a0, a1, a2);
}

void sipKParts_Factory::setupTranslations()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
        KParts::Factory::setupTranslations();
        return;
    }

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

    ((sipVH_QtCore_11)(sipModuleAPI_kparts_QtCore->em_virthandlers[11]))(sipGILState, 0, sipPySelf, sipMeth);
}

KParts::Part* sipKParts_Factory::createPartObject(QWidget*a0,QObject*a1,const char*a2,const QStringList& a3)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[10],sipPySelf,sipName_Factory,sipName_createPartObject);

    if (!sipMeth)
        return 0;

    extern KParts::Part* sipVH_kparts_30(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, QWidget*,QObject*,const char*,const QStringList&);

    return sipVH_kparts_30(sipGILState, 0, sipPySelf, sipMeth, a0, a1, a2, a3);
}

KComponentData sipKParts_Factory::partComponentData()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[11],sipPySelf,NULL,sipName_partComponentData);

    if (!sipMeth)
        return KParts::Factory::partComponentData();

    typedef KComponentData (*sipVH_kdeui_19)(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return ((sipVH_kdeui_19)(sipModuleAPI_kparts_kdeui->em_virthandlers[19]))(sipGILState, 0, sipPySelf, sipMeth);
}


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

    {
        QWidget* a0 = 0;
        QObject* a1 = 0;
        const char* a2 = "KParts::Part";
        PyObject *a2Keep = 0;
        const QStringList& a3def = QStringList();
        const QStringList* a3 = &a3def;
        int a3State = 0;
        KParts::Factory *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B|J8J:AAJ1", &sipSelf, sipType_KParts_Factory, &sipCpp, sipType_QWidget, &a0, sipType_QObject, &a1, &a2Keep, &a2, sipType_QStringList,&a3, &a3State))
        {
            KParts::Part*sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->createPart(a0,a1,a2,*a3);
            Py_END_ALLOW_THREADS
            Py_XDECREF(a2Keep);
            sipReleaseType(const_cast<QStringList *>(a3),sipType_QStringList,a3State);

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

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

    return NULL;
}


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

    {
        KParts::Factory *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = new KComponentData((sipSelfWasArg ? sipCpp->KParts::Factory::partComponentData() : sipCpp->partComponentData()));
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        const QString* a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J1", sipType_QString,&a0, &a0State))
        {
            KComponentData*sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new KComponentData(KParts::Factory::partComponentDataFromLibrary(*a0));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a0),sipType_QString,a0State);

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

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

    return NULL;
}


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

    {
        QWidget* a0 = 0;
        QObject* a1 = 0;
        const char* a2 = "KParts::Part";
        PyObject *a2Keep = 0;
        const QStringList& a3def = QStringList();
        const QStringList* a3 = &a3def;
        int a3State = 0;
        KParts::Factory *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "p|J8J:AAJ1", &sipSelf, sipType_KParts_Factory, &sipCpp, sipType_QWidget, &a0, sipType_QObject, &a1, &a2Keep, &a2, sipType_QStringList,&a3, &a3State))
        {
            KParts::Part*sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_Factory, sipName_createPartObject);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->createPartObject(a0,a1,a2,*a3);
            Py_END_ALLOW_THREADS
            Py_XDECREF(a2Keep);
            sipReleaseType(const_cast<QStringList *>(a3),sipType_QStringList,a3State);

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

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

    return NULL;
}


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

    Py_BEGIN_ALLOW_THREADS

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

    Py_END_ALLOW_THREADS
}


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

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


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

    {
        QObject* a0 = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "|JH", sipType_QObject, &a0, sipOwner))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipKParts_Factory(a0);
            Py_END_ALLOW_THREADS

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return NULL;
}


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


static PyMethodDef methods_KParts_Factory[] = {
    {SIP_MLNAME_CAST(sipName_createPart), meth_KParts_Factory_createPart, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_createPartObject), meth_KParts_Factory_createPartObject, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_partComponentData), meth_KParts_Factory_partComponentData, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_partComponentDataFromLibrary), meth_KParts_Factory_partComponentDataFromLibrary, METH_VARARGS, NULL}
};


pyqt4ClassTypeDef sipTypeDef_kparts_KParts_Factory = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_KParts__Factory,
        {0}
    },
    {
        sipNameNr_Factory,
        {0, 255, 0},
        4, methods_KParts_Factory,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    supers_KParts_Factory,
    0,
    init_type_KParts_Factory,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KParts_Factory,
    0,
    0,
    0,
    release_KParts_Factory,
    0,
    0,
    0,
    0,
    0,
    0,
    0
},
    &KParts::Factory::staticMetaObject,
    0,
    0
};




pyqt4ClassTypeDef sipTypeDef_kparts_KParts = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_NAMESPACE,
        sipNameNr_KParts,
        {0}
    },
    {
        sipNameNr_KParts,
        {0, 0, 1},
        0, 0,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    0,
    0,
    0,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0
},
    0,
    0,
    0
};
