/*
 * 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 "sipAPIQtGui.h"

#line 52 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtGui/qvalidator.sip"
#include <qvalidator.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.11/build/QtGui/sipQtGuiQIntValidator.cpp"

#line 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qobject.sip"
#include <qobject.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.11/build/QtGui/sipQtGuiQIntValidator.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/QtGui/sipQtGuiQIntValidator.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtGui/qvalidator.sip"
#include <qvalidator.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.11/build/QtGui/sipQtGuiQIntValidator.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qlocale.sip"
#include <qlocale.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.11/build/QtGui/sipQtGuiQIntValidator.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 146 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 47 "/build/pyqt5/src/PyQt5-5.15.11/build/QtGui/sipQtGuiQIntValidator.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 50 "/build/pyqt5/src/PyQt5-5.15.11/build/QtGui/sipQtGuiQIntValidator.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 53 "/build/pyqt5/src/PyQt5-5.15.11/build/QtGui/sipQtGuiQIntValidator.cpp"
#line 252 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 56 "/build/pyqt5/src/PyQt5-5.15.11/build/QtGui/sipQtGuiQIntValidator.cpp"
#line 240 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 59 "/build/pyqt5/src/PyQt5-5.15.11/build/QtGui/sipQtGuiQIntValidator.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 62 "/build/pyqt5/src/PyQt5-5.15.11/build/QtGui/sipQtGuiQIntValidator.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 65 "/build/pyqt5/src/PyQt5-5.15.11/build/QtGui/sipQtGuiQIntValidator.cpp"
#line 30 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 68 "/build/pyqt5/src/PyQt5-5.15.11/build/QtGui/sipQtGuiQIntValidator.cpp"
#line 149 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 71 "/build/pyqt5/src/PyQt5-5.15.11/build/QtGui/sipQtGuiQIntValidator.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 74 "/build/pyqt5/src/PyQt5-5.15.11/build/QtGui/sipQtGuiQIntValidator.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qthread.sip"
#include <qthread.h>
#line 77 "/build/pyqt5/src/PyQt5-5.15.11/build/QtGui/sipQtGuiQIntValidator.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 80 "/build/pyqt5/src/PyQt5-5.15.11/build/QtGui/sipQtGuiQIntValidator.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qregexp.sip"
#include <qregexp.h>
#line 83 "/build/pyqt5/src/PyQt5-5.15.11/build/QtGui/sipQtGuiQIntValidator.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 86 "/build/pyqt5/src/PyQt5-5.15.11/build/QtGui/sipQtGuiQIntValidator.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 89 "/build/pyqt5/src/PyQt5-5.15.11/build/QtGui/sipQtGuiQIntValidator.cpp"


class sipQIntValidator : public ::QIntValidator
{
public:
    sipQIntValidator(::QObject*);
    sipQIntValidator(int, int, ::QObject*);
    virtual ~sipQIntValidator();

    int qt_metacall(QMetaObject::Call, int, void **) SIP_OVERRIDE;
    void *qt_metacast(const char *) SIP_OVERRIDE;
    const QMetaObject *metaObject() const SIP_OVERRIDE;

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    void setRange(int, int) SIP_OVERRIDE;
    void disconnectNotify(const ::QMetaMethod&) SIP_OVERRIDE;
    void connectNotify(const ::QMetaMethod&) SIP_OVERRIDE;
    void customEvent(::QEvent*) SIP_OVERRIDE;
    void childEvent(::QChildEvent*) SIP_OVERRIDE;
    void timerEvent(::QTimerEvent*) SIP_OVERRIDE;
    bool eventFilter(::QObject*, ::QEvent*) SIP_OVERRIDE;
    bool event(::QEvent*) SIP_OVERRIDE;
    ::QValidator::State validate(::QString&, int&) const SIP_OVERRIDE;
    void fixup(::QString&) const SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[10];
};

sipQIntValidator::sipQIntValidator(::QObject*a0): ::QIntValidator(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQIntValidator::sipQIntValidator(int a0, int a1, ::QObject*a2): ::QIntValidator(a0, a1, a2), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

const QMetaObject *sipQIntValidator::metaObject() const
{
    if (sipGetInterpreter())
        return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : sip_QtGui_qt_metaobject(sipPySelf, sipType_QIntValidator);

    return ::QIntValidator::metaObject();
}

int sipQIntValidator::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = ::QIntValidator::qt_metacall(_c, _id, _a);

    if (_id >= 0)
    {
        SIP_BLOCK_THREADS
        _id = sip_QtGui_qt_metacall(sipPySelf, sipType_QIntValidator, _c, _id, _a);
        SIP_UNBLOCK_THREADS
    }

    return _id;
}

void *sipQIntValidator::qt_metacast(const char *_clname)
{
    void *sipCpp;

    return (sip_QtGui_qt_metacast(sipPySelf, sipType_QIntValidator, _clname, &sipCpp) ? sipCpp : ::QIntValidator::qt_metacast(_clname));
}

void sipQIntValidator::setRange(int a0, int a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[0], &sipPySelf, SIP_NULLPTR, sipName_setRange);

    if (!sipMeth)
    {
        ::QIntValidator::setRange(a0, a1);
        return;
    }

    extern void sipVH_QtGui_53(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int, int);

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

void sipQIntValidator::disconnectNotify(const ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[1], &sipPySelf, SIP_NULLPTR, sipName_disconnectNotify);

    if (!sipMeth)
    {
        ::QIntValidator::disconnectNotify(a0);
        return;
    }

    extern void sipVH_QtGui_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::QMetaMethod&);

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

void sipQIntValidator::connectNotify(const ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[2], &sipPySelf, SIP_NULLPTR, sipName_connectNotify);

    if (!sipMeth)
    {
        ::QIntValidator::connectNotify(a0);
        return;
    }

    extern void sipVH_QtGui_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::QMetaMethod&);

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

void sipQIntValidator::customEvent(::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[3], &sipPySelf, SIP_NULLPTR, sipName_customEvent);

    if (!sipMeth)
    {
        ::QIntValidator::customEvent(a0);
        return;
    }

    extern void sipVH_QtGui_1(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QEvent*);

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

void sipQIntValidator::childEvent(::QChildEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[4], &sipPySelf, SIP_NULLPTR, sipName_childEvent);

    if (!sipMeth)
    {
        ::QIntValidator::childEvent(a0);
        return;
    }

    extern void sipVH_QtGui_2(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QChildEvent*);

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

void sipQIntValidator::timerEvent(::QTimerEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
        ::QIntValidator::timerEvent(a0);
        return;
    }

    extern void sipVH_QtGui_3(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QTimerEvent*);

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

bool sipQIntValidator::eventFilter(::QObject*a0, ::QEvent*a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::QIntValidator::eventFilter(a0, a1);

    extern bool sipVH_QtGui_4(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QObject*, ::QEvent*);

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

bool sipQIntValidator::event(::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[7], &sipPySelf, SIP_NULLPTR, sipName_event);

    if (!sipMeth)
        return ::QIntValidator::event(a0);

    extern bool sipVH_QtGui_5(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QEvent*);

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

::QValidator::State sipQIntValidator::validate(::QString& a0, int& a1) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::QIntValidator::validate(a0, a1);

    extern ::QValidator::State sipVH_QtGui_107(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QString&, int&);

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

void sipQIntValidator::fixup(::QString& a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
        ::QIntValidator::fixup(a0);
        return;
    }

    extern void sipVH_QtGui_108(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QString&);

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


PyDoc_STRVAR(doc_QIntValidator_validate, "validate(self, a0: Optional[str], a1: int) -> (QValidator.State, str, int)");

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

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

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1i", &sipSelf, sipType_QIntValidator, &sipCpp, sipType_QString, &a0, &a0State, &a1))
        {
            ::QValidator::State sipRes;
            PyObject *sipResObj;

            sipRes = (sipSelfWasArg ? sipCpp->::QIntValidator::validate(*a0, a1) : sipCpp->validate(*a0, a1));

            sipResObj = sipBuildResult(0, "(FDi)", sipRes, sipType_QValidator_State, a0, sipType_QString, SIP_NULLPTR, a1);
            sipReleaseType(a0, sipType_QString, a0State);

            return sipResObj;
        }
    }

    sipNoMethod(sipParseErr, sipName_QIntValidator, sipName_validate, doc_QIntValidator_validate);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIntValidator_fixup, "fixup(self, input: Optional[str]) -> str");

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

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

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QIntValidator, &sipCpp, sipType_QString, &a0, &a0State))
        {
            PyObject *sipResObj;

            (sipSelfWasArg ? sipCpp->::QIntValidator::fixup(*a0) : sipCpp->fixup(*a0));

            sipResObj = sipConvertFromType(a0, sipType_QString, SIP_NULLPTR);
            sipReleaseType(a0, sipType_QString, a0State);

            return sipResObj;
        }
    }

    sipNoMethod(sipParseErr, sipName_QIntValidator, sipName_fixup, doc_QIntValidator_fixup);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIntValidator_setBottom, "setBottom(self, a0: int)");

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

    {
        int a0;
        ::QIntValidator *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QIntValidator, sipName_setBottom, doc_QIntValidator_setBottom);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIntValidator_setTop, "setTop(self, a0: int)");

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

    {
        int a0;
        ::QIntValidator *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QIntValidator, sipName_setTop, doc_QIntValidator_setTop);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIntValidator_setRange, "setRange(self, bottom: int, top: int)");

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

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

        if (sipParseArgs(&sipParseErr, sipArgs, "Bii", &sipSelf, sipType_QIntValidator, &sipCpp, &a0, &a1))
        {
            (sipSelfWasArg ? sipCpp->::QIntValidator::setRange(a0, a1) : sipCpp->setRange(a0, a1));

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QIntValidator, sipName_setRange, doc_QIntValidator_setRange);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIntValidator_bottom, "bottom(self) -> int");

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

    {
        const ::QIntValidator *sipCpp;

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

            sipRes = sipCpp->bottom();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIntValidator, sipName_bottom, doc_QIntValidator_bottom);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIntValidator_top, "top(self) -> int");

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

    {
        const ::QIntValidator *sipCpp;

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

            sipRes = sipCpp->top();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIntValidator, sipName_top, doc_QIntValidator_top);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QIntValidator)
        return sipCppV;

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

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QIntValidator(void *, int);}
static void release_QIntValidator(void *sipCppV, int)
{
    ::QIntValidator *sipCpp = reinterpret_cast< ::QIntValidator *>(sipCppV);

    if (QThread::currentThread() == sipCpp->thread())
        delete sipCpp;
    else
        sipCpp->deleteLater();
}


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


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


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

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


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

    {
        ::QObject* a0 = 0;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|JH", sipType_QObject, &a0, sipOwner))
        {
            sipCpp = new sipQIntValidator(a0);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        int a0;
        int a1;
        ::QObject* a2 = 0;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "ii|JH", &a0, &a1, sipType_QObject, &a2, sipOwner))
        {
            sipCpp = new sipQIntValidator(a0, a1, a2);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_QIntValidator[] = {
    {sipName_bottom, meth_QIntValidator_bottom, METH_VARARGS, doc_QIntValidator_bottom},
    {sipName_fixup, meth_QIntValidator_fixup, METH_VARARGS, doc_QIntValidator_fixup},
    {sipName_setBottom, meth_QIntValidator_setBottom, METH_VARARGS, doc_QIntValidator_setBottom},
    {sipName_setRange, meth_QIntValidator_setRange, METH_VARARGS, doc_QIntValidator_setRange},
    {sipName_setTop, meth_QIntValidator_setTop, METH_VARARGS, doc_QIntValidator_setTop},
    {sipName_top, meth_QIntValidator_top, METH_VARARGS, doc_QIntValidator_top},
    {sipName_validate, meth_QIntValidator_validate, METH_VARARGS, doc_QIntValidator_validate}
};

PyDoc_STRVAR(doc_QIntValidator, "\1QIntValidator(parent: Optional[QObject] = None)\n"
"QIntValidator(bottom: int, top: int, parent: Optional[QObject] = None)");


static pyqt5ClassPluginDef plugin_QIntValidator = {
    &::QIntValidator::staticMetaObject,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtGui_QIntValidator = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QIntValidator,
        SIP_NULLPTR,
        &plugin_QIntValidator,
    },
    {
        sipNameNr_QIntValidator,
        {0, 0, 1},
        7, methods_QIntValidator,
        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_QIntValidator,
    -1,
    -1,
    supers_QIntValidator,
    SIP_NULLPTR,
    init_type_QIntValidator,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QIntValidator,
    SIP_NULLPTR,
    array_QIntValidator,
    SIP_NULLPTR,
    release_QIntValidator,
    cast_QIntValidator,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QIntValidator,
    sizeof (::QIntValidator),
};
