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

#include "sipAPIKWidgetsAddons.h"

#include <kpassworddialog.h>

#include <kpassworddialog.h>


extern "C" {static long slot_KPasswordDialog_KPasswordDialogFlags___hash__(PyObject *);}
static long slot_KPasswordDialog_KPasswordDialogFlags___hash__(PyObject *sipSelf)
{
     ::KPasswordDialog::KPasswordDialogFlags *sipCpp = reinterpret_cast< ::KPasswordDialog::KPasswordDialogFlags *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KPasswordDialog_KPasswordDialogFlags));

    if (!sipCpp)
        return 0;


    {
        {
            long sipRes = 0;

        sipRes = sipCpp->operator KPasswordDialog::KPasswordDialogFlags::Int();

            return sipRes;
        }
    }

    return 0;
}


extern "C" {static int slot_KPasswordDialog_KPasswordDialogFlags___bool__(PyObject *);}
static int slot_KPasswordDialog_KPasswordDialogFlags___bool__(PyObject *sipSelf)
{
     ::KPasswordDialog::KPasswordDialogFlags *sipCpp = reinterpret_cast< ::KPasswordDialog::KPasswordDialogFlags *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KPasswordDialog_KPasswordDialogFlags));

    if (!sipCpp)
        return -1;


    {
        {
            int sipRes = 0;

        sipRes = (sipCpp->operator KPasswordDialog::KPasswordDialogFlags::Int() != 0);

            return sipRes;
        }
    }

    return 0;
}


extern "C" {static PyObject *slot_KPasswordDialog_KPasswordDialogFlags___ne__(PyObject *,PyObject *);}
static PyObject *slot_KPasswordDialog_KPasswordDialogFlags___ne__(PyObject *sipSelf,PyObject *sipArg)
{
     ::KPasswordDialog::KPasswordDialogFlags *sipCpp = reinterpret_cast< ::KPasswordDialog::KPasswordDialogFlags *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KPasswordDialog_KPasswordDialogFlags));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        const  ::KPasswordDialog::KPasswordDialogFlags* a0;
        int a0State = 0;

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

        sipRes = (sipCpp->operator KPasswordDialog::KPasswordDialogFlags::Int() != a0->operator KPasswordDialog::KPasswordDialogFlags::Int());
            sipReleaseType(const_cast< ::KPasswordDialog::KPasswordDialogFlags *>(a0),sipType_KPasswordDialog_KPasswordDialogFlags,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

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


extern "C" {static PyObject *slot_KPasswordDialog_KPasswordDialogFlags___eq__(PyObject *,PyObject *);}
static PyObject *slot_KPasswordDialog_KPasswordDialogFlags___eq__(PyObject *sipSelf,PyObject *sipArg)
{
     ::KPasswordDialog::KPasswordDialogFlags *sipCpp = reinterpret_cast< ::KPasswordDialog::KPasswordDialogFlags *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KPasswordDialog_KPasswordDialogFlags));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        const  ::KPasswordDialog::KPasswordDialogFlags* a0;
        int a0State = 0;

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

        sipRes = (sipCpp->operator KPasswordDialog::KPasswordDialogFlags::Int() == a0->operator KPasswordDialog::KPasswordDialogFlags::Int());
            sipReleaseType(const_cast< ::KPasswordDialog::KPasswordDialogFlags *>(a0),sipType_KPasswordDialog_KPasswordDialogFlags,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

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


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

     ::KPasswordDialog::KPasswordDialogFlags *sipCpp = reinterpret_cast< ::KPasswordDialog::KPasswordDialogFlags *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KPasswordDialog_KPasswordDialogFlags));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        int a0;

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

    {
         ::KPasswordDialog::KPasswordDialogFlags* a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_KPasswordDialog_KPasswordDialogFlags, &a0, &a0State, &a1))
        {
             ::KPasswordDialog::KPasswordDialogFlags*sipRes;

            sipRes = new  ::KPasswordDialog::KPasswordDialogFlags((*a0 ^ a1));
            sipReleaseType(a0,sipType_KPasswordDialog_KPasswordDialogFlags,a0State);

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

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

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


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

     ::KPasswordDialog::KPasswordDialogFlags *sipCpp = reinterpret_cast< ::KPasswordDialog::KPasswordDialogFlags *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KPasswordDialog_KPasswordDialogFlags));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        int a0;

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

    {
         ::KPasswordDialog::KPasswordDialogFlags* a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_KPasswordDialog_KPasswordDialogFlags, &a0, &a0State, &a1))
        {
             ::KPasswordDialog::KPasswordDialogFlags*sipRes;

            sipRes = new  ::KPasswordDialog::KPasswordDialogFlags((*a0 | a1));
            sipReleaseType(a0,sipType_KPasswordDialog_KPasswordDialogFlags,a0State);

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

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

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


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

     ::KPasswordDialog::KPasswordDialogFlags *sipCpp = reinterpret_cast< ::KPasswordDialog::KPasswordDialogFlags *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KPasswordDialog_KPasswordDialogFlags));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        int a0;

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

    {
         ::KPasswordDialog::KPasswordDialogFlags* a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_KPasswordDialog_KPasswordDialogFlags, &a0, &a0State, &a1))
        {
             ::KPasswordDialog::KPasswordDialogFlags*sipRes;

            sipRes = new  ::KPasswordDialog::KPasswordDialogFlags((*a0 & a1));
            sipReleaseType(a0,sipType_KPasswordDialog_KPasswordDialogFlags,a0State);

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

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

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


extern "C" {static PyObject *slot_KPasswordDialog_KPasswordDialogFlags___invert__(PyObject *);}
static PyObject *slot_KPasswordDialog_KPasswordDialogFlags___invert__(PyObject *sipSelf)
{
     ::KPasswordDialog::KPasswordDialogFlags *sipCpp = reinterpret_cast< ::KPasswordDialog::KPasswordDialogFlags *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KPasswordDialog_KPasswordDialogFlags));

    if (!sipCpp)
        return 0;


    {
        {
             ::KPasswordDialog::KPasswordDialogFlags*sipRes;

            sipRes = new  ::KPasswordDialog::KPasswordDialogFlags(~(*sipCpp));

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

    return 0;
}


extern "C" {static PyObject *slot_KPasswordDialog_KPasswordDialogFlags___int__(PyObject *);}
static PyObject *slot_KPasswordDialog_KPasswordDialogFlags___int__(PyObject *sipSelf)
{
     ::KPasswordDialog::KPasswordDialogFlags *sipCpp = reinterpret_cast< ::KPasswordDialog::KPasswordDialogFlags *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KPasswordDialog_KPasswordDialogFlags));

    if (!sipCpp)
        return 0;


    {
        {
            int sipRes;

            sipRes = *sipCpp;

            return SIPLong_FromLong(sipRes);
        }
    }

    return 0;
}


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


