/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt5.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtCore.h"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstate.sip"
#include <qstate.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobject.sip"
#include <qobject.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qabstractstate.sip"
#include <qabstractstate.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"
#line 149 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qabstracttransition.sip"
#include <qabstracttransition.h>
#line 48 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qsignaltransition.sip"
#include <qsignaltransition.h>
#line 51 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstatemachine.sip"
#include <qstatemachine.h>
#line 54 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 146 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 59 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 62 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"
#line 247 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 65 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"
#line 235 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 68 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 71 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 74 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"
#line 30 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 77 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"
#line 149 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 80 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 83 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qthread.sip"
#include <qthread.h>
#line 86 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 89 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qregexp.sip"
#include <qregexp.h>
#line 92 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 95 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 98 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"


class sipQState : public  ::QState
{
public:
    sipQState( ::QState*);
    sipQState( ::QState::ChildMode, ::QState*);
    virtual ~sipQState();

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

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    void disconnectNotify(const  ::QMetaMethod&) SIP_OVERRIDE;
    void connectNotify(const  ::QMetaMethod&) SIP_OVERRIDE;
    void customEvent( ::QEvent*) SIP_OVERRIDE;
    void childEvent( ::QChildEvent*) SIP_OVERRIDE;
    void timerEvent( ::QTimerEvent*) SIP_OVERRIDE;
    bool eventFilter( ::QObject*, ::QEvent*) SIP_OVERRIDE;
    bool event( ::QEvent*) SIP_OVERRIDE;
    void onEntry( ::QEvent*) SIP_OVERRIDE;
    void onExit( ::QEvent*) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[9];
};

sipQState::sipQState( ::QState*a0):  ::QState(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQState::sipQState( ::QState::ChildMode a0, ::QState*a1):  ::QState(a0,a1), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

const QMetaObject *sipQState::metaObject() const
{
    if (sipGetInterpreter())
        return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : sip_QtCore_qt_metaobject(sipPySelf,sipType_QState);

    return  ::QState::metaObject();
}

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

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

    return _id;
}

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

    return (sip_QtCore_qt_metacast(sipPySelf, sipType_QState, _clname, &sipCpp) ? sipCpp :  ::QState::qt_metacast(_clname));
}

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

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

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

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

    sipVH_QtCore_5(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0);
}

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

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

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

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

    sipVH_QtCore_5(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0);
}

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

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

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

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

    sipVH_QtCore_4(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0);
}

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

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

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

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

    sipVH_QtCore_3(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0);
}

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

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

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

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

    sipVH_QtCore_2(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0);
}

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

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

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

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

    return sipVH_QtCore_1(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0, a1);
}

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

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

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

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

    return sipVH_QtCore_0(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0);
}

void sipQState::onEntry( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::QState::onEntry(a0);
        return;
    }

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

    sipVH_QtCore_4(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0);
}

void sipQState::onExit( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::QState::onExit(a0);
        return;
    }

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

    sipVH_QtCore_4(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0);
}


