/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.14.0
 *
 * Copyright (c) 2024 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 "sipAPIQtMultimedia.h"

#line 89 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtMultimedia/qmediaencodersettings.sip"
#include <qmediaencodersettings.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.11/build/QtMultimedia/sipQtMultimediaQImageEncoderSettings.cpp"

#line 24 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qvariantmap.sip"
#include <qvariant.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.11/build/QtMultimedia/sipQtMultimediaQImageEncoderSettings.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.11/build/QtMultimedia/sipQtMultimediaQImageEncoderSettings.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.11/build/QtMultimedia/sipQtMultimediaQImageEncoderSettings.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtMultimedia/qmultimedia.sip"
#include <qmultimedia.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.11/build/QtMultimedia/sipQtMultimediaQImageEncoderSettings.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qsize.sip"
#include <qsize.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.11/build/QtMultimedia/sipQtMultimediaQImageEncoderSettings.cpp"


PyDoc_STRVAR(doc_QImageEncoderSettings_isNull, "isNull(self) -> bool");

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

    {
        const ::QImageEncoderSettings *sipCpp;

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

            sipRes = sipCpp->isNull();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QImageEncoderSettings, sipName_isNull, doc_QImageEncoderSettings_isNull);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageEncoderSettings_codec, "codec(self) -> str");

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

    {
        const ::QImageEncoderSettings *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QImageEncoderSettings, sipName_codec, doc_QImageEncoderSettings_codec);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageEncoderSettings_setCodec, "setCodec(self, a0: Optional[str])");

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

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

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QImageEncoderSettings, sipName_setCodec, doc_QImageEncoderSettings_setCodec);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageEncoderSettings_resolution, "resolution(self) -> QSize");

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

    {
        const ::QImageEncoderSettings *sipCpp;

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

            sipRes = new ::QSize(sipCpp->resolution());

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

    sipNoMethod(sipParseErr, sipName_QImageEncoderSettings, sipName_resolution, doc_QImageEncoderSettings_resolution);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageEncoderSettings_setResolution, "setResolution(self, a0: QSize)\n"
"setResolution(self, width: int, height: int)");

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

    {
        const ::QSize* a0;
        ::QImageEncoderSettings *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QImageEncoderSettings, &sipCpp, sipType_QSize, &a0))
        {
            sipCpp->setResolution(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        int a0;
        int a1;
        ::QImageEncoderSettings *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bii", &sipSelf, sipType_QImageEncoderSettings, &sipCpp, &a0, &a1))
        {
            sipCpp->setResolution(a0, a1);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QImageEncoderSettings, sipName_setResolution, doc_QImageEncoderSettings_setResolution);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageEncoderSettings_quality, "quality(self) -> QMultimedia.EncodingQuality");

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

    {
        const ::QImageEncoderSettings *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QImageEncoderSettings, &sipCpp))
        {
            ::QMultimedia::EncodingQuality sipRes;

            sipRes = sipCpp->quality();

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

    sipNoMethod(sipParseErr, sipName_QImageEncoderSettings, sipName_quality, doc_QImageEncoderSettings_quality);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageEncoderSettings_setQuality, "setQuality(self, quality: QMultimedia.EncodingQuality)");

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

    {
        ::QMultimedia::EncodingQuality a0;
        ::QImageEncoderSettings *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QImageEncoderSettings, &sipCpp, sipType_QMultimedia_EncodingQuality, &a0))
        {
            sipCpp->setQuality(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QImageEncoderSettings, sipName_setQuality, doc_QImageEncoderSettings_setQuality);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageEncoderSettings_encodingOption, "encodingOption(self, option: Optional[str]) -> Any");

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

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

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QImageEncoderSettings, &sipCpp, sipType_QString, &a0, &a0State))
        {
            ::QVariant*sipRes;

            sipRes = new ::QVariant(sipCpp->encodingOption(*a0));
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

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

    sipNoMethod(sipParseErr, sipName_QImageEncoderSettings, sipName_encodingOption, doc_QImageEncoderSettings_encodingOption);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageEncoderSettings_encodingOptions, "encodingOptions(self) -> dict[str, Any]");

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

    {
        const ::QImageEncoderSettings *sipCpp;

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

            sipRes = new ::QVariantMap(sipCpp->encodingOptions());

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

    sipNoMethod(sipParseErr, sipName_QImageEncoderSettings, sipName_encodingOptions, doc_QImageEncoderSettings_encodingOptions);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageEncoderSettings_setEncodingOption, "setEncodingOption(self, option: Optional[str], value: Any)");

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

    {
        const ::QString* a0;
        int a0State = 0;
        const ::QVariant* a1;
        int a1State = 0;
        ::QImageEncoderSettings *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1J1", &sipSelf, sipType_QImageEncoderSettings, &sipCpp, sipType_QString, &a0, &a0State, sipType_QVariant, &a1, &a1State))
        {
            sipCpp->setEncodingOption(*a0, *a1);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);
            sipReleaseType(const_cast< ::QVariant *>(a1), sipType_QVariant, a1State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QImageEncoderSettings, sipName_setEncodingOption, doc_QImageEncoderSettings_setEncodingOption);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageEncoderSettings_setEncodingOptions, "setEncodingOptions(self, options: dict[str, Any])");

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

    {
        const ::QVariantMap* a0;
        int a0State = 0;
        ::QImageEncoderSettings *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QImageEncoderSettings, &sipCpp, sipType_QVariantMap, &a0, &a0State))
        {
            sipCpp->setEncodingOptions(*a0);
            sipReleaseType(const_cast< ::QVariantMap *>(a0), sipType_QVariantMap, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QImageEncoderSettings, sipName_setEncodingOptions, doc_QImageEncoderSettings_setEncodingOptions);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QImageEncoderSettings___ne__(PyObject *, PyObject *);}
