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

#include "sipAPIKWidgetsAddons.h"

#include <keditlistwidget.h>

#include <keditlistwidget.h>


extern "C" {static long slot_KEditListWidget_Buttons___hash__(PyObject *);}
static long slot_KEditListWidget_Buttons___hash__(PyObject *sipSelf)
{
     ::KEditListWidget::Buttons *sipCpp = reinterpret_cast< ::KEditListWidget::Buttons *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KEditListWidget_Buttons));

    if (!sipCpp)
        return 0;


    {
        {
            long sipRes = 0;

        sipRes = sipCpp->operator KEditListWidget::Buttons::Int();

            return sipRes;
        }
    }

    return 0;
}


extern "C" {static int slot_KEditListWidget_Buttons___bool__(PyObject *);}
static int slot_KEditListWidget_Buttons___bool__(PyObject *sipSelf)
{
     ::KEditListWidget::Buttons *sipCpp = reinterpret_cast< ::KEditListWidget::Buttons *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KEditListWidget_Buttons));

    if (!sipCpp)
        return -1;


    {
        {
            int sipRes = 0;

        sipRes = (sipCpp->operator KEditListWidget::Buttons::Int() != 0);

            return sipRes;
        }
    }

    return 0;
}


extern "C" {static PyObject *slot_KEditListWidget_Buttons___ne__(PyObject *,PyObject *);}
static PyObject *slot_KEditListWidget_Buttons___ne__(PyObject *sipSelf,PyObject *sipArg)
{
     ::KEditListWidget::Buttons *sipCpp = reinterpret_cast< ::KEditListWidget::Buttons *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KEditListWidget_Buttons));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        const  ::KEditListWidget::Buttons* a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_KEditListWidget_Buttons, &a0, &a0State))
        {
            bool sipRes = 0;

        sipRes = (sipCpp->operator KEditListWidget::Buttons::Int() != a0->operator KEditListWidget::Buttons::Int());
            sipReleaseType(const_cast< ::KEditListWidget::Buttons *>(a0),sipType_KEditListWidget_Buttons,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_KWidgetsAddons, ne_slot, sipType_KEditListWidget_Buttons, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_KEditListWidget_Buttons___eq__(PyObject *,PyObject *);}
static PyObject *slot_KEditListWidget_Buttons___eq__(PyObject *sipSelf,PyObject *sipArg)
{
     ::KEditListWidget::Buttons *sipCpp = reinterpret_cast< ::KEditListWidget::Buttons *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KEditListWidget_Buttons));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        const  ::KEditListWidget::Buttons* a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_KEditListWidget_Buttons, &a0, &a0State))
        {
            bool sipRes = 0;

        sipRes = (sipCpp->operator KEditListWidget::Buttons::Int() == a0->operator KEditListWidget::Buttons::Int());
            sipReleaseType(const_cast< ::KEditListWidget::Buttons *>(a0),sipType_KEditListWidget_Buttons,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_KWidgetsAddons, eq_slot, sipType_KEditListWidget_Buttons, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_KEditListWidget_Buttons___ixor__(PyObject *,PyObject *);}
static PyObject *slot_KEditListWidget_Buttons___ixor__(PyObject *sipSelf,PyObject *sipArg)
{
    if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_KEditListWidget_Buttons)))
    {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
    }

     ::KEditListWidget::Buttons *sipCpp = reinterpret_cast< ::KEditListWidget::Buttons *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KEditListWidget_Buttons));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &a0))
        {
        *sipCpp = KEditListWidget::Buttons(*sipCpp ^ a0);

            Py_INCREF(sipSelf);
            return sipSelf;
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    PyErr_Clear();

    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
}


extern "C" {static PyObject *slot_KEditListWidget_Buttons___xor__(PyObject *,PyObject *);}
static PyObject *slot_KEditListWidget_Buttons___xor__(PyObject *sipArg0,PyObject *sipArg1)
{
    PyObject *sipParseErr = NULL;

    {
         ::KEditListWidget::Buttons* a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_KEditListWidget_Buttons, &a0, &a0State, &a1))
        {
             ::KEditListWidget::Buttons*sipRes;

            sipRes = new  ::KEditListWidget::Buttons((*a0 ^ a1));
            sipReleaseType(a0,sipType_KEditListWidget_Buttons,a0State);

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

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_KWidgetsAddons, xor_slot, NULL, sipArg0, sipArg1);
}


