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

#include "sipAPIKGuiAddons.h"

#include <kfontutils.h>

#include <kfontutils.h>


extern "C" {static long slot_KFontUtils_AdaptFontSizeOptions___hash__(PyObject *);}
static long slot_KFontUtils_AdaptFontSizeOptions___hash__(PyObject *sipSelf)
{
     ::KFontUtils::AdaptFontSizeOptions *sipCpp = reinterpret_cast< ::KFontUtils::AdaptFontSizeOptions *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KFontUtils_AdaptFontSizeOptions));

    if (!sipCpp)
        return 0;


    {
        {
            long sipRes = 0;

        sipRes = sipCpp->operator KFontUtils::AdaptFontSizeOptions::Int();

            return sipRes;
        }
    }

    return 0;
}


extern "C" {static int slot_KFontUtils_AdaptFontSizeOptions___bool__(PyObject *);}
static int slot_KFontUtils_AdaptFontSizeOptions___bool__(PyObject *sipSelf)
{
     ::KFontUtils::AdaptFontSizeOptions *sipCpp = reinterpret_cast< ::KFontUtils::AdaptFontSizeOptions *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KFontUtils_AdaptFontSizeOptions));

    if (!sipCpp)
        return -1;


    {
        {
            int sipRes = 0;

        sipRes = (sipCpp->operator KFontUtils::AdaptFontSizeOptions::Int() != 0);

            return sipRes;
        }
    }

    return 0;
}


extern "C" {static PyObject *slot_KFontUtils_AdaptFontSizeOptions___ne__(PyObject *,PyObject *);}
static PyObject *slot_KFontUtils_AdaptFontSizeOptions___ne__(PyObject *sipSelf,PyObject *sipArg)
{
     ::KFontUtils::AdaptFontSizeOptions *sipCpp = reinterpret_cast< ::KFontUtils::AdaptFontSizeOptions *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KFontUtils_AdaptFontSizeOptions));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        const  ::KFontUtils::AdaptFontSizeOptions* a0;
        int a0State = 0;

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

        sipRes = (sipCpp->operator KFontUtils::AdaptFontSizeOptions::Int() != a0->operator KFontUtils::AdaptFontSizeOptions::Int());
            sipReleaseType(const_cast< ::KFontUtils::AdaptFontSizeOptions *>(a0),sipType_KFontUtils_AdaptFontSizeOptions,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_KGuiAddons, ne_slot, sipType_KFontUtils_AdaptFontSizeOptions, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_KFontUtils_AdaptFontSizeOptions___eq__(PyObject *,PyObject *);}
static PyObject *slot_KFontUtils_AdaptFontSizeOptions___eq__(PyObject *sipSelf,PyObject *sipArg)
{
     ::KFontUtils::AdaptFontSizeOptions *sipCpp = reinterpret_cast< ::KFontUtils::AdaptFontSizeOptions *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KFontUtils_AdaptFontSizeOptions));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        const  ::KFontUtils::AdaptFontSizeOptions* a0;
        int a0State = 0;

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

        sipRes = (sipCpp->operator KFontUtils::AdaptFontSizeOptions::Int() == a0->operator KFontUtils::AdaptFontSizeOptions::Int());
            sipReleaseType(const_cast< ::KFontUtils::AdaptFontSizeOptions *>(a0),sipType_KFontUtils_AdaptFontSizeOptions,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_KGuiAddons, eq_slot, sipType_KFontUtils_AdaptFontSizeOptions, sipSelf, sipArg);
}


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

     ::KFontUtils::AdaptFontSizeOptions *sipCpp = reinterpret_cast< ::KFontUtils::AdaptFontSizeOptions *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KFontUtils_AdaptFontSizeOptions));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        int a0;

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

    {
         ::KFontUtils::AdaptFontSizeOptions* a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_KFontUtils_AdaptFontSizeOptions, &a0, &a0State, &a1))
        {
             ::KFontUtils::AdaptFontSizeOptions*sipRes;

            sipRes = new  ::KFontUtils::AdaptFontSizeOptions((*a0 ^ a1));
            sipReleaseType(a0,sipType_KFontUtils_AdaptFontSizeOptions,a0State);

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

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

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


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

     ::KFontUtils::AdaptFontSizeOptions *sipCpp = reinterpret_cast< ::KFontUtils::AdaptFontSizeOptions *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KFontUtils_AdaptFontSizeOptions));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        int a0;

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

    {
         ::KFontUtils::AdaptFontSizeOptions* a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_KFontUtils_AdaptFontSizeOptions, &a0, &a0State, &a1))
        {
             ::KFontUtils::AdaptFontSizeOptions*sipRes;

            sipRes = new  ::KFontUtils::AdaptFontSizeOptions((*a0 | a1));
            sipReleaseType(a0,sipType_KFontUtils_AdaptFontSizeOptions,a0State);

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

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

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


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

     ::KFontUtils::AdaptFontSizeOptions *sipCpp = reinterpret_cast< ::KFontUtils::AdaptFontSizeOptions *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KFontUtils_AdaptFontSizeOptions));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        int a0;

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

    {
         ::KFontUtils::AdaptFontSizeOptions* a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_KFontUtils_AdaptFontSizeOptions, &a0, &a0State, &a1))
        {
             ::KFontUtils::AdaptFontSizeOptions*sipRes;

            sipRes = new  ::KFontUtils::AdaptFontSizeOptions((*a0 & a1));
            sipReleaseType(a0,sipType_KFontUtils_AdaptFontSizeOptions,a0State);

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

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

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


extern "C" {static PyObject *slot_KFontUtils_AdaptFontSizeOptions___invert__(PyObject *);}
static PyObject *slot_KFontUtils_AdaptFontSizeOptions___invert__(PyObject *sipSelf)
{
     ::KFontUtils::AdaptFontSizeOptions *sipCpp = reinterpret_cast< ::KFontUtils::AdaptFontSizeOptions *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KFontUtils_AdaptFontSizeOptions));

    if (!sipCpp)
        return 0;


    {
        {
             ::KFontUtils::AdaptFontSizeOptions*sipRes;

            sipRes = new  ::KFontUtils::AdaptFontSizeOptions(~(*sipCpp));

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

    return 0;
}


extern "C" {static PyObject *slot_KFontUtils_AdaptFontSizeOptions___int__(PyObject *);}
static PyObject *slot_KFontUtils_AdaptFontSizeOptions___int__(PyObject *sipSelf)
{
     ::KFontUtils::AdaptFontSizeOptions *sipCpp = reinterpret_cast< ::KFontUtils::AdaptFontSizeOptions *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KFontUtils_AdaptFontSizeOptions));

    if (!sipCpp)
        return 0;


    {
        {
            int sipRes;

            sipRes = *sipCpp;

            return SIPLong_FromLong(sipRes);
        }
    }

    return 0;
}


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


