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

#include "sipAPIKConfigCore.h"

#include <kcoreconfigskeleton.h>
#include <kcoreconfigskeleton.h>

#include <qstring.h>
#include <qvariant.h>
#include <kconfig.h>
#include <kconfiggroup.h>


class sipKCoreConfigSkeleton_ItemProperty : public  ::KCoreConfigSkeleton::ItemProperty
{
public:
    sipKCoreConfigSkeleton_ItemProperty(const  ::QString&,const  ::QString&, ::QVariant&,const  ::QVariant&);
    virtual ~sipKCoreConfigSkeleton_ItemProperty();

    /*
     * There is a public method for every protected method visible from
     * this class.
     */
    void sipProtect_readImmutability(const  ::KConfigGroup&);

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    void readConfig( ::KConfig*);
    void writeConfig( ::KConfig*);
    void readDefault( ::KConfig*);
    void setProperty(const  ::QVariant&);
    bool isEqual(const  ::QVariant&) const;
     ::QVariant property() const;
     ::QVariant minValue() const;
     ::QVariant maxValue() const;
    void setDefault();
    void swapDefault();

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipKCoreConfigSkeleton_ItemProperty(const sipKCoreConfigSkeleton_ItemProperty &);
    sipKCoreConfigSkeleton_ItemProperty &operator = (const sipKCoreConfigSkeleton_ItemProperty &);

    char sipPyMethods[10];
};

sipKCoreConfigSkeleton_ItemProperty::sipKCoreConfigSkeleton_ItemProperty(const  ::QString& a0,const  ::QString& a1, ::QVariant& a2,const  ::QVariant& a3):  ::KCoreConfigSkeleton::ItemProperty(a0,a1,a2,a3), sipPySelf(0)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipKCoreConfigSkeleton_ItemProperty::~sipKCoreConfigSkeleton_ItemProperty()
{
    sipInstanceDestroyed(sipPySelf);
}