extern "C" {static void assign_KPasswordDialog_KPasswordDialogFlags(void *, SIP_SSIZE_T, void *);}
static void assign_KPasswordDialog_KPasswordDialogFlags(void *sipDst, SIP_SSIZE_T sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::KPasswordDialog::KPasswordDialogFlags *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::KPasswordDialog::KPasswordDialogFlags *>(sipSrc);
}


extern "C" {static void *array_KPasswordDialog_KPasswordDialogFlags(SIP_SSIZE_T);}
static void *array_KPasswordDialog_KPasswordDialogFlags(SIP_SSIZE_T sipNrElem)
{
    return new  ::KPasswordDialog::KPasswordDialogFlags[sipNrElem];
}


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


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


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

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

            return sipCpp;
        }
    }

    {
        int a0;

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

            return sipCpp;
        }
    }

    {
        const  ::KPasswordDialog::KPasswordDialogFlags* a0;
        int a0State = 0;

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

            return sipCpp;
        }
    }

    return NULL;
}


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

// Allow an instance of the base enum whenever a KPasswordDialog::KPasswordDialogFlags is expected.

if (sipIsErr == NULL)
    return (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_KPasswordDialog_KPasswordDialogFlag)) ||
            sipCanConvertToType(sipPy, sipType_KPasswordDialog_KPasswordDialogFlags, SIP_NO_CONVERTORS));

if (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_KPasswordDialog_KPasswordDialogFlag)))
{
    *sipCppPtr = new KPasswordDialog::KPasswordDialogFlags(int(SIPLong_AsLong(sipPy)));

    return sipGetState(sipTransferObj);
}

*sipCppPtr = reinterpret_cast<KPasswordDialog::KPasswordDialogFlags *>(sipConvertToType(sipPy, sipType_KPasswordDialog_KPasswordDialogFlags, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr));

return 0;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_KPasswordDialog_KPasswordDialogFlags[] = {
    {(void *)slot_KPasswordDialog_KPasswordDialogFlags___hash__, hash_slot},
    {(void *)slot_KPasswordDialog_KPasswordDialogFlags___bool__, bool_slot},
    {(void *)slot_KPasswordDialog_KPasswordDialogFlags___ne__, ne_slot},
    {(void *)slot_KPasswordDialog_KPasswordDialogFlags___eq__, eq_slot},
    {(void *)slot_KPasswordDialog_KPasswordDialogFlags___ixor__, ixor_slot},
    {(void *)slot_KPasswordDialog_KPasswordDialogFlags___xor__, xor_slot},
    {(void *)slot_KPasswordDialog_KPasswordDialogFlags___ior__, ior_slot},
    {(void *)slot_KPasswordDialog_KPasswordDialogFlags___or__, or_slot},
    {(void *)slot_KPasswordDialog_KPasswordDialogFlags___iand__, iand_slot},
    {(void *)slot_KPasswordDialog_KPasswordDialogFlags___and__, and_slot},
    {(void *)slot_KPasswordDialog_KPasswordDialogFlags___invert__, invert_slot},
    {(void *)slot_KPasswordDialog_KPasswordDialogFlags___int__, int_slot},
    {0, (sipPySlotType)0}
};


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


sipClassTypeDef sipTypeDef_KWidgetsAddons_KPasswordDialog_KPasswordDialogFlags = {
    {
        -1,
        0,
        0,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_CLASS,
        sipNameNr_KPasswordDialog__KPasswordDialogFlags,
        {0},
        &plugin_KPasswordDialog_KPasswordDialogFlags
    },
    {
        sipNameNr_KPasswordDialogFlags,
        {63, 255, 0},
        0, 0,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    0,
    slots_KPasswordDialog_KPasswordDialogFlags,
    init_type_KPasswordDialog_KPasswordDialogFlags,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KPasswordDialog_KPasswordDialogFlags,
    assign_KPasswordDialog_KPasswordDialogFlags,
    array_KPasswordDialog_KPasswordDialogFlags,
    copy_KPasswordDialog_KPasswordDialogFlags,
    release_KPasswordDialog_KPasswordDialogFlags,
    0,
    convertTo_KPasswordDialog_KPasswordDialogFlags,
    0,
    0,
    0,
    0,
    0
};
