/*
 * Interface wrapper code.
 *
 * Generated by SIP 4.19.3
 */

#include "sipAPIKWidgetsAddons.h"

#include <kguiitem.h>

#include <qstring.h>
#include <qicon.h>
#include <qpushbutton.h>


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

    {
        const  ::KGuiItem *sipCpp;

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

            sipRes = new  ::QString(sipCpp->text());

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

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

    return NULL;
}


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

    {
        const  ::KGuiItem *sipCpp;

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

            sipRes = new  ::QString(sipCpp->plainText());

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

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

    return NULL;
}


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

    {
        const  ::KGuiItem *sipCpp;

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

            sipRes = new  ::QIcon(sipCpp->icon());

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

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

    return NULL;
}


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

    {
        const  ::KGuiItem *sipCpp;

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

            sipRes = new  ::QString(sipCpp->iconName());

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

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

    return NULL;
}


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

    {
        const  ::KGuiItem *sipCpp;

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

            sipRes = new  ::QString(sipCpp->toolTip());

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

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

    return NULL;
}


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

    {
        const  ::KGuiItem *sipCpp;

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

            sipRes = new  ::QString(sipCpp->whatsThis());

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

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

    return NULL;
}


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

    {
        const  ::KGuiItem *sipCpp;

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

            sipRes = sipCpp->isEnabled();

            return PyBool_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        const  ::KGuiItem *sipCpp;

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

            sipRes = sipCpp->hasIcon();

            return PyBool_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        const  ::QString* a0;
        int a0State = 0;
         ::KGuiItem *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KGuiItem, &sipCpp, sipType_QString,&a0, &a0State))
        {
            sipCpp->setText(*a0);
            sipReleaseType(const_cast< ::QString *>(a0),sipType_QString,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        const  ::QIcon* a0;
         ::KGuiItem *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_KGuiItem, &sipCpp, sipType_QIcon, &a0))
        {
            sipCpp->setIcon(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        const  ::QString* a0;
        int a0State = 0;
         ::KGuiItem *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KGuiItem, &sipCpp, sipType_QString,&a0, &a0State))
        {
            sipCpp->setIconName(*a0);
            sipReleaseType(const_cast< ::QString *>(a0),sipType_QString,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        const  ::QString* a0;
        int a0State = 0;
         ::KGuiItem *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KGuiItem, &sipCpp, sipType_QString,&a0, &a0State))
        {
            sipCpp->setToolTip(*a0);
            sipReleaseType(const_cast< ::QString *>(a0),sipType_QString,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        const  ::QString* a0;
        int a0State = 0;
         ::KGuiItem *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KGuiItem, &sipCpp, sipType_QString,&a0, &a0State))
        {
            sipCpp->setWhatsThis(*a0);
            sipReleaseType(const_cast< ::QString *>(a0),sipType_QString,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        bool a0;
         ::KGuiItem *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_KGuiItem, &sipCpp, &a0))
        {
            sipCpp->setEnabled(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
         ::QPushButton* a0;
        const  ::KGuiItem* a1;

        if (sipParseArgs(&sipParseErr, sipArgs, "J8J9", sipType_QPushButton, &a0, sipType_KGuiItem, &a1))
        {
             ::KGuiItem::assign(a0,*a1);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


/* Call the instance's destructor. */
extern "C" {static void release_KGuiItem(void *, int);}
static void release_KGuiItem(void *sipCppV, int)
{
    delete reinterpret_cast< ::KGuiItem *>(sipCppV);
}


extern "C" {static void assign_KGuiItem(void *, SIP_SSIZE_T, const void *);}
static void assign_KGuiItem(void *sipDst, SIP_SSIZE_T sipDstIdx, const void *sipSrc)
{
    reinterpret_cast< ::KGuiItem *>(sipDst)[sipDstIdx] = *reinterpret_cast<const  ::KGuiItem *>(sipSrc);
}


extern "C" {static void *array_KGuiItem(SIP_SSIZE_T);}
static void *array_KGuiItem(SIP_SSIZE_T sipNrElem)
{
    return new  ::KGuiItem[sipNrElem];
}


extern "C" {static void *copy_KGuiItem(const void *, SIP_SSIZE_T);}
static void *copy_KGuiItem(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new  ::KGuiItem(reinterpret_cast<const  ::KGuiItem *>(sipSrc)[sipSrcIdx]);
}


extern "C" {static void dealloc_KGuiItem(sipSimpleWrapper *);}
static void dealloc_KGuiItem(sipSimpleWrapper *sipSelf)
{
    if (sipIsOwnedByPython(sipSelf))
    {
        release_KGuiItem(sipGetAddress(sipSelf), 0);
    }
}


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

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, ""))
        {
            sipCpp = new  ::KGuiItem();

            return sipCpp;
        }
    }

    {
        const  ::QString* a0;
        int a0State = 0;
        const  ::QString& a1def = QString();
        const  ::QString* a1 = &a1def;
        int a1State = 0;
        const  ::QString& a2def = QString();
        const  ::QString* a2 = &a2def;
        int a2State = 0;
        const  ::QString& a3def = QString();
        const  ::QString* a3 = &a3def;
        int a3State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J1|J1J1J1", sipType_QString,&a0, &a0State, sipType_QString,&a1, &a1State, sipType_QString,&a2, &a2State, sipType_QString,&a3, &a3State))
        {
            sipCpp = new  ::KGuiItem(*a0,*a1,*a2,*a3);
            sipReleaseType(const_cast< ::QString *>(a0),sipType_QString,a0State);
            sipReleaseType(const_cast< ::QString *>(a1),sipType_QString,a1State);
            sipReleaseType(const_cast< ::QString *>(a2),sipType_QString,a2State);
            sipReleaseType(const_cast< ::QString *>(a3),sipType_QString,a3State);

            return sipCpp;
        }
    }

    {
        const  ::QString* a0;
        int a0State = 0;
        const  ::QIcon* a1;
        const  ::QString& a2def = QString();
        const  ::QString* a2 = &a2def;
        int a2State = 0;
        const  ::QString& a3def = QString();
        const  ::QString* a3 = &a3def;
        int a3State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J1J9|J1J1", sipType_QString,&a0, &a0State, sipType_QIcon, &a1, sipType_QString,&a2, &a2State, sipType_QString,&a3, &a3State))
        {
            sipCpp = new  ::KGuiItem(*a0,*a1,*a2,*a3);
            sipReleaseType(const_cast< ::QString *>(a0),sipType_QString,a0State);
            sipReleaseType(const_cast< ::QString *>(a2),sipType_QString,a2State);
            sipReleaseType(const_cast< ::QString *>(a3),sipType_QString,a3State);

            return sipCpp;
        }
    }

    {
        const  ::KGuiItem* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_KGuiItem, &a0))
        {
            sipCpp = new  ::KGuiItem(*a0);

            return sipCpp;
        }
    }

    return NULL;
}