static PyObject *slot_QImageEncoderSettings___ne__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QImageEncoderSettings *sipCpp = reinterpret_cast< ::QImageEncoderSettings *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QImageEncoderSettings));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QImageEncoderSettings* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QImageEncoderSettings, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->::QImageEncoderSettings::operator!=(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtMultimedia, ne_slot, sipType_QImageEncoderSettings, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QImageEncoderSettings___eq__(PyObject *, PyObject *);}
static PyObject *slot_QImageEncoderSettings___eq__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QImageEncoderSettings *sipCpp = reinterpret_cast< ::QImageEncoderSettings *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QImageEncoderSettings));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QImageEncoderSettings* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QImageEncoderSettings, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->::QImageEncoderSettings::operator==(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtMultimedia, eq_slot, sipType_QImageEncoderSettings, sipSelf, sipArg);
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const ::QImageEncoderSettings* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QImageEncoderSettings[] = {
    {(void *)slot_QImageEncoderSettings___ne__, ne_slot},
    {(void *)slot_QImageEncoderSettings___eq__, eq_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QImageEncoderSettings[] = {
    {sipName_codec, meth_QImageEncoderSettings_codec, METH_VARARGS, doc_QImageEncoderSettings_codec},
    {sipName_encodingOption, meth_QImageEncoderSettings_encodingOption, METH_VARARGS, doc_QImageEncoderSettings_encodingOption},
    {sipName_encodingOptions, meth_QImageEncoderSettings_encodingOptions, METH_VARARGS, doc_QImageEncoderSettings_encodingOptions},
    {sipName_isNull, meth_QImageEncoderSettings_isNull, METH_VARARGS, doc_QImageEncoderSettings_isNull},
    {sipName_quality, meth_QImageEncoderSettings_quality, METH_VARARGS, doc_QImageEncoderSettings_quality},
    {sipName_resolution, meth_QImageEncoderSettings_resolution, METH_VARARGS, doc_QImageEncoderSettings_resolution},
    {sipName_setCodec, meth_QImageEncoderSettings_setCodec, METH_VARARGS, doc_QImageEncoderSettings_setCodec},
    {sipName_setEncodingOption, meth_QImageEncoderSettings_setEncodingOption, METH_VARARGS, doc_QImageEncoderSettings_setEncodingOption},
    {sipName_setEncodingOptions, meth_QImageEncoderSettings_setEncodingOptions, METH_VARARGS, doc_QImageEncoderSettings_setEncodingOptions},
    {sipName_setQuality, meth_QImageEncoderSettings_setQuality, METH_VARARGS, doc_QImageEncoderSettings_setQuality},
    {sipName_setResolution, meth_QImageEncoderSettings_setResolution, METH_VARARGS, doc_QImageEncoderSettings_setResolution}
};

PyDoc_STRVAR(doc_QImageEncoderSettings, "\1QImageEncoderSettings()\n"
"QImageEncoderSettings(other: QImageEncoderSettings)");


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


sipClassTypeDef sipTypeDef_QtMultimedia_QImageEncoderSettings = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QImageEncoderSettings,
        SIP_NULLPTR,
        &plugin_QImageEncoderSettings,
    },
    {
        sipNameNr_QImageEncoderSettings,
        {0, 0, 1},
        11, methods_QImageEncoderSettings,
        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_QImageEncoderSettings,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QImageEncoderSettings,
    init_type_QImageEncoderSettings,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QImageEncoderSettings,
    assign_QImageEncoderSettings,
    array_QImageEncoderSettings,
    copy_QImageEncoderSettings,
    release_QImageEncoderSettings,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QImageEncoderSettings,
    sizeof (::QImageEncoderSettings),
};
