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

#include "sipAPIKGuiAddons.h"

#include <kcolorcollection.h>

#include <qstring.h>
#include <qcolor.h>
#include <qstringlist.h>


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

    {
        if (sipParseArgs(&sipParseErr, sipArgs, ""))
        {
             ::QStringList*sipRes;

            sipRes = new  ::QStringList( ::KColorCollection::installedCollections());

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

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

    return NULL;
}


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

    {
         ::KColorCollection *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KColorCollection, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->save();

            return PyBool_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        const  ::KColorCollection *sipCpp;

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

            sipRes = new  ::QString(sipCpp->description());

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

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

    return NULL;
}


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

    {
        const  ::QString* a0;
        int a0State = 0;
         ::KColorCollection *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KColorCollection, &sipCpp, sipType_QString,&a0, &a0State))
        {
            sipCpp->setDescription(*a0);
            sipReleaseType(const_cast< ::QString *>(a0),sipType_QString,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        const  ::KColorCollection *sipCpp;

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

            sipRes = new  ::QString(sipCpp->name());

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

    {
        int a0;
        const  ::KColorCollection *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_KColorCollection, &sipCpp, &a0))
        {
             ::QString*sipRes;

            sipRes = new  ::QString(sipCpp->name(a0));

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

    {
        const  ::QColor* a0;
        int a0State = 0;
        const  ::KColorCollection *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KColorCollection, &sipCpp, sipType_QColor, &a0, &a0State))
        {
             ::QString*sipRes;

            sipRes = new  ::QString(sipCpp->name(*a0));
            sipReleaseType(const_cast< ::QColor *>(a0),sipType_QColor,a0State);

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

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

    return NULL;
}


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

    {
        const  ::QString* a0;
        int a0State = 0;
         ::KColorCollection *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KColorCollection, &sipCpp, sipType_QString,&a0, &a0State))
        {
            sipCpp->setName(*a0);
            sipReleaseType(const_cast< ::QString *>(a0),sipType_QString,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        const  ::KColorCollection *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KColorCollection, &sipCpp))
        {
             ::KColorCollection::Editable sipRes;

            sipRes = sipCpp->editable();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_KColorCollection_Editable);
        }
    }

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

    return NULL;
}


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

    {
         ::KColorCollection::Editable a0;
         ::KColorCollection *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_KColorCollection, &sipCpp, sipType_KColorCollection_Editable, &a0))
        {
            sipCpp->setEditable(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        const  ::KColorCollection *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KColorCollection, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->count();

            return SIPLong_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        int a0;
        const  ::KColorCollection *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_KColorCollection, &sipCpp, &a0))
        {
             ::QColor*sipRes;

            sipRes = new  ::QColor(sipCpp->color(a0));

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

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

    return NULL;
}


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

    {
        const  ::QColor* a0;
        int a0State = 0;
        const  ::KColorCollection *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KColorCollection, &sipCpp, sipType_QColor, &a0, &a0State))
        {
            int sipRes;

            sipRes = sipCpp->findColor(*a0);
            sipReleaseType(const_cast< ::QColor *>(a0),sipType_QColor,a0State);

            return SIPLong_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        const  ::QColor* a0;
        int a0State = 0;
        const  ::QString& a1def = QString();
        const  ::QString* a1 = &a1def;
        int a1State = 0;
         ::KColorCollection *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1|J1", &sipSelf, sipType_KColorCollection, &sipCpp, sipType_QColor, &a0, &a0State, sipType_QString,&a1, &a1State))
        {
            int sipRes;

            sipRes = sipCpp->addColor(*a0,*a1);
            sipReleaseType(const_cast< ::QColor *>(a0),sipType_QColor,a0State);
            sipReleaseType(const_cast< ::QString *>(a1),sipType_QString,a1State);

            return SIPLong_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        int a0;
        const  ::QColor* a1;
        int a1State = 0;
        const  ::QString& a2def = QString();
        const  ::QString* a2 = &a2def;
        int a2State = 0;
         ::KColorCollection *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BiJ1|J1", &sipSelf, sipType_KColorCollection, &sipCpp, &a0, sipType_QColor, &a1, &a1State, sipType_QString,&a2, &a2State))
        {
            int sipRes;

            sipRes = sipCpp->changeColor(a0,*a1,*a2);
            sipReleaseType(const_cast< ::QColor *>(a1),sipType_QColor,a1State);
            sipReleaseType(const_cast< ::QString *>(a2),sipType_QString,a2State);

            return SIPLong_FromLong(sipRes);
        }
    }

    {
        const  ::QColor* a0;
        int a0State = 0;
        const  ::QColor* a1;
        int a1State = 0;
        const  ::QString& a2def = QString();
        const  ::QString* a2 = &a2def;
        int a2State = 0;
         ::KColorCollection *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1J1|J1", &sipSelf, sipType_KColorCollection, &sipCpp, sipType_QColor, &a0, &a0State, sipType_QColor, &a1, &a1State, sipType_QString,&a2, &a2State))
        {
            int sipRes;

            sipRes = sipCpp->changeColor(*a0,*a1,*a2);
            sipReleaseType(const_cast< ::QColor *>(a0),sipType_QColor,a0State);
            sipReleaseType(const_cast< ::QColor *>(a1),sipType_QColor,a1State);
            sipReleaseType(const_cast< ::QString *>(a2),sipType_QString,a2State);

            return SIPLong_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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


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


extern "C" {static void *array_KColorCollection(SIP_SSIZE_T);}
static void *array_KColorCollection(SIP_SSIZE_T sipNrElem)
{
    return new  ::KColorCollection[sipNrElem];
}


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


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


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

    {
        const  ::QString& a0def = QString();
        const  ::QString* a0 = &a0def;
        int a0State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "|J1", sipType_QString,&a0, &a0State))
        {
            sipCpp = new  ::KColorCollection(*a0);
            sipReleaseType(const_cast< ::QString *>(a0),sipType_QString,a0State);

            return sipCpp;
        }
    }

    {
        const  ::KColorCollection* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_KColorCollection, &a0))
        {
            sipCpp = new  ::KColorCollection(*a0);

            return sipCpp;
        }
    }

    return NULL;
}


