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

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtWidgets/qsizepolicy.sip"
#include <qsizepolicy.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQSizePolicy.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQSizePolicy.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQSizePolicy.cpp"


PyDoc_STRVAR(doc_QSizePolicy_horizontalPolicy, "horizontalPolicy(self) -> QSizePolicy.Policy");

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

    {
        const  ::QSizePolicy *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSizePolicy, &sipCpp))
        {
             ::QSizePolicy::Policy sipRes;

            sipRes = sipCpp->horizontalPolicy();

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

    sipNoMethod(sipParseErr, sipName_QSizePolicy, sipName_horizontalPolicy, doc_QSizePolicy_horizontalPolicy);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSizePolicy_verticalPolicy, "verticalPolicy(self) -> QSizePolicy.Policy");

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

    {
        const  ::QSizePolicy *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSizePolicy, &sipCpp))
        {
             ::QSizePolicy::Policy sipRes;

            sipRes = sipCpp->verticalPolicy();

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

    sipNoMethod(sipParseErr, sipName_QSizePolicy, sipName_verticalPolicy, doc_QSizePolicy_verticalPolicy);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSizePolicy_setHorizontalPolicy, "setHorizontalPolicy(self, QSizePolicy.Policy)");

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

    {
         ::QSizePolicy::Policy a0;
         ::QSizePolicy *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QSizePolicy, &sipCpp, sipType_QSizePolicy_Policy, &a0))
        {
            sipCpp->setHorizontalPolicy(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSizePolicy, sipName_setHorizontalPolicy, doc_QSizePolicy_setHorizontalPolicy);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSizePolicy_setVerticalPolicy, "setVerticalPolicy(self, QSizePolicy.Policy)");

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

    {
         ::QSizePolicy::Policy a0;
         ::QSizePolicy *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QSizePolicy, &sipCpp, sipType_QSizePolicy_Policy, &a0))
        {
            sipCpp->setVerticalPolicy(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSizePolicy, sipName_setVerticalPolicy, doc_QSizePolicy_setVerticalPolicy);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSizePolicy_expandingDirections, "expandingDirections(self) -> Qt.Orientations");

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

    {
        const  ::QSizePolicy *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSizePolicy, &sipCpp))
        {
             ::Qt::Orientations*sipRes;

            sipRes = new  ::Qt::Orientations(sipCpp->expandingDirections());

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

    sipNoMethod(sipParseErr, sipName_QSizePolicy, sipName_expandingDirections, doc_QSizePolicy_expandingDirections);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSizePolicy_setHeightForWidth, "setHeightForWidth(self, bool)");

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

    {
        bool a0;
         ::QSizePolicy *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QSizePolicy, &sipCpp, &a0))
        {
            sipCpp->setHeightForWidth(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSizePolicy, sipName_setHeightForWidth, doc_QSizePolicy_setHeightForWidth);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSizePolicy_hasHeightForWidth, "hasHeightForWidth(self) -> bool");

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

    {
        const  ::QSizePolicy *sipCpp;

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

            sipRes = sipCpp->hasHeightForWidth();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSizePolicy, sipName_hasHeightForWidth, doc_QSizePolicy_hasHeightForWidth);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSizePolicy_horizontalStretch, "horizontalStretch(self) -> int");

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

    {
        const  ::QSizePolicy *sipCpp;

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

            sipRes = sipCpp->horizontalStretch();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSizePolicy, sipName_horizontalStretch, doc_QSizePolicy_horizontalStretch);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSizePolicy_verticalStretch, "verticalStretch(self) -> int");

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

    {
        const  ::QSizePolicy *sipCpp;

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

            sipRes = sipCpp->verticalStretch();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSizePolicy, sipName_verticalStretch, doc_QSizePolicy_verticalStretch);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSizePolicy_setHorizontalStretch, "setHorizontalStretch(self, int)");

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

    {
        int a0;
         ::QSizePolicy *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSizePolicy, sipName_setHorizontalStretch, doc_QSizePolicy_setHorizontalStretch);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSizePolicy_setVerticalStretch, "setVerticalStretch(self, int)");

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

    {
        int a0;
         ::QSizePolicy *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSizePolicy, sipName_setVerticalStretch, doc_QSizePolicy_setVerticalStretch);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSizePolicy_transpose, "transpose(self)");

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

    {
         ::QSizePolicy *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSizePolicy, &sipCpp))
        {
            sipCpp->transpose();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSizePolicy, sipName_transpose, doc_QSizePolicy_transpose);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSizePolicy_transposed, "transposed(self) -> QSizePolicy");

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

    {
        const  ::QSizePolicy *sipCpp;

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

            sipRes = new  ::QSizePolicy(sipCpp->transposed());

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

    sipNoMethod(sipParseErr, sipName_QSizePolicy, sipName_transposed, doc_QSizePolicy_transposed);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSizePolicy_controlType, "controlType(self) -> QSizePolicy.ControlType");

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

    {
        const  ::QSizePolicy *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSizePolicy, &sipCpp))
        {
             ::QSizePolicy::ControlType sipRes;

            sipRes = sipCpp->controlType();

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

    sipNoMethod(sipParseErr, sipName_QSizePolicy, sipName_controlType, doc_QSizePolicy_controlType);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSizePolicy_setControlType, "setControlType(self, QSizePolicy.ControlType)");

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

    {
         ::QSizePolicy::ControlType a0;
         ::QSizePolicy *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QSizePolicy, &sipCpp, sipType_QSizePolicy_ControlType, &a0))
        {
            sipCpp->setControlType(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSizePolicy, sipName_setControlType, doc_QSizePolicy_setControlType);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSizePolicy_setWidthForHeight, "setWidthForHeight(self, bool)");

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

    {
        bool a0;
         ::QSizePolicy *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QSizePolicy, &sipCpp, &a0))
        {
            sipCpp->setWidthForHeight(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSizePolicy, sipName_setWidthForHeight, doc_QSizePolicy_setWidthForHeight);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSizePolicy_hasWidthForHeight, "hasWidthForHeight(self) -> bool");

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

    {
        const  ::QSizePolicy *sipCpp;

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

            sipRes = sipCpp->hasWidthForHeight();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSizePolicy, sipName_hasWidthForHeight, doc_QSizePolicy_hasWidthForHeight);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSizePolicy_retainSizeWhenHidden, "retainSizeWhenHidden(self) -> bool");

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

    {
        const  ::QSizePolicy *sipCpp;

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

            sipRes = sipCpp->retainSizeWhenHidden();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSizePolicy, sipName_retainSizeWhenHidden, doc_QSizePolicy_retainSizeWhenHidden);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSizePolicy_setRetainSizeWhenHidden, "setRetainSizeWhenHidden(self, bool)");

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

    {
        bool a0;
         ::QSizePolicy *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QSizePolicy, &sipCpp, &a0))
        {
            sipCpp->setRetainSizeWhenHidden(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSizePolicy, sipName_setRetainSizeWhenHidden, doc_QSizePolicy_setRetainSizeWhenHidden);

    return SIP_NULLPTR;
}


