/*
 * Module code.
 *
 * Generated by SIP 4.12.4 on Fri Dec 30 00:38:33 2011
 */

#include "sipAPIkparts.h"

#line 28 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/factory.sip"
#include <kparts/factory.h>
#line 12 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/sipkpartspart7.cpp"

#line 34 "/usr/local/share/py-sip/QtCore/qobject.sip"
#include <qobject.h>
#line 16 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/sipkpartspart7.cpp"
#line 66 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/part.sip"
#include <kparts/part.h>
#line 19 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/sipkpartspart7.cpp"
#line 35 "/usr/local/share/py-sip/QtGui/qwidget.sip"
#include <qwidget.h>
#line 22 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/sipkpartspart7.cpp"
#line 36 "/usr/local/share/py-sip/QtCore/qstringlist.sip"
#include <qstringlist.h>
#line 25 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/sipkpartspart7.cpp"
#line 26 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kdecore/kcomponentdata.sip"
#include <kcomponentdata.h>
#line 28 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/sipkpartspart7.cpp"
#line 36 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 31 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/sipkpartspart7.cpp"
#line 33 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 34 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/sipkpartspart7.cpp"
#line 35 "/usr/local/share/py-sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 37 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/sipkpartspart7.cpp"
#line 238 "/usr/local/share/py-sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 40 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/sipkpartspart7.cpp"
#line 31 "/usr/local/share/py-sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 43 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/sipkpartspart7.cpp"
#line 310 "/usr/local/share/py-sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 46 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/sipkpartspart7.cpp"
#line 298 "/usr/local/share/py-sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 49 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/sipkpartspart7.cpp"
#line 33 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 52 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/sipkpartspart7.cpp"
#line 37 "/usr/local/share/py-sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 55 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/sipkpartspart7.cpp"
#line 35 "/usr/local/share/py-sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 58 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/sipkpartspart7.cpp"
#line 120 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 61 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/sipkpartspart7.cpp"
#line 31 "/usr/local/share/py-sip/QtCore/qthread.sip"
#include <qthread.h>
#line 64 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/sipkpartspart7.cpp"
#line 35 "/usr/local/share/py-sip/QtCore/qregexp.sip"
#include <qregexp.h>
#line 67 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/sipkpartspart7.cpp"
#line 31 "/usr/local/share/py-sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 70 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/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 public method for every protected method visible from
     * this class.
     */
    QObject * sipProtect_sender() const;
    int sipProtect_receivers(const char *) const;
    void sipProtectVirt_timerEvent(bool,QTimerEvent *);
    void sipProtectVirt_childEvent(bool,QChildEvent *);
    void sipProtectVirt_customEvent(bool,QEvent *);
    void sipProtectVirt_connectNotify(bool,const char *);
    void sipProtectVirt_disconnectNotify(bool,const char *);
    QObject * sipProtectVirt_create(bool,const char *,QWidget *,QObject *,const QVariantList&,const QString&);
    QVariantList sipProtect_stringListToVariantList(const QStringList&);
    QStringList sipProtect_variantListToStringList(const QVariantList&);
    void sipProtectVirt_setupTranslations(bool);
    QObject * sipProtectVirt_createObject(bool,QObject *,const char *,const QStringList&);
    void sipProtect_setComponentData(const KComponentData&);
    KParts::Part * sipProtect_createPartObject(QWidget *,QObject *,const char *,const QStringList&);

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

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 && sip_kparts_qt_metacast(sipPySelf,sipType_KParts_Factory,_clname)) ? this : KParts::Factory::qt_metacast(_clname);
}

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

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

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

    typedef KComponentData (*sipVH_kdeui_18)(sip_gilstate_t,PyObject *);

    return ((sipVH_kdeui_18)(sipModuleAPI_kparts_kdeui->em_virthandlers[18]))(sipGILState,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[1],sipPySelf,sipName_Factory,sipName_createPartObject);

    if (!sipMeth)
        return 0;

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

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

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

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

    if (!sipMeth)
    {
        KPluginFactory::setupTranslations();
        return;
    }

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

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

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

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

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

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

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

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[4],sipPySelf,NULL,sipName_create);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

QObject * sipKParts_Factory::sipProtect_sender() const
{
    return QObject::sender();
}

int sipKParts_Factory::sipProtect_receivers(const char *a0) const
{
    return QObject::receivers(a0);
}

void sipKParts_Factory::sipProtectVirt_timerEvent(bool sipSelfWasArg,QTimerEvent *a0)
{
    (sipSelfWasArg ? QObject::timerEvent(a0) : timerEvent(a0));
}

void sipKParts_Factory::sipProtectVirt_childEvent(bool sipSelfWasArg,QChildEvent *a0)
{
    (sipSelfWasArg ? QObject::childEvent(a0) : childEvent(a0));
}

void sipKParts_Factory::sipProtectVirt_customEvent(bool sipSelfWasArg,QEvent *a0)
{
    (sipSelfWasArg ? QObject::customEvent(a0) : customEvent(a0));
}

