/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt5.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtGui.h"

#line 532 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextformat.sip"
#include <qtextformat.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextImageFormat.cpp"

#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextImageFormat.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextImageFormat.cpp"
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstringlist.sip"
#include <qstringlist.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextImageFormat.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qfont.sip"
#include <qfont.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextImageFormat.cpp"
#line 318 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextformat.sip"
#include <qtextformat.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextImageFormat.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qpen.sip"
#include <qpen.h>
#line 48 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextImageFormat.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qcolor.sip"
#include <qcolor.h>
#line 51 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextImageFormat.cpp"
#line 59 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextformat.sip"
#include <qtextformat.h>
#line 54 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextImageFormat.cpp"
#line 650 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextformat.sip"
#include <qtextformat.h>
#line 57 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextImageFormat.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qbrush.sip"
#include <qbrush.h>
#line 60 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextImageFormat.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 63 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextImageFormat.cpp"
#line 555 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextformat.sip"
#include <qtextformat.h>
#line 66 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextImageFormat.cpp"
#line 618 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextformat.sip"
#include <qtextformat.h>
#line 69 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextImageFormat.cpp"
#line 500 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextformat.sip"
#include <qtextformat.h>
#line 72 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextImageFormat.cpp"
#line 433 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextformat.sip"
#include <qtextformat.h>
#line 75 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextImageFormat.cpp"
#line 146 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qmap.sip"
#include <qmap.h>
#line 78 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextImageFormat.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qvector.sip"
#include <qvector.h>
#line 81 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextImageFormat.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextformat.sip"
#include <qtextformat.h>
#line 84 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextImageFormat.cpp"


