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

#include "sipAPIKWidgetsAddons.h"

#include <kratingpainter.h>

#include <qrect.h>
#include <qnamespace.h>
#include <qnamespace.h>
#include <qpoint.h>
#include <qpainter.h>
#include <qpixmap.h>
#include <qicon.h>


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

    {
        const  ::KRatingPainter *sipCpp;

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

            sipRes = sipCpp->maxRating();

            return SIPLong_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        const  ::KRatingPainter *sipCpp;

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

            sipRes = sipCpp->halfStepsEnabled();

            return PyBool_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        const  ::KRatingPainter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KRatingPainter, &sipCpp))
        {
             ::Qt::Alignment*sipRes;

            sipRes = new  ::Qt::Alignment(sipCpp->alignment());

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

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

    return NULL;
}


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

    {
        const  ::KRatingPainter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KRatingPainter, &sipCpp))
        {
             ::Qt::LayoutDirection sipRes;

            sipRes = sipCpp->layoutDirection();

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

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

    return NULL;
}


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

    {
        const  ::KRatingPainter *sipCpp;

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

            sipRes = new  ::QIcon(sipCpp->icon());

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

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

    return NULL;
}


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

    {
        const  ::KRatingPainter *sipCpp;

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

            sipRes = sipCpp->isEnabled();

            return PyBool_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        const  ::KRatingPainter *sipCpp;

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

            sipRes = new  ::QPixmap(sipCpp->customPixmap());

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

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

    return NULL;
}


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

    {
        const  ::KRatingPainter *sipCpp;

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

            sipRes = sipCpp->spacing();

            return SIPLong_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        int a0;
         ::KRatingPainter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_KRatingPainter, &sipCpp, &a0))
        {
            sipCpp->setMaxRating(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        bool a0;
         ::KRatingPainter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_KRatingPainter, &sipCpp, &a0))
        {
            sipCpp->setHalfStepsEnabled(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
         ::Qt::Alignment* a0;
        int a0State = 0;
         ::KRatingPainter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KRatingPainter, &sipCpp, sipType_Qt_Alignment, &a0, &a0State))
        {
            sipCpp->setAlignment(*a0);
            sipReleaseType(a0,sipType_Qt_Alignment,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
         ::Qt::LayoutDirection a0;
         ::KRatingPainter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_KRatingPainter, &sipCpp, sipType_Qt_LayoutDirection, &a0))
        {
            sipCpp->setLayoutDirection(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        const  ::QIcon* a0;
         ::KRatingPainter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_KRatingPainter, &sipCpp, sipType_QIcon, &a0))
        {
            sipCpp->setIcon(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        bool a0;
         ::KRatingPainter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_KRatingPainter, &sipCpp, &a0))
        {
            sipCpp->setEnabled(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        const  ::QPixmap* a0;
         ::KRatingPainter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_KRatingPainter, &sipCpp, sipType_QPixmap, &a0))
        {
            sipCpp->setCustomPixmap(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        int a0;
         ::KRatingPainter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_KRatingPainter, &sipCpp, &a0))
        {
            sipCpp->setSpacing(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
         ::QPainter* a0;
        const  ::QRect* a1;
        int a2;
        int a3 = -1;
        const  ::KRatingPainter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8J9i|i", &sipSelf, sipType_KRatingPainter, &sipCpp, sipType_QPainter, &a0, sipType_QRect, &a1, &a2, &a3))
        {
            sipCpp->paint(a0,*a1,a2,a3);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        const  ::QRect* a0;
        const  ::QPoint* a1;
        const  ::KRatingPainter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9J9", &sipSelf, sipType_KRatingPainter, &sipCpp, sipType_QRect, &a0, sipType_QPoint, &a1))
        {
            int sipRes;

            sipRes = sipCpp->ratingFromPosition(*a0,*a1);

            return SIPLong_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
         ::QPainter* a0;
        const  ::QRect* a1;
         ::Qt::Alignment* a2;
        int a2State = 0;
        int a3;
        int a4 = -1;

        if (sipParseArgs(&sipParseErr, sipArgs, "J8J9J1i|i", sipType_QPainter, &a0, sipType_QRect, &a1, sipType_Qt_Alignment, &a2, &a2State, &a3, &a4))
        {
             ::KRatingPainter::paintRating(a0,*a1,*a2,a3,a4);
            sipReleaseType(a2,sipType_Qt_Alignment,a2State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        const  ::QRect* a0;
         ::Qt::Alignment* a1;
        int a1State = 0;
         ::Qt::LayoutDirection a2;
        const  ::QPoint* a3;

        if (sipParseArgs(&sipParseErr, sipArgs, "J9J1EJ9", sipType_QRect, &a0, sipType_Qt_Alignment, &a1, &a1State, sipType_Qt_LayoutDirection, &a2, sipType_QPoint, &a3))
        {
            int sipRes;

            sipRes =  ::KRatingPainter::getRatingFromPosition(*a0,*a1,a2,*a3);
            sipReleaseType(a1,sipType_Qt_Alignment,a1State);

            return SIPLong_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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


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


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

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

            return sipCpp;
        }
    }

    return NULL;
}


static PyMethodDef methods_KRatingPainter[] = {
    {SIP_MLNAME_CAST(sipName_alignment), meth_KRatingPainter_alignment, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_customPixmap), meth_KRatingPainter_customPixmap, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_getRatingFromPosition), meth_KRatingPainter_getRatingFromPosition, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_halfStepsEnabled), meth_KRatingPainter_halfStepsEnabled, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_icon), meth_KRatingPainter_icon, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_isEnabled), meth_KRatingPainter_isEnabled, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_layoutDirection), meth_KRatingPainter_layoutDirection, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_maxRating), meth_KRatingPainter_maxRating, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_paint), meth_KRatingPainter_paint, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_paintRating), meth_KRatingPainter_paintRating, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_ratingFromPosition), meth_KRatingPainter_ratingFromPosition, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setAlignment), meth_KRatingPainter_setAlignment, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setCustomPixmap), meth_KRatingPainter_setCustomPixmap, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setEnabled), meth_KRatingPainter_setEnabled, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setHalfStepsEnabled), meth_KRatingPainter_setHalfStepsEnabled, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setIcon), meth_KRatingPainter_setIcon, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setLayoutDirection), meth_KRatingPainter_setLayoutDirection, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setMaxRating), meth_KRatingPainter_setMaxRating, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setSpacing), meth_KRatingPainter_setSpacing, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_spacing), meth_KRatingPainter_spacing, METH_VARARGS, NULL}
};


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


sipClassTypeDef sipTypeDef_KWidgetsAddons_KRatingPainter = {
    {
        -1,
        0,
        0,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_CLASS,
        sipNameNr_KRatingPainter,
        {0},
        &plugin_KRatingPainter
    },
    {
        sipNameNr_KRatingPainter,
        {0, 0, 1},
        20, methods_KRatingPainter,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    0,
    0,
    init_type_KRatingPainter,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KRatingPainter,
    0,
    0,
    0,
    release_KRatingPainter,
    0,
    0,
    0,
    0,
    0,
    0,
    0
};