void sipKParts_Factory::sipProtectVirt_connectNotify(bool sipSelfWasArg,const char *a0)
{
    (sipSelfWasArg ? QObject::connectNotify(a0) : connectNotify(a0));
}

void sipKParts_Factory::sipProtectVirt_disconnectNotify(bool sipSelfWasArg,const char *a0)
{
    (sipSelfWasArg ? QObject::disconnectNotify(a0) : disconnectNotify(a0));
}

QObject * sipKParts_Factory::sipProtectVirt_create(bool sipSelfWasArg,const char *a0,QWidget *a1,QObject *a2,const QVariantList& a3,const QString& a4)
{
    return (sipSelfWasArg ? KPluginFactory::create(a0,a1,a2,a3,a4) : create(a0,a1,a2,a3,a4));
}

QVariantList sipKParts_Factory::sipProtect_stringListToVariantList(const QStringList& a0)
{
    return KPluginFactory::stringListToVariantList(a0);
}

QStringList sipKParts_Factory::sipProtect_variantListToStringList(const QVariantList& a0)
{
    return KPluginFactory::variantListToStringList(a0);
}

void sipKParts_Factory::sipProtectVirt_setupTranslations(bool sipSelfWasArg)
{
    (sipSelfWasArg ? KPluginFactory::setupTranslations() : setupTranslations());
}

QObject * sipKParts_Factory::sipProtectVirt_createObject(bool sipSelfWasArg,QObject *a0,const char *a1,const QStringList& a2)
{
    return (sipSelfWasArg ? KPluginFactory::createObject(a0,a1,a2) : createObject(a0,a1,a2));
}

void sipKParts_Factory::sipProtect_setComponentData(const KComponentData& a0)
{
    KPluginFactory::setComponentData(a0);
}