extern "C" {static PyObject *slot_KEditListWidget_Buttons___ior__(PyObject *,PyObject *);}
static PyObject *slot_KEditListWidget_Buttons___ior__(PyObject *sipSelf,PyObject *sipArg)
{
    if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_KEditListWidget_Buttons)))
    {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
    }

     ::KEditListWidget::Buttons *sipCpp = reinterpret_cast< ::KEditListWidget::Buttons *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KEditListWidget_Buttons));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &a0))
        {
        *sipCpp = KEditListWidget::Buttons(*sipCpp | a0);

            Py_INCREF(sipSelf);
            return sipSelf;
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    PyErr_Clear();

    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
}


extern "C" {static PyObject *slot_KEditListWidget_Buttons___or__(PyObject *,PyObject *);}
static PyObject *slot_KEditListWidget_Buttons___or__(PyObject *sipArg0,PyObject *sipArg1)
{
    PyObject *sipParseErr = NULL;

    {
         ::KEditListWidget::Buttons* a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_KEditListWidget_Buttons, &a0, &a0State, &a1))
        {
             ::KEditListWidget::Buttons*sipRes;

            sipRes = new  ::KEditListWidget::Buttons((*a0 | a1));
            sipReleaseType(a0,sipType_KEditListWidget_Buttons,a0State);

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

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_KWidgetsAddons, or_slot, NULL, sipArg0, sipArg1);
}


extern "C" {static PyObject *slot_KEditListWidget_Buttons___iand__(PyObject *,PyObject *);}
static PyObject *slot_KEditListWidget_Buttons___iand__(PyObject *sipSelf,PyObject *sipArg)
{
    if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_KEditListWidget_Buttons)))
    {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
    }

     ::KEditListWidget::Buttons *sipCpp = reinterpret_cast< ::KEditListWidget::Buttons *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KEditListWidget_Buttons));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &a0))
        {
            sipCpp-> ::KEditListWidget::Buttons::operator&=(a0);

            Py_INCREF(sipSelf);
            return sipSelf;
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    PyErr_Clear();

    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
}


extern "C" {static PyObject *slot_KEditListWidget_Buttons___and__(PyObject *,PyObject *);}
static PyObject *slot_KEditListWidget_Buttons___and__(PyObject *sipArg0,PyObject *sipArg1)
{
    PyObject *sipParseErr = NULL;

    {
         ::KEditListWidget::Buttons* a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_KEditListWidget_Buttons, &a0, &a0State, &a1))
        {
             ::KEditListWidget::Buttons*sipRes;

            sipRes = new  ::KEditListWidget::Buttons((*a0 & a1));
            sipReleaseType(a0,sipType_KEditListWidget_Buttons,a0State);

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

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_KWidgetsAddons, and_slot, NULL, sipArg0, sipArg1);
}


extern "C" {static PyObject *slot_KEditListWidget_Buttons___invert__(PyObject *);}
static PyObject *slot_KEditListWidget_Buttons___invert__(PyObject *sipSelf)
{
     ::KEditListWidget::Buttons *sipCpp = reinterpret_cast< ::KEditListWidget::Buttons *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KEditListWidget_Buttons));

    if (!sipCpp)
        return 0;


    {
        {
             ::KEditListWidget::Buttons*sipRes;

            sipRes = new  ::KEditListWidget::Buttons(~(*sipCpp));

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

    return 0;
}


extern "C" {static PyObject *slot_KEditListWidget_Buttons___int__(PyObject *);}
static PyObject *slot_KEditListWidget_Buttons___int__(PyObject *sipSelf)
{
     ::KEditListWidget::Buttons *sipCpp = reinterpret_cast< ::KEditListWidget::Buttons *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KEditListWidget_Buttons));

    if (!sipCpp)
        return 0;


    {
        {
            int sipRes;

            sipRes = *sipCpp;

            return SIPLong_FromLong(sipRes);
        }
    }

    return 0;
}


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