static PyMethodDef methods_KGuiItem[] = {
    {SIP_MLNAME_CAST(sipName_assign), meth_KGuiItem_assign, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_hasIcon), meth_KGuiItem_hasIcon, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_icon), meth_KGuiItem_icon, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_iconName), meth_KGuiItem_iconName, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_isEnabled), meth_KGuiItem_isEnabled, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_plainText), meth_KGuiItem_plainText, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setEnabled), meth_KGuiItem_setEnabled, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setIcon), meth_KGuiItem_setIcon, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setIconName), meth_KGuiItem_setIconName, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setText), meth_KGuiItem_setText, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setToolTip), meth_KGuiItem_setToolTip, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setWhatsThis), meth_KGuiItem_setWhatsThis, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_text), meth_KGuiItem_text, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_toolTip), meth_KGuiItem_toolTip, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_whatsThis), meth_KGuiItem_whatsThis, METH_VARARGS, NULL}
};


static pyqt5ClassPluginDef plugin_KGuiItem = {
    0,
    0,
    0,
    0
};


sipClassTypeDef sipTypeDef_KWidgetsAddons_KGuiItem = {
    {
        -1,
        0,
        0,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_CLASS,
        sipNameNr_KGuiItem,
        {0},
        &plugin_KGuiItem
    },
    {
        sipNameNr_KGuiItem,
        {0, 0, 1},
        15, methods_KGuiItem,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    0,
    0,
    init_type_KGuiItem,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KGuiItem,
    assign_KGuiItem,
    array_KGuiItem,
    copy_KGuiItem,
    release_KGuiItem,
    0,
    0,
    0,
    0,
    0,
    0,
    0
};
