/*
 * Module code.
 *
 * Generated by SIP 4.10.2 on Sun Jul 11 10:12:07 2010
 */

#include "sipAPIpolkitqt.h"

#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/polkitqt/actionbutton.sip"
#include <PolicyKit/polkit-qt/actionbutton.h>
#line 12 "sippolkitqtpart4.cpp"

#line 37 "/usr/local/share/py-sip/QtGui/qabstractbutton.sip"
#include <qabstractbutton.h>
#line 16 "sippolkitqtpart4.cpp"
#line 41 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 19 "sippolkitqtpart4.cpp"
#line 40 "/usr/local/share/py-sip/QtCore/qobject.sip"
#include <qobject.h>
#line 22 "sippolkitqtpart4.cpp"
#line 41 "/usr/local/share/py-sip/QtGui/qicon.sip"
#include <qicon.h>
#line 25 "sippolkitqtpart4.cpp"
#line 37 "/usr/local/share/py-sip/QtGui/qaction.sip"
#include <qaction.h>
#line 28 "sippolkitqtpart4.cpp"
#line 125 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 31 "sippolkitqtpart4.cpp"
#line 194 "/usr/local/share/py-sip/QtGui/qgraphicswidget.sip"
#include <qgraphicswidget.h>
#line 34 "sippolkitqtpart4.cpp"
#line 125 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 37 "sippolkitqtpart4.cpp"
#line 41 "/usr/local/share/py-sip/QtGui/qwidget.sip"
#include <qwidget.h>
#line 40 "sippolkitqtpart4.cpp"
#line 38 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 43 "sippolkitqtpart4.cpp"
#line 41 "/usr/local/share/py-sip/QtGui/qkeysequence.sip"
#include <qkeysequence.h>
#line 46 "sippolkitqtpart4.cpp"
#line 37 "/usr/local/share/py-sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 49 "sippolkitqtpart4.cpp"
#line 41 "/usr/local/share/py-sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 52 "sippolkitqtpart4.cpp"
#line 41 "/usr/local/share/py-sip/QtGui/qfont.sip"
#include <qfont.h>
#line 55 "sippolkitqtpart4.cpp"
#line 40 "/usr/local/share/py-sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 58 "sippolkitqtpart4.cpp"
#line 37 "/usr/local/share/py-sip/QtGui/qmenu.sip"
#include <qmenu.h>
#line 61 "sippolkitqtpart4.cpp"
#line 37 "/usr/local/share/py-sip/QtGui/qactiongroup.sip"
#include <qactiongroup.h>
#line 64 "sippolkitqtpart4.cpp"
#line 318 "/usr/local/share/py-sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 67 "sippolkitqtpart4.cpp"
#line 305 "/usr/local/share/py-sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 70 "sippolkitqtpart4.cpp"
#line 38 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 73 "sippolkitqtpart4.cpp"
#line 43 "/usr/local/share/py-sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 76 "sippolkitqtpart4.cpp"
#line 125 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 79 "sippolkitqtpart4.cpp"
#line 37 "/usr/local/share/py-sip/QtCore/qthread.sip"
#include <qthread.h>
#line 82 "sippolkitqtpart4.cpp"
#line 41 "/usr/local/share/py-sip/QtCore/qregexp.sip"
#include <qregexp.h>
#line 85 "sippolkitqtpart4.cpp"
#line 37 "/usr/local/share/py-sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 88 "sippolkitqtpart4.cpp"


class sipPolkitQt_ActionButton : public PolkitQt::ActionButton
{
public:
    sipPolkitQt_ActionButton(QAbstractButton *,const QString&,QObject *);
    virtual ~sipPolkitQt_ActionButton();

    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.
     */
    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 *);
    bool sipProtectVirt_event(bool,QEvent *);

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    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:
    sipPolkitQt_ActionButton(const sipPolkitQt_ActionButton &);
    sipPolkitQt_ActionButton &operator = (const sipPolkitQt_ActionButton &);

    char sipPyMethods[7];
};

sipPolkitQt_ActionButton::sipPolkitQt_ActionButton(QAbstractButton *a0,const QString& a1,QObject *a2): PolkitQt::ActionButton(a0,a1,a2), sipPySelf(0)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

const QMetaObject *sipPolkitQt_ActionButton::metaObject() const
{
    return sip_polkitqt_qt_metaobject(sipPySelf,sipType_PolkitQt_ActionButton);
}