extern "C" {static void assign_KFontUtils_AdaptFontSizeOptions(void *, SIP_SSIZE_T, void *);}
static void assign_KFontUtils_AdaptFontSizeOptions(void *sipDst, SIP_SSIZE_T sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::KFontUtils::AdaptFontSizeOptions *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::KFontUtils::AdaptFontSizeOptions *>(sipSrc);
}


extern "C" {static void *array_KFontUtils_AdaptFontSizeOptions(SIP_SSIZE_T);}
static void *array_KFontUtils_AdaptFontSizeOptions(SIP_SSIZE_T sipNrElem)
{
    return new  ::KFontUtils::AdaptFontSizeOptions[sipNrElem];
}


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


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


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

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

            return sipCpp;
        }
    }

    {
        int a0;

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

            return sipCpp;
        }
    }

    {
        const  ::KFontUtils::AdaptFontSizeOptions* a0;
        int a0State = 0;

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

            return sipCpp;
        }
    }

    return NULL;
}


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

// Allow an instance of the base enum whenever a KFontUtils::AdaptFontSizeOptions is expected.

if (sipIsErr == NULL)
    return (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_KFontUtils_AdaptFontSizeOption)) ||
            sipCanConvertToType(sipPy, sipType_KFontUtils_AdaptFontSizeOptions, SIP_NO_CONVERTORS));

if (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_KFontUtils_AdaptFontSizeOption)))
{
    *sipCppPtr = new KFontUtils::AdaptFontSizeOptions(int(SIPLong_AsLong(sipPy)));

    return sipGetState(sipTransferObj);
}

*sipCppPtr = reinterpret_cast<KFontUtils::AdaptFontSizeOptions *>(sipConvertToType(sipPy, sipType_KFontUtils_AdaptFontSizeOptions, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr));

return 0;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_KFontUtils_AdaptFontSizeOptions[] = {
    {(void *)slot_KFontUtils_AdaptFontSizeOptions___hash__, hash_slot},
    {(void *)slot_KFontUtils_AdaptFontSizeOptions___bool__, bool_slot},
    {(void *)slot_KFontUtils_AdaptFontSizeOptions___ne__, ne_slot},
    {(void *)slot_KFontUtils_AdaptFontSizeOptions___eq__, eq_slot},
    {(void *)slot_KFontUtils_AdaptFontSizeOptions___ixor__, ixor_slot},
    {(void *)slot_KFontUtils_AdaptFontSizeOptions___xor__, xor_slot},
    {(void *)slot_KFontUtils_AdaptFontSizeOptions___ior__, ior_slot},
    {(void *)slot_KFontUtils_AdaptFontSizeOptions___or__, or_slot},
    {(void *)slot_KFontUtils_AdaptFontSizeOptions___iand__, iand_slot},
    {(void *)slot_KFontUtils_AdaptFontSizeOptions___and__, and_slot},
    {(void *)slot_KFontUtils_AdaptFontSizeOptions___invert__, invert_slot},
    {(void *)slot_KFontUtils_AdaptFontSizeOptions___int__, int_slot},
    {0, (sipPySlotType)0}
};


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


sipClassTypeDef sipTypeDef_KGuiAddons_KFontUtils_AdaptFontSizeOptions = {
    {
        -1,
        0,
        0,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_CLASS,
        sipNameNr_KFontUtils__AdaptFontSizeOptions,
        {0},
        &plugin_KFontUtils_AdaptFontSizeOptions
    },
    {
        sipNameNr_AdaptFontSizeOptions,
        {5, 255, 0},
        0, 0,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    0,
    slots_KFontUtils_AdaptFontSizeOptions,
    init_type_KFontUtils_AdaptFontSizeOptions,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KFontUtils_AdaptFontSizeOptions,
    assign_KFontUtils_AdaptFontSizeOptions,
    array_KFontUtils_AdaptFontSizeOptions,
    copy_KFontUtils_AdaptFontSizeOptions,
    release_KFontUtils_AdaptFontSizeOptions,
    0,
    convertTo_KFontUtils_AdaptFontSizeOptions,
    0,
    0,
    0,
    0,
    0
};
