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

#include "sipAPIKWidgetsAddons.h"

#include <kcharselect.h>

#include <kcharselect.h>


extern "C" {static long slot_KCharSelect_Controls___hash__(PyObject *);}
static long slot_KCharSelect_Controls___hash__(PyObject *sipSelf)
{
     ::KCharSelect::Controls *sipCpp = reinterpret_cast< ::KCharSelect::Controls *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KCharSelect_Controls));

    if (!sipCpp)
        return 0;


    {
        {
            long sipRes = 0;

        sipRes = sipCpp->operator KCharSelect::Controls::Int();

            return sipRes;
        }
    }

    return 0;
}


extern "C" {static int slot_KCharSelect_Controls___bool__(PyObject *);}
static int slot_KCharSelect_Controls___bool__(PyObject *sipSelf)
{
     ::KCharSelect::Controls *sipCpp = reinterpret_cast< ::KCharSelect::Controls *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KCharSelect_Controls));

    if (!sipCpp)
        return -1;


    {
        {
            int sipRes = 0;

        sipRes = (sipCpp->operator KCharSelect::Controls::Int() != 0);

            return sipRes;
        }
    }

    return 0;
}


extern "C" {static PyObject *slot_KCharSelect_Controls___ne__(PyObject *,PyObject *);}
static PyObject *slot_KCharSelect_Controls___ne__(PyObject *sipSelf,PyObject *sipArg)
{
     ::KCharSelect::Controls *sipCpp = reinterpret_cast< ::KCharSelect::Controls *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KCharSelect_Controls));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        const  ::KCharSelect::Controls* a0;
        int a0State = 0;

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

        sipRes = (sipCpp->operator KCharSelect::Controls::Int() != a0->operator KCharSelect::Controls::Int());
            sipReleaseType(const_cast< ::KCharSelect::Controls *>(a0),sipType_KCharSelect_Controls,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

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


extern "C" {static PyObject *slot_KCharSelect_Controls___eq__(PyObject *,PyObject *);}
static PyObject *slot_KCharSelect_Controls___eq__(PyObject *sipSelf,PyObject *sipArg)
{
     ::KCharSelect::Controls *sipCpp = reinterpret_cast< ::KCharSelect::Controls *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KCharSelect_Controls));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        const  ::KCharSelect::Controls* a0;
        int a0State = 0;

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

        sipRes = (sipCpp->operator KCharSelect::Controls::Int() == a0->operator KCharSelect::Controls::Int());
            sipReleaseType(const_cast< ::KCharSelect::Controls *>(a0),sipType_KCharSelect_Controls,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

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


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

     ::KCharSelect::Controls *sipCpp = reinterpret_cast< ::KCharSelect::Controls *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KCharSelect_Controls));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &a0))
        {
        *sipCpp = KCharSelect::Controls(*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_KCharSelect_Controls___xor__(PyObject *,PyObject *);}
static PyObject *slot_KCharSelect_Controls___xor__(PyObject *sipArg0,PyObject *sipArg1)
{
    PyObject *sipParseErr = NULL;

    {
         ::KCharSelect::Controls* a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_KCharSelect_Controls, &a0, &a0State, &a1))
        {
             ::KCharSelect::Controls*sipRes;

            sipRes = new  ::KCharSelect::Controls((*a0 ^ a1));
            sipReleaseType(a0,sipType_KCharSelect_Controls,a0State);

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

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

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


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

     ::KCharSelect::Controls *sipCpp = reinterpret_cast< ::KCharSelect::Controls *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KCharSelect_Controls));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &a0))
        {
        *sipCpp = KCharSelect::Controls(*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_KCharSelect_Controls___or__(PyObject *,PyObject *);}
static PyObject *slot_KCharSelect_Controls___or__(PyObject *sipArg0,PyObject *sipArg1)
{
    PyObject *sipParseErr = NULL;

    {
         ::KCharSelect::Controls* a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_KCharSelect_Controls, &a0, &a0State, &a1))
        {
             ::KCharSelect::Controls*sipRes;

            sipRes = new  ::KCharSelect::Controls((*a0 | a1));
            sipReleaseType(a0,sipType_KCharSelect_Controls,a0State);

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

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

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


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

     ::KCharSelect::Controls *sipCpp = reinterpret_cast< ::KCharSelect::Controls *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KCharSelect_Controls));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &a0))
        {
            sipCpp-> ::KCharSelect::Controls::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_KCharSelect_Controls___and__(PyObject *,PyObject *);}