int sipPolkitQt_ActionButton::qt_metacall(QMetaObject::Call _c,int _id,void **_a)
{
    _id = PolkitQt::ActionButton::qt_metacall(_c,_id,_a);

    if (_id >= 0)
        _id = sip_polkitqt_qt_metacall(sipPySelf,sipType_PolkitQt_ActionButton,_c,_id,_a);

    return _id;
}

void *sipPolkitQt_ActionButton::qt_metacast(const char *_clname)
{
    return (sip_polkitqt_qt_metacast && sip_polkitqt_qt_metacast(sipPySelf,sipType_PolkitQt_ActionButton,_clname)) ? this : PolkitQt::ActionButton::qt_metacast(_clname);
}

bool sipPolkitQt_ActionButton::event(QEvent *a0)
{
    sip_gilstate_t sipGILState;
    PyObject *meth;

    meth = sipIsPyMethod(&sipGILState,&sipPyMethods[0],sipPySelf,NULL,sipName_event);

    if (!meth)
        return QAction::event(a0);

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

    return ((sipVH_QtCore_5)(sipModuleAPI_polkitqt_QtCore->em_virthandlers[5]))(sipGILState,meth,a0);
}

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

    meth = sipIsPyMethod(&sipGILState,&sipPyMethods[1],sipPySelf,NULL,sipName_eventFilter);

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

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

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

void sipPolkitQt_ActionButton::timerEvent(QTimerEvent *a0)
{
    sip_gilstate_t sipGILState;
    PyObject *meth;

    meth = sipIsPyMethod(&sipGILState,&sipPyMethods[2],sipPySelf,NULL,sipName_timerEvent);

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

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

    ((sipVH_QtCore_9)(sipModuleAPI_polkitqt_QtCore->em_virthandlers[9]))(sipGILState,meth,a0);
}

void sipPolkitQt_ActionButton::childEvent(QChildEvent *a0)
{
    sip_gilstate_t sipGILState;
    PyObject *meth;

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

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

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

    ((sipVH_QtCore_25)(sipModuleAPI_polkitqt_QtCore->em_virthandlers[25]))(sipGILState,meth,a0);
}

void sipPolkitQt_ActionButton::customEvent(QEvent *a0)
{
    sip_gilstate_t sipGILState;
    PyObject *meth;

    meth = sipIsPyMethod(&sipGILState,&sipPyMethods[4],sipPySelf,NULL,sipName_customEvent);

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

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

    ((sipVH_QtCore_17)(sipModuleAPI_polkitqt_QtCore->em_virthandlers[17]))(sipGILState,meth,a0);
}

void sipPolkitQt_ActionButton::connectNotify(const char *a0)
{
    sip_gilstate_t sipGILState;
    PyObject *meth;

    meth = sipIsPyMethod(&sipGILState,&sipPyMethods[5],sipPySelf,NULL,sipName_connectNotify);

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

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

    ((sipVH_QtCore_24)(sipModuleAPI_polkitqt_QtCore->em_virthandlers[24]))(sipGILState,meth,a0);
}

void sipPolkitQt_ActionButton::disconnectNotify(const char *a0)
{
    sip_gilstate_t sipGILState;
    PyObject *meth;

    meth = sipIsPyMethod(&sipGILState,&sipPyMethods[6],sipPySelf,NULL,sipName_disconnectNotify);

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

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

    ((sipVH_QtCore_24)(sipModuleAPI_polkitqt_QtCore->em_virthandlers[24]))(sipGILState,meth,a0);
}

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

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

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

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

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

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