void sipKCoreConfigSkeleton_ItemProperty::readConfig( ::KConfig*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[0],sipPySelf,NULL,sipName_readConfig);

    if (!sipMeth)
    {
         ::KCoreConfigSkeleton::ItemProperty::readConfig(a0);
        return;
    }

    extern void sipVH_KConfigCore_9(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::KConfig*);

    sipVH_KConfigCore_9(sipGILState, sipImportedVirtErrorHandlers_KConfigCore_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipKCoreConfigSkeleton_ItemProperty::writeConfig( ::KConfig*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[1],sipPySelf,sipName_ItemProperty,sipName_writeConfig);

    if (!sipMeth)
        return;

    extern void sipVH_KConfigCore_9(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::KConfig*);

    sipVH_KConfigCore_9(sipGILState, sipImportedVirtErrorHandlers_KConfigCore_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipKCoreConfigSkeleton_ItemProperty::readDefault( ::KConfig*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[2],sipPySelf,sipName_ItemProperty,sipName_readDefault);

    if (!sipMeth)
        return;

    extern void sipVH_KConfigCore_9(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::KConfig*);

    sipVH_KConfigCore_9(sipGILState, sipImportedVirtErrorHandlers_KConfigCore_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipKCoreConfigSkeleton_ItemProperty::setProperty(const  ::QVariant& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[3],sipPySelf,NULL,sipName_setProperty);

    if (!sipMeth)
    {
         ::KCoreConfigSkeleton::ItemProperty::setProperty(a0);
        return;
    }

    extern void sipVH_KConfigCore_10(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QVariant&);

    sipVH_KConfigCore_10(sipGILState, sipImportedVirtErrorHandlers_KConfigCore_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipKCoreConfigSkeleton_ItemProperty::isEqual(const  ::QVariant& a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[4]),sipPySelf,NULL,sipName_isEqual);

    if (!sipMeth)
        return  ::KCoreConfigSkeleton::ItemProperty::isEqual(a0);

    extern bool sipVH_KConfigCore_11(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QVariant&);

    return sipVH_KConfigCore_11(sipGILState, sipImportedVirtErrorHandlers_KConfigCore_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

 ::QVariant sipKCoreConfigSkeleton_ItemProperty::property() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[5]),sipPySelf,NULL,sipName_property);

    if (!sipMeth)
        return  ::KCoreConfigSkeleton::ItemProperty::property();

    extern  ::QVariant sipVH_KConfigCore_12(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_KConfigCore_12(sipGILState, sipImportedVirtErrorHandlers_KConfigCore_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

 ::QVariant sipKCoreConfigSkeleton_ItemProperty::minValue() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[6]),sipPySelf,NULL,sipName_minValue);

    if (!sipMeth)
        return  ::KCoreConfigSkeleton::ItemProperty::minValue();

    extern  ::QVariant sipVH_KConfigCore_12(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_KConfigCore_12(sipGILState, sipImportedVirtErrorHandlers_KConfigCore_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

 ::QVariant sipKCoreConfigSkeleton_ItemProperty::maxValue() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[7]),sipPySelf,NULL,sipName_maxValue);

    if (!sipMeth)
        return  ::KCoreConfigSkeleton::ItemProperty::maxValue();

    extern  ::QVariant sipVH_KConfigCore_12(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_KConfigCore_12(sipGILState, sipImportedVirtErrorHandlers_KConfigCore_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

void sipKCoreConfigSkeleton_ItemProperty::setDefault()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[8],sipPySelf,sipName_ItemProperty,sipName_setDefault);

    if (!sipMeth)
        return;

    extern void sipVH_KConfigCore_2(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    sipVH_KConfigCore_2(sipGILState, sipImportedVirtErrorHandlers_KConfigCore_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

void sipKCoreConfigSkeleton_ItemProperty::swapDefault()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[9],sipPySelf,sipName_ItemProperty,sipName_swapDefault);

    if (!sipMeth)
        return;

    extern void sipVH_KConfigCore_2(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    sipVH_KConfigCore_2(sipGILState, sipImportedVirtErrorHandlers_KConfigCore_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

void sipKCoreConfigSkeleton_ItemProperty::sipProtect_readImmutability(const  ::KConfigGroup& a0)
{
     ::KConfigSkeletonItem::readImmutability(a0);
}


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

    {
        const  ::KConfigGroup* a0;
        sipKCoreConfigSkeleton_ItemProperty *sipCpp;

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, NULL, NULL, "BJ9", &sipSelf, sipType_KCoreConfigSkeleton_ItemProperty, &sipCpp, sipType_KConfigGroup, &a0))
        {
            sipCpp->sipProtect_readImmutability(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


extern "C" {static PyObject *meth_KCoreConfigSkeleton_ItemProperty_readConfig(PyObject *, PyObject *);}
static PyObject *meth_KCoreConfigSkeleton_ItemProperty_readConfig(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::KConfig* a0;
         ::KCoreConfigSkeleton::ItemProperty *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KCoreConfigSkeleton_ItemProperty, &sipCpp, sipType_KConfig, &a0))
        {
            (sipSelfWasArg ? sipCpp-> ::KCoreConfigSkeleton::ItemProperty::readConfig(a0) : sipCpp->readConfig(a0));

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


extern "C" {static PyObject *meth_KCoreConfigSkeleton_ItemProperty_setProperty(PyObject *, PyObject *);}
static PyObject *meth_KCoreConfigSkeleton_ItemProperty_setProperty(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QVariant* a0;
        int a0State = 0;
         ::KCoreConfigSkeleton::ItemProperty *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KCoreConfigSkeleton_ItemProperty, &sipCpp, sipType_QVariant, &a0, &a0State))
        {
            (sipSelfWasArg ? sipCpp-> ::KCoreConfigSkeleton::ItemProperty::setProperty(*a0) : sipCpp->setProperty(*a0));
            sipReleaseType(const_cast< ::QVariant *>(a0),sipType_QVariant,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


extern "C" {static PyObject *meth_KCoreConfigSkeleton_ItemProperty_isEqual(PyObject *, PyObject *);}
static PyObject *meth_KCoreConfigSkeleton_ItemProperty_isEqual(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QVariant* a0;
        int a0State = 0;
        const  ::KCoreConfigSkeleton::ItemProperty *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KCoreConfigSkeleton_ItemProperty, &sipCpp, sipType_QVariant, &a0, &a0State))
        {
            bool sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::KCoreConfigSkeleton::ItemProperty::isEqual(*a0) : sipCpp->isEqual(*a0));
            sipReleaseType(const_cast< ::QVariant *>(a0),sipType_QVariant,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

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

    return NULL;
}


extern "C" {static PyObject *meth_KCoreConfigSkeleton_ItemProperty_property(PyObject *, PyObject *);}
static PyObject *meth_KCoreConfigSkeleton_ItemProperty_property(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::KCoreConfigSkeleton::ItemProperty *sipCpp;

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

            sipRes = new  ::QVariant((sipSelfWasArg ? sipCpp-> ::KCoreConfigSkeleton::ItemProperty::property() : sipCpp->property()));

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

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

    return NULL;
}


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_KCoreConfigSkeleton_ItemProperty(void *, const sipTypeDef *);}
static void *cast_KCoreConfigSkeleton_ItemProperty(void *sipCppV, const sipTypeDef *targetType)
{
     ::KCoreConfigSkeleton::ItemProperty *sipCpp = reinterpret_cast< ::KCoreConfigSkeleton::ItemProperty *>(sipCppV);

    if (targetType == sipType_KConfigSkeletonItem)
        return static_cast< ::KConfigSkeletonItem *>(sipCpp);

    return sipCppV;
}


/* Call the instance's destructor. */
extern "C" {static void release_KCoreConfigSkeleton_ItemProperty(void *, int);}
static void release_KCoreConfigSkeleton_ItemProperty(void *sipCppV, int sipState)
{
    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipKCoreConfigSkeleton_ItemProperty *>(sipCppV);
    else
        delete reinterpret_cast< ::KCoreConfigSkeleton::ItemProperty *>(sipCppV);
}


extern "C" {static void dealloc_KCoreConfigSkeleton_ItemProperty(sipSimpleWrapper *);}
static void dealloc_KCoreConfigSkeleton_ItemProperty(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipKCoreConfigSkeleton_ItemProperty *>(sipGetAddress(sipSelf))->sipPySelf = NULL;

    if (sipIsOwnedByPython(sipSelf))
    {
        release_KCoreConfigSkeleton_ItemProperty(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
    }
}


extern "C" {static void *init_type_KCoreConfigSkeleton_ItemProperty(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_KCoreConfigSkeleton_ItemProperty(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    sipKCoreConfigSkeleton_ItemProperty *sipCpp = 0;

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

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return NULL;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_KCoreConfigSkeleton_ItemProperty[] = {{10, 255, 1}};


static PyMethodDef methods_KCoreConfigSkeleton_ItemProperty[] = {
    {SIP_MLNAME_CAST(sipName_isEqual), meth_KCoreConfigSkeleton_ItemProperty_isEqual, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_property), meth_KCoreConfigSkeleton_ItemProperty_property, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_readConfig), meth_KCoreConfigSkeleton_ItemProperty_readConfig, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_readImmutability), (PyCFunction)meth_KCoreConfigSkeleton_ItemProperty_readImmutability, METH_VARARGS|METH_KEYWORDS, NULL},
    {SIP_MLNAME_CAST(sipName_setProperty), meth_KCoreConfigSkeleton_ItemProperty_setProperty, METH_VARARGS, NULL}
};


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


sipClassTypeDef sipTypeDef_KConfigCore_KCoreConfigSkeleton_ItemProperty = {
    {
        -1,
        0,
        0,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SUPER_INIT|SIP_TYPE_CLASS,
        sipNameNr_KCoreConfigSkeleton__ItemProperty,
        {0},
        &plugin_KCoreConfigSkeleton_ItemProperty
    },
    {
        sipNameNr_ItemProperty,
        {11, 255, 0},
        5, methods_KCoreConfigSkeleton_ItemProperty,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    supers_KCoreConfigSkeleton_ItemProperty,
    0,
    init_type_KCoreConfigSkeleton_ItemProperty,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KCoreConfigSkeleton_ItemProperty,
    0,
    0,
    0,
    release_KCoreConfigSkeleton_ItemProperty,
    cast_KCoreConfigSkeleton_ItemProperty,
    0,
    0,
    0,
    0,
    0,
    0
};