static PyMethodDef methods_KColorCollection[] = {
    {SIP_MLNAME_CAST(sipName_addColor), meth_KColorCollection_addColor, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_changeColor), meth_KColorCollection_changeColor, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_color), meth_KColorCollection_color, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_count), meth_KColorCollection_count, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_description), meth_KColorCollection_description, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_editable), meth_KColorCollection_editable, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_findColor), meth_KColorCollection_findColor, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_installedCollections), meth_KColorCollection_installedCollections, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_name), meth_KColorCollection_name, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_save), meth_KColorCollection_save, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setDescription), meth_KColorCollection_setDescription, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setEditable), meth_KColorCollection_setEditable, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setName), meth_KColorCollection_setName, METH_VARARGS, NULL}
};

static sipEnumMemberDef enummembers_KColorCollection[] = {
    {sipName_Ask, static_cast<int>( ::KColorCollection::Ask), 1},
    {sipName_No, static_cast<int>( ::KColorCollection::No), 1},
    {sipName_Yes, static_cast<int>( ::KColorCollection::Yes), 1},
};


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


sipClassTypeDef sipTypeDef_KGuiAddons_KColorCollection = {
    {
        -1,
        0,
        0,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_CLASS,
        sipNameNr_KColorCollection,
        {0},
        &plugin_KColorCollection
    },
    {
        sipNameNr_KColorCollection,
        {0, 0, 1},
        13, methods_KColorCollection,
        3, enummembers_KColorCollection,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    0,
    0,
    init_type_KColorCollection,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KColorCollection,
    assign_KColorCollection,
    array_KColorCollection,
    copy_KColorCollection,
    release_KColorCollection,
    0,
    0,
    0,
    0,
    0,
    0,
    0
};
