/*
 * 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 "sipAPIQtDesigner.h"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtDesigner/taskmenu.sip"
#include <taskmenu.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtDesigner/sipQtDesignerQDesignerTaskMenuExtension.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtWidgets/qaction.sip"
#include <qaction.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtDesigner/sipQtDesignerQDesignerTaskMenuExtension.cpp"
#line 149 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtDesigner/sipQtDesignerQDesignerTaskMenuExtension.cpp"


class sipQDesignerTaskMenuExtension : public  ::QDesignerTaskMenuExtension
{
public:
    sipQDesignerTaskMenuExtension();
    sipQDesignerTaskMenuExtension(const  ::QDesignerTaskMenuExtension&);
    virtual ~sipQDesignerTaskMenuExtension();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
     ::QAction* preferredEditAction() const SIP_OVERRIDE;
    QList< ::QAction*> taskActions() const SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[2];
};

sipQDesignerTaskMenuExtension::sipQDesignerTaskMenuExtension():  ::QDesignerTaskMenuExtension(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQDesignerTaskMenuExtension::sipQDesignerTaskMenuExtension(const  ::QDesignerTaskMenuExtension& a0):  ::QDesignerTaskMenuExtension(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

 ::QAction* sipQDesignerTaskMenuExtension::preferredEditAction() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[0]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_preferredEditAction);

    if (!sipMeth)
        return  ::QDesignerTaskMenuExtension::preferredEditAction();

    extern  ::QAction* sipVH_QtDesigner_95(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtDesigner_95(sipGILState, sipImportedVirtErrorHandlers_QtDesigner_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

QList< ::QAction*> sipQDesignerTaskMenuExtension::taskActions() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[1]), const_cast<sipSimpleWrapper **>(&sipPySelf), sipName_QDesignerTaskMenuExtension, sipName_taskActions);

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

    extern QList< ::QAction*> sipVH_QtDesigner_94(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtDesigner_94(sipGILState, sipImportedVirtErrorHandlers_QtDesigner_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}


PyDoc_STRVAR(doc_QDesignerTaskMenuExtension_taskActions, "taskActions(self) -> List[QAction]");

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

    {
        const  ::QDesignerTaskMenuExtension *sipCpp;

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

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QDesignerTaskMenuExtension, sipName_taskActions);
                return SIP_NULLPTR;
            }

            sipRes = new QList< ::QAction*>(sipCpp->taskActions());

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

    sipNoMethod(sipParseErr, sipName_QDesignerTaskMenuExtension, sipName_taskActions, doc_QDesignerTaskMenuExtension_taskActions);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QDesignerTaskMenuExtension_preferredEditAction, "preferredEditAction(self) -> QAction");

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

    {
        const  ::QDesignerTaskMenuExtension *sipCpp;

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

            sipRes = (sipSelfWasArg ? sipCpp-> ::QDesignerTaskMenuExtension::preferredEditAction() : sipCpp->preferredEditAction());

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

    sipNoMethod(sipParseErr, sipName_QDesignerTaskMenuExtension, sipName_preferredEditAction, doc_QDesignerTaskMenuExtension_preferredEditAction);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QDesignerTaskMenuExtension(void *, int);}
static void release_QDesignerTaskMenuExtension(void *sipCppV, int sipState)
{
    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipQDesignerTaskMenuExtension *>(sipCppV);
    else
        delete reinterpret_cast< ::QDesignerTaskMenuExtension *>(sipCppV);
}


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

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


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

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            sipCpp = new sipQDesignerTaskMenuExtension();

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::QDesignerTaskMenuExtension* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_QDesignerTaskMenuExtension, &a0))
        {
            sipCpp = new sipQDesignerTaskMenuExtension(*a0);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QDesignerTaskMenuExtension[] = {
    {sipName_preferredEditAction, meth_QDesignerTaskMenuExtension_preferredEditAction, METH_VARARGS, doc_QDesignerTaskMenuExtension_preferredEditAction},
    {sipName_taskActions, meth_QDesignerTaskMenuExtension_taskActions, METH_VARARGS, doc_QDesignerTaskMenuExtension_taskActions}
};

PyDoc_STRVAR(doc_QDesignerTaskMenuExtension, "\1QDesignerTaskMenuExtension()\n"
"QDesignerTaskMenuExtension(QDesignerTaskMenuExtension)");


static pyqt5ClassPluginDef plugin_QDesignerTaskMenuExtension = {
    SIP_NULLPTR,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtDesigner_QDesignerTaskMenuExtension = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QDesignerTaskMenuExtension,
        SIP_NULLPTR,
        &plugin_QDesignerTaskMenuExtension
    },
    {
        sipNameNr_QDesignerTaskMenuExtension,
        {0, 0, 1},
        2, methods_QDesignerTaskMenuExtension,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QDesignerTaskMenuExtension,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QDesignerTaskMenuExtension,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QDesignerTaskMenuExtension,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QDesignerTaskMenuExtension,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof ( ::QDesignerTaskMenuExtension),
};