bool sipPolkitQt_ActionButton::sipProtectVirt_event(bool sipSelfWasArg,QEvent *a0)
{
    return (sipSelfWasArg ? QAction::event(a0) : event(a0));
}


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

    {
        char * a0;
        sipPolkitQt_ActionButton *sipCpp;

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

#line 538 "/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 351 "sippolkitqtpart4.cpp"

            return SIPLong_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        QTimerEvent * a0;
        sipPolkitQt_ActionButton *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_PolkitQt_ActionButton, &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_ActionButton, sipName_timerEvent, NULL);

    return NULL;
}


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

    {
        QChildEvent * a0;
        sipPolkitQt_ActionButton *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_PolkitQt_ActionButton, &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_ActionButton, sipName_childEvent, NULL);

    return NULL;
}


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

    {
        QEvent * a0;
        sipPolkitQt_ActionButton *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_PolkitQt_ActionButton, &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_ActionButton, sipName_customEvent, NULL);

    return NULL;
}


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

    {
        char * a0;
        sipPolkitQt_ActionButton *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BG", &sipSelf, sipType_PolkitQt_ActionButton, &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_ActionButton, sipName_connectNotify, NULL);

    return NULL;
}


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

    {
        char * a0;
        sipPolkitQt_ActionButton *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BG", &sipSelf, sipType_PolkitQt_ActionButton, &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_ActionButton, sipName_disconnectNotify, NULL);

    return NULL;
}


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

    {
        QEvent * a0;
        sipPolkitQt_ActionButton *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->sipProtectVirt_event(sipSelfWasArg,a0);
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        QAbstractButton * a0;
        PolkitQt::ActionButton *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_PolkitQt_ActionButton, &sipCpp, sipType_QAbstractButton, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->setButton(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_ActionButton, sipName_setButton, NULL);

    return NULL;
}


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

    {
        PolkitQt::ActionButton *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->button();
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        PolkitQt::ActionButton *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->activate();
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    if (targetType == sipType_PolkitQt_ActionButton)
        return ptr;

    if ((res = ((const sipClassTypeDef *)sipType_PolkitQt_Action)->ctd_cast((PolkitQt::Action *)(PolkitQt::ActionButton *)ptr,targetType)) != NULL)
        return res;

    return NULL;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipPolkitQt_ActionButton *>(sipCppV);
    else
        delete reinterpret_cast<PolkitQt::ActionButton *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void dealloc_PolkitQt_ActionButton(sipSimpleWrapper *);}
static void dealloc_PolkitQt_ActionButton(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerived(sipSelf))
        reinterpret_cast<sipPolkitQt_ActionButton *>(sipSelf->u.cppPtr)->sipPySelf = NULL;

    if (sipIsPyOwned(sipSelf))
    {
        release_PolkitQt_ActionButton(sipSelf->u.cppPtr,sipSelf->flags);
    }
}


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

    {
        QAbstractButton * a0;
        const QString& a1def = QString();
        const QString * a1 = &a1def;
        int a1State = 0;
        QObject * a2 = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J8|J1JH", sipType_QAbstractButton, &a0, sipType_QString,&a1, &a1State, sipType_QObject, &a2, sipOwner))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipPolkitQt_ActionButton(a0,*a1,a2);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a1),sipType_QString,a1State);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return NULL;
}


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


static PyMethodDef methods_PolkitQt_ActionButton[] = {
    {SIP_MLNAME_CAST(sipName_activate), meth_PolkitQt_ActionButton_activate, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_button), meth_PolkitQt_ActionButton_button, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_childEvent), meth_PolkitQt_ActionButton_childEvent, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_connectNotify), meth_PolkitQt_ActionButton_connectNotify, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_customEvent), meth_PolkitQt_ActionButton_customEvent, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_disconnectNotify), meth_PolkitQt_ActionButton_disconnectNotify, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_event), meth_PolkitQt_ActionButton_event, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_receivers), meth_PolkitQt_ActionButton_receivers, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setButton), meth_PolkitQt_ActionButton_setButton, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_timerEvent), meth_PolkitQt_ActionButton_timerEvent, METH_VARARGS, NULL}
};


/* Define this type's PyQt4 signals. */
static const pyqt4QtSignal pyqt4_signals_PolkitQt_ActionButton[] = {
    {"clicked(QAbstractButton *,bool)", 0, 0},
    {"clicked(QAbstractButton *)", 0, 0},
    {0, 0, 0}
};


pyqt4ClassTypeDef sipTypeDef_polkitqt_PolkitQt_ActionButton = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_PolkitQt__ActionButton,
        {0}
    },
    {
        sipNameNr_ActionButton,
        {0, 255, 0},
        10, methods_PolkitQt_ActionButton,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    supers_PolkitQt_ActionButton,
    0,
    init_PolkitQt_ActionButton,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_PolkitQt_ActionButton,
    0,
    0,
    0,
    release_PolkitQt_ActionButton,
    cast_PolkitQt_ActionButton,
    0,
    0,
    0
},
    &PolkitQt::ActionButton::staticMetaObject,
    0,
    pyqt4_signals_PolkitQt_ActionButton
};