static PyObject *slot_KCharSelect_Controls___and__(PyObject *sipArg0,PyObject *sipArg1)
{
    PyObject *sipParseErr = NULL;

    {
         ::KCharSelect::Controls* a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_KCharSelect_Controls, &a0, &a0State, &a1))
        {
             ::KCharSelect::Controls*sipRes;

            sipRes = new  ::KCharSelect::Controls((*a0 & a1));
            sipReleaseType(a0,sipType_KCharSelect_Controls,a0State);

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

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

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


extern "C" {static PyObject *slot_KCharSelect_Controls___invert__(PyObject *);}
static PyObject *slot_KCharSelect_Controls___invert__(PyObject *sipSelf)
{
     ::KCharSelect::Controls *sipCpp = reinterpret_cast< ::KCharSelect::Controls *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KCharSelect_Controls));

    if (!sipCpp)
        return 0;


    {
        {
             ::KCharSelect::Controls*sipRes;

            sipRes = new  ::KCharSelect::Controls(~(*sipCpp));

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

    return 0;
}


extern "C" {static PyObject *slot_KCharSelect_Controls___int__(PyObject *);}
static PyObject *slot_KCharSelect_Controls___int__(PyObject *sipSelf)
{
     ::KCharSelect::Controls *sipCpp = reinterpret_cast< ::KCharSelect::Controls *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KCharSelect_Controls));

    if (!sipCpp)
        return 0;


    {
        {
            int sipRes;

            sipRes = *sipCpp;

            return SIPLong_FromLong(sipRes);
        }
    }

    return 0;
}


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


extern "C" {static void assign_KCharSelect_Controls(void *, SIP_SSIZE_T, void *);}
static void assign_KCharSelect_Controls(void *sipDst, SIP_SSIZE_T sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::KCharSelect::Controls *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::KCharSelect::Controls *>(sipSrc);
}


extern "C" {static void *array_KCharSelect_Controls(SIP_SSIZE_T);}
static void *array_KCharSelect_Controls(SIP_SSIZE_T sipNrElem)
{
    return new  ::KCharSelect::Controls[sipNrElem];
}


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


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


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

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

            return sipCpp;
        }
    }

    {
        int a0;

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

            return sipCpp;
        }
    }

    {
        const  ::KCharSelect::Controls* a0;
        int a0State = 0;

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

            return sipCpp;
        }
    }

    return NULL;
}


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

// Allow an instance of the base enum whenever a KCharSelect::Controls is expected.

if (sipIsErr == NULL)
    return (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_KCharSelect_Control)) ||
            sipCanConvertToType(sipPy, sipType_KCharSelect_Controls, SIP_NO_CONVERTORS));

if (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_KCharSelect_Control)))
{
    *sipCppPtr = new KCharSelect::Controls(int(SIPLong_AsLong(sipPy)));

    return sipGetState(sipTransferObj);
}

*sipCppPtr = reinterpret_cast<KCharSelect::Controls *>(sipConvertToType(sipPy, sipType_KCharSelect_Controls, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr));

return 0;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_KCharSelect_Controls[] = {
    {(void *)slot_KCharSelect_Controls___hash__, hash_slot},
    {(void *)slot_KCharSelect_Controls___bool__, bool_slot},
    {(void *)slot_KCharSelect_Controls___ne__, ne_slot},
    {(void *)slot_KCharSelect_Controls___eq__, eq_slot},
    {(void *)slot_KCharSelect_Controls___ixor__, ixor_slot},
    {(void *)slot_KCharSelect_Controls___xor__, xor_slot},
    {(void *)slot_KCharSelect_Controls___ior__, ior_slot},
    {(void *)slot_KCharSelect_Controls___or__, or_slot},
    {(void *)slot_KCharSelect_Controls___iand__, iand_slot},
    {(void *)slot_KCharSelect_Controls___and__, and_slot},
    {(void *)slot_KCharSelect_Controls___invert__, invert_slot},
    {(void *)slot_KCharSelect_Controls___int__, int_slot},
    {0, (sipPySlotType)0}
};


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


sipClassTypeDef sipTypeDef_KWidgetsAddons_KCharSelect_Controls = {
    {
        -1,
        0,
        0,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_CLASS,
        sipNameNr_KCharSelect__Controls,
        {0},
        &plugin_KCharSelect_Controls
    },
    {
        sipNameNr_Controls,
        {9, 255, 0},
        0, 0,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    0,
    slots_KCharSelect_Controls,
    init_type_KCharSelect_Controls,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KCharSelect_Controls,
    assign_KCharSelect_Controls,
    array_KCharSelect_Controls,
    copy_KCharSelect_Controls,
    release_KCharSelect_Controls,
    0,
    convertTo_KCharSelect_Controls,
    0,
    0,
    0,
    0,
    0
};