PyDoc_STRVAR(doc_QTextImageFormat_isValid, "isValid(self) -> bool");

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

    {
        const  ::QTextImageFormat *sipCpp;

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

            sipRes = sipCpp->isValid();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextImageFormat, sipName_isValid, doc_QTextImageFormat_isValid);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextImageFormat_name, "name(self) -> str");

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

    {
        const  ::QTextImageFormat *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QTextImageFormat, sipName_name, doc_QTextImageFormat_name);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextImageFormat_width, "width(self) -> float");

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

    {
        const  ::QTextImageFormat *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTextImageFormat, &sipCpp))
        {
             ::qreal sipRes;

            sipRes = sipCpp->width();

            return PyFloat_FromDouble(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextImageFormat, sipName_width, doc_QTextImageFormat_width);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextImageFormat_height, "height(self) -> float");

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

    {
        const  ::QTextImageFormat *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTextImageFormat, &sipCpp))
        {
             ::qreal sipRes;

            sipRes = sipCpp->height();

            return PyFloat_FromDouble(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextImageFormat, sipName_height, doc_QTextImageFormat_height);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextImageFormat_quality, "quality(self) -> int");

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

    {
        const  ::QTextImageFormat *sipCpp;

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

            sipRes = sipCpp->quality();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextImageFormat, sipName_quality, doc_QTextImageFormat_quality);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextImageFormat_setName, "setName(self, str)");

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

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

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextImageFormat, sipName_setName, doc_QTextImageFormat_setName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextImageFormat_setWidth, "setWidth(self, float)");

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

    {
         ::qreal a0;
         ::QTextImageFormat *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bd", &sipSelf, sipType_QTextImageFormat, &sipCpp, &a0))
        {
            sipCpp->setWidth(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextImageFormat, sipName_setWidth, doc_QTextImageFormat_setWidth);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextImageFormat_setHeight, "setHeight(self, float)");

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

    {
         ::qreal a0;
         ::QTextImageFormat *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bd", &sipSelf, sipType_QTextImageFormat, &sipCpp, &a0))
        {
            sipCpp->setHeight(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextImageFormat, sipName_setHeight, doc_QTextImageFormat_setHeight);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTextImageFormat_setQuality, "setQuality(self, quality: int = 100)");

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

    {
        int a0 = 100;
         ::QTextImageFormat *sipCpp;

        static const char *sipKwdList[] = {
            sipName_quality,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|i", &sipSelf, sipType_QTextImageFormat, &sipCpp, &a0))
        {
            sipCpp->setQuality(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QTextImageFormat, sipName_setQuality, doc_QTextImageFormat_setQuality);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QTextImageFormat)
        return sipCppV;

    sipCppV = ((const sipClassTypeDef *)sipType_QTextCharFormat)->ctd_cast(static_cast< ::QTextCharFormat *>(sipCpp), targetType);
    if (sipCppV)
        return sipCppV;

    return SIP_NULLPTR;
}


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


extern "C" {static void *array_QTextImageFormat(Py_ssize_t);}
static void *array_QTextImageFormat(Py_ssize_t sipNrElem)
{
    return new  ::QTextImageFormat[sipNrElem];
}


extern "C" {static void array_delete_QTextImageFormat(void *);}
static void array_delete_QTextImageFormat(void *sipCpp)
{
    delete[] reinterpret_cast< ::QTextImageFormat *>(sipCpp);
}


extern "C" {static void assign_QTextImageFormat(void *, Py_ssize_t, void *);}
static void assign_QTextImageFormat(void *sipDst, Py_ssize_t sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::QTextImageFormat *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::QTextImageFormat *>(sipSrc);
}


extern "C" {static void *copy_QTextImageFormat(const void *, Py_ssize_t);}
static void *copy_QTextImageFormat(const void *sipSrc, Py_ssize_t sipSrcIdx)
{
    return new  ::QTextImageFormat(reinterpret_cast<const  ::QTextImageFormat *>(sipSrc)[sipSrcIdx]);
}


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


extern "C" {static void *init_type_QTextImageFormat(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QTextImageFormat(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
     ::QTextImageFormat *sipCpp = SIP_NULLPTR;

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

            return sipCpp;
        }
    }

    {
        const  ::QTextImageFormat* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_QTextImageFormat, &a0))
        {
            sipCpp = new  ::QTextImageFormat(*a0);

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_QTextImageFormat[] = {
    {sipName_height, meth_QTextImageFormat_height, METH_VARARGS, doc_QTextImageFormat_height},
    {sipName_isValid, meth_QTextImageFormat_isValid, METH_VARARGS, doc_QTextImageFormat_isValid},
    {sipName_name, meth_QTextImageFormat_name, METH_VARARGS, doc_QTextImageFormat_name},
    {sipName_quality, meth_QTextImageFormat_quality, METH_VARARGS, doc_QTextImageFormat_quality},
    {sipName_setHeight, meth_QTextImageFormat_setHeight, METH_VARARGS, doc_QTextImageFormat_setHeight},
    {sipName_setName, meth_QTextImageFormat_setName, METH_VARARGS, doc_QTextImageFormat_setName},
    {sipName_setQuality, SIP_MLMETH_CAST(meth_QTextImageFormat_setQuality), METH_VARARGS|METH_KEYWORDS, doc_QTextImageFormat_setQuality},
    {sipName_setWidth, meth_QTextImageFormat_setWidth, METH_VARARGS, doc_QTextImageFormat_setWidth},
    {sipName_width, meth_QTextImageFormat_width, METH_VARARGS, doc_QTextImageFormat_width}
};

PyDoc_STRVAR(doc_QTextImageFormat, "\1QTextImageFormat()\n"
"QTextImageFormat(QTextImageFormat)");


static pyqt5ClassPluginDef plugin_QTextImageFormat = {
    SIP_NULLPTR,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtGui_QTextImageFormat = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QTextImageFormat,
        SIP_NULLPTR,
        &plugin_QTextImageFormat
    },
    {
        sipNameNr_QTextImageFormat,
        {0, 0, 1},
        9, methods_QTextImageFormat,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QTextImageFormat,
    -1,
    -1,
    supers_QTextImageFormat,
    SIP_NULLPTR,
    init_type_QTextImageFormat,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QTextImageFormat,
    assign_QTextImageFormat,
    array_QTextImageFormat,
    copy_QTextImageFormat,
    release_QTextImageFormat,
    cast_QTextImageFormat,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QTextImageFormat,
    sizeof ( ::QTextImageFormat),
};