extern "C" {static void assign_KEditListWidget_Buttons(void *, SIP_SSIZE_T, void *);}
static void assign_KEditListWidget_Buttons(void *sipDst, SIP_SSIZE_T sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::KEditListWidget::Buttons *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::KEditListWidget::Buttons *>(sipSrc);
}


extern "C" {static void *array_KEditListWidget_Buttons(SIP_SSIZE_T);}
static void *array_KEditListWidget_Buttons(SIP_SSIZE_T sipNrElem)
{
    return new  ::KEditListWidget::Buttons[sipNrElem];
}


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


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


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

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

            return sipCpp;
        }
    }

    {
        int a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "i", &a0))
        {
            sipCpp = new  ::KEditListWidget::Buttons(a0);

            return sipCpp;
        }
    }

    {
        const  ::KEditListWidget::Buttons* a0;
        int a0State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J1", sipType_KEditListWidget_Buttons, &a0, &a0State))
        {
            sipCpp = new  ::KEditListWidget::Buttons(*a0);
            sipReleaseType(const_cast< ::KEditListWidget::Buttons *>(a0),sipType_KEditListWidget_Buttons,a0State);

            return sipCpp;
        }
    }

    return NULL;
}


extern "C" {static int convertTo_KEditListWidget_Buttons(PyObject *, void **, int *, PyObject *);}
static int convertTo_KEditListWidget_Buttons(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
     ::KEditListWidget::Buttons **sipCppPtr = reinterpret_cast< ::KEditListWidget::Buttons **>(sipCppPtrV);

// Allow an instance of the base enum whenever a KEditListWidget::Buttons is expected.

if (sipIsErr == NULL)
    return (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_KEditListWidget_Button)) ||
            sipCanConvertToType(sipPy, sipType_KEditListWidget_Buttons, SIP_NO_CONVERTORS));

if (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_KEditListWidget_Button)))
{
    *sipCppPtr = new KEditListWidget::Buttons(int(SIPLong_AsLong(sipPy)));

    return sipGetState(sipTransferObj);
}

*sipCppPtr = reinterpret_cast<KEditListWidget::Buttons *>(sipConvertToType(sipPy, sipType_KEditListWidget_Buttons, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr));

return 0;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_KEditListWidget_Buttons[] = {
    {(void *)slot_KEditListWidget_Buttons___hash__, hash_slot},
    {(void *)slot_KEditListWidget_Buttons___bool__, bool_slot},
    {(void *)slot_KEditListWidget_Buttons___ne__, ne_slot},
    {(void *)slot_KEditListWidget_Buttons___eq__, eq_slot},
    {(void *)slot_KEditListWidget_Buttons___ixor__, ixor_slot},
    {(void *)slot_KEditListWidget_Buttons___xor__, xor_slot},
    {(void *)slot_KEditListWidget_Buttons___ior__, ior_slot},
    {(void *)slot_KEditListWidget_Buttons___or__, or_slot},
    {(void *)slot_KEditListWidget_Buttons___iand__, iand_slot},
    {(void *)slot_KEditListWidget_Buttons___and__, and_slot},
    {(void *)slot_KEditListWidget_Buttons___invert__, invert_slot},
    {(void *)slot_KEditListWidget_Buttons___int__, int_slot},
    {0, (sipPySlotType)0}
};


static pyqt5ClassPluginDef plugin_KEditListWidget_Buttons = {
    0,
    1,
    0,
    0
};


sipClassTypeDef sipTypeDef_KWidgetsAddons_KEditListWidget_Buttons = {
    {
        -1,
        0,
        0,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_CLASS,
        sipNameNr_KEditListWidget__Buttons,
        {0},
        &plugin_KEditListWidget_Buttons
    },
    {
        sipNameNr_Buttons,
        {25, 255, 0},
        0, 0,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    0,
    slots_KEditListWidget_Buttons,
    init_type_KEditListWidget_Buttons,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KEditListWidget_Buttons,
    assign_KEditListWidget_Buttons,
    array_KEditListWidget_Buttons,
    copy_KEditListWidget_Buttons,
    release_KEditListWidget_Buttons,
    0,
    convertTo_KEditListWidget_Buttons,
    0,
    0,
    0,
    0,
    0
};
