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

#include "sipAPIKGuiAddons.h"

#include <kfontutils.h>

#include <qpainter.h>
#include <qstring.h>
#include <kfontutils.h>
#include <qsize.h>


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

    {
         ::QPainter* a0;
        const  ::QString* a1;
        int a1State = 0;
        double a2;
        double a3;
        double a4 = 28;
        double a5 = 1;
         ::KFontUtils::AdaptFontSizeOptions a6def = KFontUtils::NoFlags;
         ::KFontUtils::AdaptFontSizeOptions* a6 = &a6def;
        int a6State = 0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J9J1dd|ddJ1", sipType_QPainter, &a0, sipType_QString,&a1, &a1State, &a2, &a3, &a4, &a5, sipType_KFontUtils_AdaptFontSizeOptions, &a6, &a6State))
        {
             ::qreal sipRes;

            sipRes =  ::KFontUtils::adaptFontSize(*a0,*a1,a2,a3,a4,a5,*a6);
            sipReleaseType(const_cast< ::QString *>(a1),sipType_QString,a1State);
            sipReleaseType(a6,sipType_KFontUtils_AdaptFontSizeOptions,a6State);

            return PyFloat_FromDouble(sipRes);
        }
    }

    {
         ::QPainter* a0;
        const  ::QString* a1;
        int a1State = 0;
        const  ::QSizeF* a2;
        double a3 = 28;
        double a4 = 1;
         ::KFontUtils::AdaptFontSizeOptions a5def = KFontUtils::NoFlags;
         ::KFontUtils::AdaptFontSizeOptions* a5 = &a5def;
        int a5State = 0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J9J1J9|ddJ1", sipType_QPainter, &a0, sipType_QString,&a1, &a1State, sipType_QSizeF, &a2, &a3, &a4, sipType_KFontUtils_AdaptFontSizeOptions, &a5, &a5State))
        {
             ::qreal sipRes;

            sipRes =  ::KFontUtils::adaptFontSize(*a0,*a1,*a2,a3,a4,*a5);
            sipReleaseType(const_cast< ::QString *>(a1),sipType_QString,a1State);
            sipReleaseType(a5,sipType_KFontUtils_AdaptFontSizeOptions,a5State);

            return PyFloat_FromDouble(sipRes);
        }
    }

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

    return NULL;
}


static PyMethodDef methods_KFontUtils[] = {
    {SIP_MLNAME_CAST(sipName_adaptFontSize), meth_KFontUtils_adaptFontSize, METH_VARARGS, NULL}
};

static sipEnumMemberDef enummembers_KFontUtils[] = {
    {sipName_DoNotAllowWordWrap, static_cast<int>( ::KFontUtils::DoNotAllowWordWrap), 6},
    {sipName_NoFlags, static_cast<int>( ::KFontUtils::NoFlags), 6},
};


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


sipClassTypeDef sipTypeDef_KGuiAddons_KFontUtils = {
    {
        -1,
        0,
        0,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_NAMESPACE,
        sipNameNr_KFontUtils,
        {0},
        &plugin_KFontUtils
    },
    {
        sipNameNr_KFontUtils,
        {0, 0, 1},
        1, methods_KFontUtils,
        2, enummembers_KFontUtils,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    0,
    0,
    0,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0
};