KParts::Part * sipKParts_Factory::sipProtect_createPartObject(QWidget *a0,QObject *a1,const char *a2,const QStringList& a3)
{
    return createPartObject(a0,a1,a2,a3);
}


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

    {
        sipKParts_Factory *sipCpp;

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

#line 632 "/usr/local/share/py-sip/QtCore/qobject.sip"
        typedef QObject *(*helper_func)(QObject *);
        
        static helper_func helper = 0;
        
        if (!helper)
            helper = (helper_func)sipImportSymbol("qpycore_qobject_sender");
        
        if (helper)
        #if defined(SIP_PROTECTED_IS_PUBLIC)
            sipRes = helper(sipCpp->sender());
        #else
            sipRes = helper(sipCpp->sipProtect_sender());
        #endif
#line 455 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/sipkpartspart7.cpp"

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

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

    return NULL;
}


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

    {
        char * a0;
        sipKParts_Factory *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BG", &sipSelf, sipType_KParts_Factory, &sipCpp, &a0))
        {
            int sipRes = 0;

#line 649 "/usr/local/share/py-sip/QtCore/qobject.sip"
        // We need to take into account any proxies for Python signals. Import the
        // helper if it hasn't already been done.
        typedef int (*helper_func)(QObject *, const char *, int);
        
        static helper_func helper = 0;
        
        if (!helper)
            helper = (helper_func)sipImportSymbol("qpycore_qobject_receivers");
        
        if (helper)
        #if defined(SIP_PROTECTED_IS_PUBLIC)
            sipRes = helper(sipCpp, a0, sipCpp->receivers(a0));
        #else
            sipRes = helper(sipCpp, a0, sipCpp->sipProtect_receivers(a0));
        #endif
#line 497 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/sipkpartspart7.cpp"

            return SIPLong_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        QTimerEvent * a0;
        sipKParts_Factory *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KParts_Factory, &sipCpp, sipType_QTimerEvent, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtectVirt_timerEvent(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_Factory, sipName_timerEvent, NULL);

    return NULL;
}


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

    {
        QChildEvent * a0;
        sipKParts_Factory *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KParts_Factory, &sipCpp, sipType_QChildEvent, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtectVirt_childEvent(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_Factory, sipName_childEvent, NULL);

    return NULL;
}


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

    {
        QEvent * a0;
        sipKParts_Factory *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KParts_Factory, &sipCpp, sipType_QEvent, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtectVirt_customEvent(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_Factory, sipName_customEvent, NULL);

    return NULL;
}


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

    {
        char * a0;
        sipKParts_Factory *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BG", &sipSelf, sipType_KParts_Factory, &sipCpp, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtectVirt_connectNotify(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_Factory, sipName_connectNotify, NULL);

    return NULL;
}


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

    {
        char * a0;
        sipKParts_Factory *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BG", &sipSelf, sipType_KParts_Factory, &sipCpp, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtectVirt_disconnectNotify(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_Factory, sipName_disconnectNotify, NULL);

    return NULL;
}


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

    {
        QObject * a0 = 0;
        const char * a1 = "QObject";
        PyObject *a1Keep = 0;
        const QStringList& a2def = QStringList();
        const QStringList * a2 = &a2def;
        int a2State = 0;
        KParts::Factory *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B|J:AAJ1", &sipSelf, sipType_KParts_Factory, &sipCpp, sipType_QObject, &a0, &a1Keep, &a1, sipType_QStringList,&a2, &a2State))
        {
            QObject *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->create(a0,a1,*a2);
            Py_END_ALLOW_THREADS
            Py_XDECREF(a1Keep);
            sipReleaseType(const_cast<QStringList *>(a2),sipType_QStringList,a2State);

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

    {
        const char * a0;
        PyObject *a0Keep;
        QWidget * a1;
        QObject * a2;
        const QVariantList * a3;
        int a3State = 0;
        const QString * a4;
        int a4State = 0;
        sipKParts_Factory *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BAAJ8J:J1J1", &sipSelf, sipType_KParts_Factory, &sipCpp, &a0Keep, &a0, sipType_QWidget, &a1, sipType_QObject, &a2, sipType_QList_0100QVariant,&a3, &a3State, sipType_QString,&a4, &a4State))
        {
            QObject *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->sipProtectVirt_create(sipSelfWasArg,a0,a1,a2,*a3,*a4);
            Py_END_ALLOW_THREADS
            Py_DECREF(a0Keep);
            sipReleaseType(const_cast<QVariantList *>(a3),sipType_QList_0100QVariant,a3State);
            sipReleaseType(const_cast<QString *>(a4),sipType_QString,a4State);

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

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

    return NULL;
}


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

    {
        const QStringList * a0;
        int a0State = 0;
        sipKParts_Factory *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KParts_Factory, &sipCpp, sipType_QStringList,&a0, &a0State))
        {
            QVariantList *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QVariantList(sipCpp->sipProtect_stringListToVariantList(*a0));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QStringList *>(a0),sipType_QStringList,a0State);

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

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

    return NULL;
}


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

    {
        const QVariantList * a0;
        int a0State = 0;
        sipKParts_Factory *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KParts_Factory, &sipCpp, sipType_QList_0100QVariant,&a0, &a0State))
        {
            QStringList *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QStringList(sipCpp->sipProtect_variantListToStringList(*a0));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QVariantList *>(a0),sipType_QList_0100QVariant,a0State);

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

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

    return NULL;
}


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

    {
        sipKParts_Factory *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KParts_Factory, &sipCpp))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtectVirt_setupTranslations(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_Factory, sipName_setupTranslations, NULL);

    return NULL;
}


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

    {
        QObject * a0;
        const char * a1;
        PyObject *a1Keep;
        const QStringList * a2;
        int a2State = 0;
        sipKParts_Factory *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ:AAJ1", &sipSelf, sipType_KParts_Factory, &sipCpp, sipType_QObject, &a0, &a1Keep, &a1, sipType_QStringList,&a2, &a2State))
        {
            QObject *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->sipProtectVirt_createObject(sipSelfWasArg,a0,a1,*a2);
            Py_END_ALLOW_THREADS
            Py_DECREF(a1Keep);
            sipReleaseType(const_cast<QStringList *>(a2),sipType_QStringList,a2State);

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

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

    return NULL;
}


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

    {
        const KComponentData * a0;
        sipKParts_Factory *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_KParts_Factory, &sipCpp, sipType_KComponentData, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtect_setComponentData(*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_Factory, sipName_setComponentData, NULL);

    return NULL;
}


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;
        sipKParts_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;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->sipProtect_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;
}


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

    if (targetType == sipType_KParts_Factory)
        return ptr;

    if ((res = ((const sipClassTypeDef *)sipType_KPluginFactory)->ctd_cast((KPluginFactory *)(KParts::Factory *)ptr,targetType)) != NULL)
        return res;

    return NULL;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipKParts_Factory *>(sipCppV);
    else
        delete reinterpret_cast<KParts::Factory *>(sipCppV);

    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_KParts_Factory(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_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_childEvent), meth_KParts_Factory_childEvent, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_connectNotify), meth_KParts_Factory_connectNotify, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_create), meth_KParts_Factory_create, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_createObject), meth_KParts_Factory_createObject, METH_VARARGS, NULL},
    {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_customEvent), meth_KParts_Factory_customEvent, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_disconnectNotify), meth_KParts_Factory_disconnectNotify, 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},
    {SIP_MLNAME_CAST(sipName_receivers), meth_KParts_Factory_receivers, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_sender), meth_KParts_Factory_sender, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setComponentData), meth_KParts_Factory_setComponentData, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setupTranslations), meth_KParts_Factory_setupTranslations, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_stringListToVariantList), meth_KParts_Factory_stringListToVariantList, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_timerEvent), meth_KParts_Factory_timerEvent, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_variantListToStringList), meth_KParts_Factory_variantListToStringList, 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},
        17, 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_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,
    cast_KParts_Factory,
    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
};
