/*
 * 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 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qimageiohandler.sip"
#include <qimageiohandler.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQImageIOHandler.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qrect.sip"
#include <qrect.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQImageIOHandler.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/sipQtGuiQImageIOHandler.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qimage.sip"
#include <qimage.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQImageIOHandler.cpp"
#line 30 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQImageIOHandler.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qiodevice.sip"
#include <qiodevice.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQImageIOHandler.cpp"


class sipQImageIOHandler : public  ::QImageIOHandler
{
public:
    sipQImageIOHandler();
    virtual ~sipQImageIOHandler();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
     ::QRect currentImageRect() const SIP_OVERRIDE;
    int currentImageNumber() const SIP_OVERRIDE;
    int nextImageDelay() const SIP_OVERRIDE;
    int imageCount() const SIP_OVERRIDE;
    int loopCount() const SIP_OVERRIDE;
    bool jumpToImage(int) SIP_OVERRIDE;
    bool jumpToNextImage() SIP_OVERRIDE;
    bool supportsOption( ::QImageIOHandler::ImageOption) const SIP_OVERRIDE;
    void setOption( ::QImageIOHandler::ImageOption,const  ::QVariant&) SIP_OVERRIDE;
     ::QVariant option( ::QImageIOHandler::ImageOption) const SIP_OVERRIDE;
    bool write(const  ::QImage&) SIP_OVERRIDE;
    bool read( ::QImage*) SIP_OVERRIDE;
    bool canRead() const SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipQImageIOHandler(const sipQImageIOHandler &);
    sipQImageIOHandler &operator = (const sipQImageIOHandler &);

    char sipPyMethods[13];
};

sipQImageIOHandler::sipQImageIOHandler():  ::QImageIOHandler(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQImageIOHandler::~sipQImageIOHandler()
{
    sipInstanceDestroyedEx(&sipPySelf);
}

 ::QRect sipQImageIOHandler::currentImageRect() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[0]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_currentImageRect);

    if (!sipMeth)
        return  ::QImageIOHandler::currentImageRect();

    extern  ::QRect sipVH_QtGui_35(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtGui_35(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

int sipQImageIOHandler::currentImageNumber() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[1]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_currentImageNumber);

    if (!sipMeth)
        return  ::QImageIOHandler::currentImageNumber();

    extern int sipVH_QtGui_8(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtGui_8(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

int sipQImageIOHandler::nextImageDelay() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[2]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_nextImageDelay);

    if (!sipMeth)
        return  ::QImageIOHandler::nextImageDelay();

    extern int sipVH_QtGui_8(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtGui_8(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

int sipQImageIOHandler::imageCount() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[3]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_imageCount);

    if (!sipMeth)
        return  ::QImageIOHandler::imageCount();

    extern int sipVH_QtGui_8(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtGui_8(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

int sipQImageIOHandler::loopCount() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[4]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_loopCount);

    if (!sipMeth)
        return  ::QImageIOHandler::loopCount();

    extern int sipVH_QtGui_8(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtGui_8(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

bool sipQImageIOHandler::jumpToImage(int a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[5], &sipPySelf, SIP_NULLPTR, sipName_jumpToImage);

    if (!sipMeth)
        return  ::QImageIOHandler::jumpToImage(a0);

    extern bool sipVH_QtGui_34(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int);

    return sipVH_QtGui_34(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQImageIOHandler::jumpToNextImage()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[6], &sipPySelf, SIP_NULLPTR, sipName_jumpToNextImage);

    if (!sipMeth)
        return  ::QImageIOHandler::jumpToNextImage();

    extern bool sipVH_QtGui_28(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtGui_28(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

bool sipQImageIOHandler::supportsOption( ::QImageIOHandler::ImageOption a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[7]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_supportsOption);

    if (!sipMeth)
        return  ::QImageIOHandler::supportsOption(a0);

    extern bool sipVH_QtGui_33(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QImageIOHandler::ImageOption);

    return sipVH_QtGui_33(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQImageIOHandler::setOption( ::QImageIOHandler::ImageOption a0,const  ::QVariant& a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[8], &sipPySelf, SIP_NULLPTR, sipName_setOption);

    if (!sipMeth)
    {
         ::QImageIOHandler::setOption(a0,a1);
        return;
    }

    extern void sipVH_QtGui_32(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QImageIOHandler::ImageOption,const  ::QVariant&);

    sipVH_QtGui_32(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}

 ::QVariant sipQImageIOHandler::option( ::QImageIOHandler::ImageOption a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[9]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_option);

    if (!sipMeth)
        return  ::QImageIOHandler::option(a0);

    extern  ::QVariant sipVH_QtGui_31(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QImageIOHandler::ImageOption);

    return sipVH_QtGui_31(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQImageIOHandler::write(const  ::QImage& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[10], &sipPySelf, SIP_NULLPTR, sipName_write);

    if (!sipMeth)
        return  ::QImageIOHandler::write(a0);

    extern bool sipVH_QtGui_30(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QImage&);

    return sipVH_QtGui_30(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQImageIOHandler::read( ::QImage*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[11], &sipPySelf, sipName_QImageIOHandler, sipName_read);

    if (!sipMeth)
        return 0;

    extern bool sipVH_QtGui_29(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QImage*);

    return sipVH_QtGui_29(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQImageIOHandler::canRead() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[12]), const_cast<sipSimpleWrapper **>(&sipPySelf), sipName_QImageIOHandler, sipName_canRead);

    if (!sipMeth)
        return 0;

    extern bool sipVH_QtGui_28(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtGui_28(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}


PyDoc_STRVAR(doc_QImageIOHandler_setDevice, "setDevice(self, QIODevice)");

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

    {
         ::QIODevice* a0;
         ::QImageIOHandler *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_QImageIOHandler, &sipCpp, sipType_QIODevice, &a0))
        {
            sipCpp->setDevice(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QImageIOHandler, sipName_setDevice, doc_QImageIOHandler_setDevice);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageIOHandler_device, "device(self) -> QIODevice");

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

    {
        const  ::QImageIOHandler *sipCpp;

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

            sipRes = sipCpp->device();

            return sipConvertFromType(sipRes,sipType_QIODevice,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QImageIOHandler, sipName_device, doc_QImageIOHandler_device);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageIOHandler_setFormat, "setFormat(self, Union[QByteArray, bytes, bytearray])");

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

    {
        const  ::QByteArray* a0;
        int a0State = 0;
         ::QImageIOHandler *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QImageIOHandler, &sipCpp, sipType_QByteArray, &a0, &a0State))
        {
            sipCpp->setFormat(*a0);
            sipReleaseType(const_cast< ::QByteArray *>(a0), sipType_QByteArray, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QImageIOHandler, sipName_setFormat, doc_QImageIOHandler_setFormat);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageIOHandler_format, "format(self) -> QByteArray");

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

    {
        const  ::QImageIOHandler *sipCpp;

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

            sipRes = new  ::QByteArray(sipCpp->format());

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

    sipNoMethod(sipParseErr, sipName_QImageIOHandler, sipName_format, doc_QImageIOHandler_format);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageIOHandler_canRead, "canRead(self) -> bool");

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

    {
        const  ::QImageIOHandler *sipCpp;

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

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QImageIOHandler, sipName_canRead);
                return SIP_NULLPTR;
            }

            sipRes = sipCpp->canRead();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QImageIOHandler, sipName_canRead, doc_QImageIOHandler_canRead);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageIOHandler_read, "read(self, QImage) -> bool");

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

    {
         ::QImage* a0;
         ::QImageIOHandler *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_QImageIOHandler, &sipCpp, sipType_QImage, &a0))
        {
            bool sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QImageIOHandler, sipName_read);
                return SIP_NULLPTR;
            }

            sipRes = sipCpp->read(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QImageIOHandler, sipName_read, doc_QImageIOHandler_read);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageIOHandler_write, "write(self, QImage) -> bool");

extern "C" {static PyObject *meth_QImageIOHandler_write(PyObject *, PyObject *);}
static PyObject *meth_QImageIOHandler_write(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QImage* a0;
         ::QImageIOHandler *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QImageIOHandler, &sipCpp, sipType_QImage, &a0))
        {
            bool sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QImageIOHandler::write(*a0) : sipCpp->write(*a0));

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QImageIOHandler, sipName_write, doc_QImageIOHandler_write);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageIOHandler_option, "option(self, QImageIOHandler.ImageOption) -> Any");

extern "C" {static PyObject *meth_QImageIOHandler_option(PyObject *, PyObject *);}
static PyObject *meth_QImageIOHandler_option(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::QImageIOHandler::ImageOption a0;
        const  ::QImageIOHandler *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QImageIOHandler, &sipCpp, sipType_QImageIOHandler_ImageOption, &a0))
        {
             ::QVariant*sipRes;

            sipRes = new  ::QVariant((sipSelfWasArg ? sipCpp-> ::QImageIOHandler::option(a0) : sipCpp->option(a0)));

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

    sipNoMethod(sipParseErr, sipName_QImageIOHandler, sipName_option, doc_QImageIOHandler_option);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageIOHandler_setOption, "setOption(self, QImageIOHandler.ImageOption, Any)");

extern "C" {static PyObject *meth_QImageIOHandler_setOption(PyObject *, PyObject *);}
static PyObject *meth_QImageIOHandler_setOption(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::QImageIOHandler::ImageOption a0;
        const  ::QVariant* a1;
        int a1State = 0;
         ::QImageIOHandler *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BEJ1", &sipSelf, sipType_QImageIOHandler, &sipCpp, sipType_QImageIOHandler_ImageOption, &a0, sipType_QVariant, &a1, &a1State))
        {
            (sipSelfWasArg ? sipCpp-> ::QImageIOHandler::setOption(a0,*a1) : sipCpp->setOption(a0,*a1));
            sipReleaseType(const_cast< ::QVariant *>(a1), sipType_QVariant, a1State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QImageIOHandler, sipName_setOption, doc_QImageIOHandler_setOption);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageIOHandler_supportsOption, "supportsOption(self, QImageIOHandler.ImageOption) -> bool");

extern "C" {static PyObject *meth_QImageIOHandler_supportsOption(PyObject *, PyObject *);}
static PyObject *meth_QImageIOHandler_supportsOption(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::QImageIOHandler::ImageOption a0;
        const  ::QImageIOHandler *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QImageIOHandler, &sipCpp, sipType_QImageIOHandler_ImageOption, &a0))
        {
            bool sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QImageIOHandler::supportsOption(a0) : sipCpp->supportsOption(a0));

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QImageIOHandler, sipName_supportsOption, doc_QImageIOHandler_supportsOption);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageIOHandler_jumpToNextImage, "jumpToNextImage(self) -> bool");

extern "C" {static PyObject *meth_QImageIOHandler_jumpToNextImage(PyObject *, PyObject *);}
static PyObject *meth_QImageIOHandler_jumpToNextImage(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::QImageIOHandler *sipCpp;

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

            sipRes = (sipSelfWasArg ? sipCpp-> ::QImageIOHandler::jumpToNextImage() : sipCpp->jumpToNextImage());

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QImageIOHandler, sipName_jumpToNextImage, doc_QImageIOHandler_jumpToNextImage);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageIOHandler_jumpToImage, "jumpToImage(self, int) -> bool");

extern "C" {static PyObject *meth_QImageIOHandler_jumpToImage(PyObject *, PyObject *);}
static PyObject *meth_QImageIOHandler_jumpToImage(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        int a0;
         ::QImageIOHandler *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QImageIOHandler, &sipCpp, &a0))
        {
            bool sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QImageIOHandler::jumpToImage(a0) : sipCpp->jumpToImage(a0));

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QImageIOHandler, sipName_jumpToImage, doc_QImageIOHandler_jumpToImage);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageIOHandler_loopCount, "loopCount(self) -> int");

extern "C" {static PyObject *meth_QImageIOHandler_loopCount(PyObject *, PyObject *);}
static PyObject *meth_QImageIOHandler_loopCount(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QImageIOHandler *sipCpp;

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

            sipRes = (sipSelfWasArg ? sipCpp-> ::QImageIOHandler::loopCount() : sipCpp->loopCount());

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QImageIOHandler, sipName_loopCount, doc_QImageIOHandler_loopCount);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageIOHandler_imageCount, "imageCount(self) -> int");

extern "C" {static PyObject *meth_QImageIOHandler_imageCount(PyObject *, PyObject *);}
static PyObject *meth_QImageIOHandler_imageCount(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QImageIOHandler *sipCpp;

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

            sipRes = (sipSelfWasArg ? sipCpp-> ::QImageIOHandler::imageCount() : sipCpp->imageCount());

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QImageIOHandler, sipName_imageCount, doc_QImageIOHandler_imageCount);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageIOHandler_nextImageDelay, "nextImageDelay(self) -> int");

extern "C" {static PyObject *meth_QImageIOHandler_nextImageDelay(PyObject *, PyObject *);}
static PyObject *meth_QImageIOHandler_nextImageDelay(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QImageIOHandler *sipCpp;

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

            sipRes = (sipSelfWasArg ? sipCpp-> ::QImageIOHandler::nextImageDelay() : sipCpp->nextImageDelay());

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QImageIOHandler, sipName_nextImageDelay, doc_QImageIOHandler_nextImageDelay);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageIOHandler_currentImageNumber, "currentImageNumber(self) -> int");

extern "C" {static PyObject *meth_QImageIOHandler_currentImageNumber(PyObject *, PyObject *);}
static PyObject *meth_QImageIOHandler_currentImageNumber(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QImageIOHandler *sipCpp;

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

            sipRes = (sipSelfWasArg ? sipCpp-> ::QImageIOHandler::currentImageNumber() : sipCpp->currentImageNumber());

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QImageIOHandler, sipName_currentImageNumber, doc_QImageIOHandler_currentImageNumber);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QImageIOHandler_currentImageRect, "currentImageRect(self) -> QRect");

extern "C" {static PyObject *meth_QImageIOHandler_currentImageRect(PyObject *, PyObject *);}
static PyObject *meth_QImageIOHandler_currentImageRect(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QImageIOHandler *sipCpp;

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

            sipRes = new  ::QRect((sipSelfWasArg ? sipCpp-> ::QImageIOHandler::currentImageRect() : sipCpp->currentImageRect()));

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

    sipNoMethod(sipParseErr, sipName_QImageIOHandler, sipName_currentImageRect, doc_QImageIOHandler_currentImageRect);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QImageIOHandler(void *, int);}
static void release_QImageIOHandler(void *sipCppV, int sipState)
{
    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipQImageIOHandler *>(sipCppV);
    else
        delete reinterpret_cast< ::QImageIOHandler *>(sipCppV);
}


extern "C" {static void dealloc_QImageIOHandler(sipSimpleWrapper *);}
static void dealloc_QImageIOHandler(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipQImageIOHandler *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;

    if (sipIsOwnedByPython(sipSelf))
    {
        release_QImageIOHandler(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
    }
}


extern "C" {static void *init_type_QImageIOHandler(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QImageIOHandler(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    sipQImageIOHandler *sipCpp = SIP_NULLPTR;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QImageIOHandler[] = {
    {sipName_canRead, meth_QImageIOHandler_canRead, METH_VARARGS, doc_QImageIOHandler_canRead},
    {sipName_currentImageNumber, meth_QImageIOHandler_currentImageNumber, METH_VARARGS, doc_QImageIOHandler_currentImageNumber},
    {sipName_currentImageRect, meth_QImageIOHandler_currentImageRect, METH_VARARGS, doc_QImageIOHandler_currentImageRect},
    {sipName_device, meth_QImageIOHandler_device, METH_VARARGS, doc_QImageIOHandler_device},
    {sipName_format, meth_QImageIOHandler_format, METH_VARARGS, doc_QImageIOHandler_format},
    {sipName_imageCount, meth_QImageIOHandler_imageCount, METH_VARARGS, doc_QImageIOHandler_imageCount},
    {sipName_jumpToImage, meth_QImageIOHandler_jumpToImage, METH_VARARGS, doc_QImageIOHandler_jumpToImage},
    {sipName_jumpToNextImage, meth_QImageIOHandler_jumpToNextImage, METH_VARARGS, doc_QImageIOHandler_jumpToNextImage},
    {sipName_loopCount, meth_QImageIOHandler_loopCount, METH_VARARGS, doc_QImageIOHandler_loopCount},
    {sipName_nextImageDelay, meth_QImageIOHandler_nextImageDelay, METH_VARARGS, doc_QImageIOHandler_nextImageDelay},
    {sipName_option, meth_QImageIOHandler_option, METH_VARARGS, doc_QImageIOHandler_option},
    {sipName_read, meth_QImageIOHandler_read, METH_VARARGS, doc_QImageIOHandler_read},
    {sipName_setDevice, meth_QImageIOHandler_setDevice, METH_VARARGS, doc_QImageIOHandler_setDevice},
    {sipName_setFormat, meth_QImageIOHandler_setFormat, METH_VARARGS, doc_QImageIOHandler_setFormat},
    {sipName_setOption, meth_QImageIOHandler_setOption, METH_VARARGS, doc_QImageIOHandler_setOption},
    {sipName_supportsOption, meth_QImageIOHandler_supportsOption, METH_VARARGS, doc_QImageIOHandler_supportsOption},
    {sipName_write, meth_QImageIOHandler_write, METH_VARARGS, doc_QImageIOHandler_write}
};

static sipEnumMemberDef enummembers_QImageIOHandler[] = {
    {sipName_Animation, static_cast<int>( ::QImageIOHandler::Animation), 77},
    {sipName_BackgroundColor, static_cast<int>( ::QImageIOHandler::BackgroundColor), 77},
    {sipName_ClipRect, static_cast<int>( ::QImageIOHandler::ClipRect), 77},
    {sipName_CompressionRatio, static_cast<int>( ::QImageIOHandler::CompressionRatio), 77},
    {sipName_Description, static_cast<int>( ::QImageIOHandler::Description), 77},
    {sipName_Endianness, static_cast<int>( ::QImageIOHandler::Endianness), 77},
    {sipName_Gamma, static_cast<int>( ::QImageIOHandler::Gamma), 77},
    {sipName_ImageTransformation, static_cast<int>( ::QImageIOHandler::ImageTransformation), 77},
    {sipName_IncrementalReading, static_cast<int>( ::QImageIOHandler::IncrementalReading), 77},
    {sipName_Name, static_cast<int>( ::QImageIOHandler::Name), 77},
    {sipName_OptimizedWrite, static_cast<int>( ::QImageIOHandler::OptimizedWrite), 77},
    {sipName_ProgressiveScanWrite, static_cast<int>( ::QImageIOHandler::ProgressiveScanWrite), 77},
    {sipName_Quality, static_cast<int>( ::QImageIOHandler::Quality), 77},
    {sipName_ScaledClipRect, static_cast<int>( ::QImageIOHandler::ScaledClipRect), 77},
    {sipName_ScaledSize, static_cast<int>( ::QImageIOHandler::ScaledSize), 77},
    {sipName_Size, static_cast<int>( ::QImageIOHandler::Size), 77},
    {sipName_SubType, static_cast<int>( ::QImageIOHandler::SubType), 77},
    {sipName_SupportedSubTypes, static_cast<int>( ::QImageIOHandler::SupportedSubTypes), 77},
    {sipName_TransformationFlip, static_cast<int>( ::QImageIOHandler::TransformationFlip), 78},
    {sipName_TransformationFlipAndRotate90, static_cast<int>( ::QImageIOHandler::TransformationFlipAndRotate90), 78},
    {sipName_TransformationMirror, static_cast<int>( ::QImageIOHandler::TransformationMirror), 78},
    {sipName_TransformationMirrorAndRotate90, static_cast<int>( ::QImageIOHandler::TransformationMirrorAndRotate90), 78},
    {sipName_TransformationNone, static_cast<int>( ::QImageIOHandler::TransformationNone), 78},
    {sipName_TransformationRotate180, static_cast<int>( ::QImageIOHandler::TransformationRotate180), 78},
    {sipName_TransformationRotate270, static_cast<int>( ::QImageIOHandler::TransformationRotate270), 78},
    {sipName_TransformationRotate90, static_cast<int>( ::QImageIOHandler::TransformationRotate90), 78},
    {sipName_TransformedByDefault, static_cast<int>( ::QImageIOHandler::TransformedByDefault), 77},
};

PyDoc_STRVAR(doc_QImageIOHandler, "\1QImageIOHandler()");


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


sipClassTypeDef sipTypeDef_QtGui_QImageIOHandler = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QImageIOHandler,
        SIP_NULLPTR,
        &plugin_QImageIOHandler
    },
    {
        sipNameNr_QImageIOHandler,
        {0, 0, 1},
        17, methods_QImageIOHandler,
        27, enummembers_QImageIOHandler,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QImageIOHandler,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QImageIOHandler,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QImageIOHandler,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QImageIOHandler,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof ( ::QImageIOHandler),
};