extern "C" {static long slot_QSizePolicy___hash__(PyObject *);}
static long slot_QSizePolicy___hash__(PyObject *sipSelf)
{
     ::QSizePolicy *sipCpp = reinterpret_cast< ::QSizePolicy *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QSizePolicy));

    if (!sipCpp)
        return 0L;


    {
        {
            long sipRes = 0;

#line 110 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtWidgets/qsizepolicy.sip"
        sipRes = qHash(*sipCpp);
#line 566 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQSizePolicy.cpp"

            return sipRes;
        }
    }

    return 0;
}


extern "C" {static PyObject *slot_QSizePolicy___ne__(PyObject *,PyObject *);}
static PyObject *slot_QSizePolicy___ne__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QSizePolicy *sipCpp = reinterpret_cast< ::QSizePolicy *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QSizePolicy));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QSizePolicy* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtWidgets, ne_slot, sipType_QSizePolicy, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QSizePolicy___eq__(PyObject *,PyObject *);}
static PyObject *slot_QSizePolicy___eq__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QSizePolicy *sipCpp = reinterpret_cast< ::QSizePolicy *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QSizePolicy));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QSizePolicy* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtWidgets, eq_slot, sipType_QSizePolicy, sipSelf, sipArg);
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
         ::QSizePolicy::Policy a0;
         ::QSizePolicy::Policy a1;
         ::QSizePolicy::ControlType a2 = QSizePolicy::DefaultType;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "EE|E", sipType_QSizePolicy_Policy, &a0, sipType_QSizePolicy_Policy, &a1, sipType_QSizePolicy_ControlType, &a2))
        {
            sipCpp = new  ::QSizePolicy(a0,a1,a2);

            return sipCpp;
        }
    }

    {
        const  ::QVariant* a0;
        PyObject *a0Wrapper;
        int a0State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "@J1", &a0Wrapper, sipType_QVariant, &a0, &a0State))
        {
            sipErrorState sipError = sipErrorNone;

#line 53 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtWidgets/qsizepolicy.sip"
        if (a0->canConvert<QSizePolicy>())
            sipCpp = new QSizePolicy(a0->value<QSizePolicy>());
        else
            sipError = sipBadCallableArg(0, a0Wrapper);
#line 733 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQSizePolicy.cpp"
            sipReleaseType(const_cast< ::QVariant *>(a0), sipType_QVariant, a0State);

            if (sipError == sipErrorNone)
                return sipCpp;

            if (sipUnused)
            {
                Py_XDECREF(*sipUnused);
            }

            sipAddException(sipError, sipParseErr);

            if (sipError == sipErrorFail)
                return SIP_NULLPTR;
        }
    }

    {
        const  ::QSizePolicy* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QSizePolicy[] = {
    {(void *)slot_QSizePolicy___hash__, hash_slot},
    {(void *)slot_QSizePolicy___ne__, ne_slot},
    {(void *)slot_QSizePolicy___eq__, eq_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QSizePolicy[] = {
    {sipName_controlType, meth_QSizePolicy_controlType, METH_VARARGS, doc_QSizePolicy_controlType},
    {sipName_expandingDirections, meth_QSizePolicy_expandingDirections, METH_VARARGS, doc_QSizePolicy_expandingDirections},
    {sipName_hasHeightForWidth, meth_QSizePolicy_hasHeightForWidth, METH_VARARGS, doc_QSizePolicy_hasHeightForWidth},
    {sipName_hasWidthForHeight, meth_QSizePolicy_hasWidthForHeight, METH_VARARGS, doc_QSizePolicy_hasWidthForHeight},
    {sipName_horizontalPolicy, meth_QSizePolicy_horizontalPolicy, METH_VARARGS, doc_QSizePolicy_horizontalPolicy},
    {sipName_horizontalStretch, meth_QSizePolicy_horizontalStretch, METH_VARARGS, doc_QSizePolicy_horizontalStretch},
    {sipName_retainSizeWhenHidden, meth_QSizePolicy_retainSizeWhenHidden, METH_VARARGS, doc_QSizePolicy_retainSizeWhenHidden},
    {sipName_setControlType, meth_QSizePolicy_setControlType, METH_VARARGS, doc_QSizePolicy_setControlType},
    {sipName_setHeightForWidth, meth_QSizePolicy_setHeightForWidth, METH_VARARGS, doc_QSizePolicy_setHeightForWidth},
    {sipName_setHorizontalPolicy, meth_QSizePolicy_setHorizontalPolicy, METH_VARARGS, doc_QSizePolicy_setHorizontalPolicy},
    {sipName_setHorizontalStretch, meth_QSizePolicy_setHorizontalStretch, METH_VARARGS, doc_QSizePolicy_setHorizontalStretch},
    {sipName_setRetainSizeWhenHidden, meth_QSizePolicy_setRetainSizeWhenHidden, METH_VARARGS, doc_QSizePolicy_setRetainSizeWhenHidden},
    {sipName_setVerticalPolicy, meth_QSizePolicy_setVerticalPolicy, METH_VARARGS, doc_QSizePolicy_setVerticalPolicy},
    {sipName_setVerticalStretch, meth_QSizePolicy_setVerticalStretch, METH_VARARGS, doc_QSizePolicy_setVerticalStretch},
    {sipName_setWidthForHeight, meth_QSizePolicy_setWidthForHeight, METH_VARARGS, doc_QSizePolicy_setWidthForHeight},
    {sipName_transpose, meth_QSizePolicy_transpose, METH_VARARGS, doc_QSizePolicy_transpose},
    {sipName_transposed, meth_QSizePolicy_transposed, METH_VARARGS, doc_QSizePolicy_transposed},
    {sipName_verticalPolicy, meth_QSizePolicy_verticalPolicy, METH_VARARGS, doc_QSizePolicy_verticalPolicy},
    {sipName_verticalStretch, meth_QSizePolicy_verticalStretch, METH_VARARGS, doc_QSizePolicy_verticalStretch}
};

static sipEnumMemberDef enummembers_QSizePolicy[] = {
    {sipName_ButtonBox, static_cast<int>( ::QSizePolicy::ButtonBox), 275},
    {sipName_CheckBox, static_cast<int>( ::QSizePolicy::CheckBox), 275},
    {sipName_ComboBox, static_cast<int>( ::QSizePolicy::ComboBox), 275},
    {sipName_DefaultType, static_cast<int>( ::QSizePolicy::DefaultType), 275},
    {sipName_ExpandFlag, static_cast<int>( ::QSizePolicy::ExpandFlag), 278},
    {sipName_Expanding, static_cast<int>( ::QSizePolicy::Expanding), 277},
    {sipName_Fixed, static_cast<int>( ::QSizePolicy::Fixed), 277},
    {sipName_Frame, static_cast<int>( ::QSizePolicy::Frame), 275},
    {sipName_GroupBox, static_cast<int>( ::QSizePolicy::GroupBox), 275},
    {sipName_GrowFlag, static_cast<int>( ::QSizePolicy::GrowFlag), 278},
    {sipName_IgnoreFlag, static_cast<int>( ::QSizePolicy::IgnoreFlag), 278},
    {sipName_Ignored, static_cast<int>( ::QSizePolicy::Ignored), 277},
    {sipName_Label, static_cast<int>( ::QSizePolicy::Label), 275},
    {sipName_Line, static_cast<int>( ::QSizePolicy::Line), 275},
    {sipName_LineEdit, static_cast<int>( ::QSizePolicy::LineEdit), 275},
    {sipName_Maximum, static_cast<int>( ::QSizePolicy::Maximum), 277},
    {sipName_Minimum, static_cast<int>( ::QSizePolicy::Minimum), 277},
    {sipName_MinimumExpanding, static_cast<int>( ::QSizePolicy::MinimumExpanding), 277},
    {sipName_Preferred, static_cast<int>( ::QSizePolicy::Preferred), 277},
    {sipName_PushButton, static_cast<int>( ::QSizePolicy::PushButton), 275},
    {sipName_RadioButton, static_cast<int>( ::QSizePolicy::RadioButton), 275},
    {sipName_ShrinkFlag, static_cast<int>( ::QSizePolicy::ShrinkFlag), 278},
    {sipName_Slider, static_cast<int>( ::QSizePolicy::Slider), 275},
    {sipName_SpinBox, static_cast<int>( ::QSizePolicy::SpinBox), 275},
    {sipName_TabWidget, static_cast<int>( ::QSizePolicy::TabWidget), 275},
    {sipName_ToolButton, static_cast<int>( ::QSizePolicy::ToolButton), 275},
};

PyDoc_STRVAR(doc_QSizePolicy, "\1QSizePolicy()\n"
"QSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy, type: QSizePolicy.ControlType = QSizePolicy.DefaultType)\n"
"QSizePolicy(Any)\n"
"QSizePolicy(QSizePolicy)");


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


sipClassTypeDef sipTypeDef_QtWidgets_QSizePolicy = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QSizePolicy,
        SIP_NULLPTR,
        &plugin_QSizePolicy
    },
    {
        sipNameNr_QSizePolicy,
        {0, 0, 1},
        19, methods_QSizePolicy,
        26, enummembers_QSizePolicy,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QSizePolicy,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QSizePolicy,
    init_type_QSizePolicy,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QSizePolicy,
    assign_QSizePolicy,
    array_QSizePolicy,
    copy_QSizePolicy,
    release_QSizePolicy,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QSizePolicy,
    sizeof ( ::QSizePolicy),
};