PyDoc_STRVAR(doc_QState_errorState, "errorState(self) -> QAbstractState");

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

    {
        const  ::QState *sipCpp;

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

            sipRes = sipCpp->errorState();

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

    sipNoMethod(sipParseErr, sipName_QState, sipName_errorState, doc_QState_errorState);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QState_setErrorState, "setErrorState(self, QAbstractState)");

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

    {
         ::QAbstractState* a0;
        PyObject *a0Keep;
         ::QState *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B@J8", &sipSelf, sipType_QState, &sipCpp, &a0Keep, sipType_QAbstractState, &a0))
        {
            sipCpp->setErrorState(a0);

            sipKeepReference(sipSelf, -6, a0Keep);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QState, sipName_setErrorState, doc_QState_setErrorState);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QState_addTransition, "addTransition(self, QAbstractTransition)\n"
"addTransition(self, pyqtBoundSignal, QAbstractState) -> QSignalTransition\n"
"addTransition(self, QAbstractState) -> QAbstractTransition");

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

    {
         ::QAbstractTransition* a0;
         ::QState *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ:", &sipSelf, sipType_QState, &sipCpp, sipType_QAbstractTransition, &a0))
        {
            sipCpp->addTransition(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        PyObject * a0;
         ::QAbstractState* a1;
         ::QState *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BP0J8", &sipSelf, sipType_QState, &sipCpp, &a0, sipType_QAbstractState, &a1))
        {
             ::QSignalTransition*sipRes = 0;
            sipErrorState sipError = sipErrorNone;

#line 50 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstate.sip"
        QObject *sender;
        QByteArray signal_signature;
        
        if ((sipError = pyqt5_get_pyqtsignal_parts(a0, &sender, signal_signature)) == sipErrorNone)
        {
            sipRes = sipCpp->addTransition(sender, signal_signature.constData(), a1);
        }
        else
        {
            sipError = sipBadCallableArg(0, a0);
        }
#line 442 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQState.cpp"

            if (sipError == sipErrorFail)
                return 0;

            if (sipError == sipErrorNone)
            {
            return sipConvertFromType(sipRes,sipType_QSignalTransition,SIP_NULLPTR);
            }

            sipAddException(sipError, &sipParseErr);
        }
    }

    {
         ::QAbstractState* a0;
         ::QState *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ:", &sipSelf, sipType_QState, &sipCpp, sipType_QAbstractState, &a0))
        {
             ::QAbstractTransition*sipRes;

            sipRes = sipCpp->addTransition(a0);

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

    sipNoMethod(sipParseErr, sipName_QState, sipName_addTransition, doc_QState_addTransition);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QState_removeTransition, "removeTransition(self, QAbstractTransition)");

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

    {
         ::QAbstractTransition* a0;
         ::QState *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ<", &sipSelf, sipType_QState, &sipCpp, sipType_QAbstractTransition, &a0))
        {
            sipCpp->removeTransition(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QState, sipName_removeTransition, doc_QState_removeTransition);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QState_transitions, "transitions(self) -> List[QAbstractTransition]");

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

    {
        const  ::QState *sipCpp;

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

            sipRes = new QList< ::QAbstractTransition*>(sipCpp->transitions());

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

    sipNoMethod(sipParseErr, sipName_QState, sipName_transitions, doc_QState_transitions);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QState_initialState, "initialState(self) -> QAbstractState");

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

    {
        const  ::QState *sipCpp;

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

            sipRes = sipCpp->initialState();

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

    sipNoMethod(sipParseErr, sipName_QState, sipName_initialState, doc_QState_initialState);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QState_setInitialState, "setInitialState(self, QAbstractState)");

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

    {
         ::QAbstractState* a0;
        PyObject *a0Keep;
         ::QState *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B@J8", &sipSelf, sipType_QState, &sipCpp, &a0Keep, sipType_QAbstractState, &a0))
        {
            sipCpp->setInitialState(a0);

            sipKeepReference(sipSelf, -7, a0Keep);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QState, sipName_setInitialState, doc_QState_setInitialState);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QState_childMode, "childMode(self) -> QState.ChildMode");

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

    {
        const  ::QState *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QState, &sipCpp))
        {
             ::QState::ChildMode sipRes;

            sipRes = sipCpp->childMode();

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

    sipNoMethod(sipParseErr, sipName_QState, sipName_childMode, doc_QState_childMode);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QState_setChildMode, "setChildMode(self, QState.ChildMode)");

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

    {
         ::QState::ChildMode a0;
         ::QState *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QState, &sipCpp, sipType_QState_ChildMode, &a0))
        {
            sipCpp->setChildMode(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QState, sipName_setChildMode, doc_QState_setChildMode);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QState_assignProperty, "assignProperty(self, QObject, str, Any)");

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

    {
         ::QObject* a0;
        const char* a1;
        PyObject *a1Keep;
        const  ::QVariant* a2;
        int a2State = 0;
         ::QState *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8AAJ1", &sipSelf, sipType_QState, &sipCpp, sipType_QObject, &a0, &a1Keep, &a1, sipType_QVariant, &a2, &a2State))
        {
            sipCpp->assignProperty(a0,a1,*a2);
            Py_DECREF(a1Keep);
            sipReleaseType(const_cast< ::QVariant *>(a2), sipType_QVariant, a2State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QState, sipName_assignProperty, doc_QState_assignProperty);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QState_onEntry, "onEntry(self, QEvent)");

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

    {
         ::QEvent* a0;
         ::QState *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pJ8", &sipSelf, sipType_QState, &sipCpp, sipType_QEvent, &a0))
        {
            (sipSelfWasArg ? sipCpp-> ::QState::onEntry(a0) : sipCpp->onEntry(a0));

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QState, sipName_onEntry, doc_QState_onEntry);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QState_onExit, "onExit(self, QEvent)");

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

    {
         ::QEvent* a0;
         ::QState *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pJ8", &sipSelf, sipType_QState, &sipCpp, sipType_QEvent, &a0))
        {
            (sipSelfWasArg ? sipCpp-> ::QState::onExit(a0) : sipCpp->onExit(a0));

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QState, sipName_onExit, doc_QState_onExit);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QState_event, "event(self, QEvent) -> bool");

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

    {
         ::QEvent* a0;
         ::QState *sipCpp;

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

            sipRes = (sipSelfWasArg ? sipCpp-> ::QState::event(a0) : sipCpp->event(a0));

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QState, sipName_event, doc_QState_event);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QState)
        return sipCppV;

    sipCppV = ((const sipClassTypeDef *)sipType_QAbstractState)->ctd_cast(static_cast< ::QAbstractState *>(sipCpp), targetType);
    if (sipCppV)
        return sipCppV;

    return SIP_NULLPTR;
}


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

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


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


extern "C" {static void array_delete_QState(void *);}
static void array_delete_QState(void *sipCpp)
{
    delete[] reinterpret_cast< ::QState *>(sipCpp);
}


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

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


extern "C" {static void *init_type_QState(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QState(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **sipOwner, PyObject **sipParseErr)
{
    sipQState *sipCpp = SIP_NULLPTR;

    {
         ::QState* a0 = 0;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|JH", sipType_QState, &a0, sipOwner))
        {
            sipCpp = new sipQState(a0);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
         ::QState::ChildMode a0;
         ::QState* a1 = 0;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "E|JH", sipType_QState_ChildMode, &a0, sipType_QState, &a1, sipOwner))
        {
            sipCpp = new sipQState(a0,a1);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_QState[] = {
    {sipName_addTransition, meth_QState_addTransition, METH_VARARGS, doc_QState_addTransition},
    {sipName_assignProperty, meth_QState_assignProperty, METH_VARARGS, doc_QState_assignProperty},
    {sipName_childMode, meth_QState_childMode, METH_VARARGS, doc_QState_childMode},
    {sipName_errorState, meth_QState_errorState, METH_VARARGS, doc_QState_errorState},
    {sipName_event, meth_QState_event, METH_VARARGS, doc_QState_event},
    {sipName_initialState, meth_QState_initialState, METH_VARARGS, doc_QState_initialState},
    {sipName_onEntry, meth_QState_onEntry, METH_VARARGS, doc_QState_onEntry},
    {sipName_onExit, meth_QState_onExit, METH_VARARGS, doc_QState_onExit},
    {sipName_removeTransition, meth_QState_removeTransition, METH_VARARGS, doc_QState_removeTransition},
    {sipName_setChildMode, meth_QState_setChildMode, METH_VARARGS, doc_QState_setChildMode},
    {sipName_setErrorState, meth_QState_setErrorState, METH_VARARGS, doc_QState_setErrorState},
    {sipName_setInitialState, meth_QState_setInitialState, METH_VARARGS, doc_QState_setInitialState},
    {sipName_transitions, meth_QState_transitions, METH_VARARGS, doc_QState_transitions}
};

static sipEnumMemberDef enummembers_QState[] = {
    {sipName_DontRestoreProperties, static_cast<int>( ::QState::DontRestoreProperties), 258},
    {sipName_ExclusiveStates, static_cast<int>( ::QState::ExclusiveStates), 257},
    {sipName_ParallelStates, static_cast<int>( ::QState::ParallelStates), 257},
    {sipName_RestoreProperties, static_cast<int>( ::QState::RestoreProperties), 258},
};

PyDoc_STRVAR(doc_QState, "\1QState(parent: QState = None)\n"
"QState(QState.ChildMode, parent: QState = None)");


/* Define this type's signals. */
static const pyqt5QtSignal signals_QState[] = {
    {"errorStateChanged()", "\1errorStateChanged(self)", SIP_NULLPTR, SIP_NULLPTR},
    {"initialStateChanged()", "\1initialStateChanged(self)", SIP_NULLPTR, SIP_NULLPTR},
    {"childModeChanged()", "\1childModeChanged(self)", SIP_NULLPTR, SIP_NULLPTR},
    {"propertiesAssigned()", "\1propertiesAssigned(self)", SIP_NULLPTR, SIP_NULLPTR},
    {"finished()", "\1finished(self)", SIP_NULLPTR, SIP_NULLPTR},
    {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR}
};


static pyqt5ClassPluginDef plugin_QState = {
    & ::QState::staticMetaObject,
    0,
    signals_QState,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtCore_QState = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QState,
        SIP_NULLPTR,
        &plugin_QState
    },
    {
        sipNameNr_QState,
        {0, 0, 1},
        13, methods_QState,
        4, enummembers_QState,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QState,
    -1,
    -1,
    supers_QState,
    SIP_NULLPTR,
    init_type_QState,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QState,
    SIP_NULLPTR,
    array_QState,
    SIP_NULLPTR,
    release_QState,
    cast_QState,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QState,
    sizeof ( ::QState),
};
