/*
 * 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 834 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtWidgets/qstyleoption.sip"
#include <qstyleoption.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQStyleOptionComboBox.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qicon.sip"
#include <qicon.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQStyleOptionComboBox.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQStyleOptionComboBox.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qsize.sip"
#include <qsize.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQStyleOptionComboBox.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qrect.sip"
#include <qrect.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQStyleOptionComboBox.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtWidgets/qwidget.sip"
#include <qwidget.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQStyleOptionComboBox.cpp"


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

    if (targetType == sipType_QStyleOptionComboBox)
        return sipCppV;

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

    return SIP_NULLPTR;
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QStyleOptionComboBox* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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

static sipEnumMemberDef enummembers_QStyleOptionComboBox[] = {
    {sipName_Type, static_cast<int>( ::QStyleOptionComboBox::Type), 325},
    {sipName_Version, static_cast<int>( ::QStyleOptionComboBox::Version), 326},
};


extern "C" {static PyObject *varget_QStyleOptionComboBox_currentIcon(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionComboBox_currentIcon(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
     ::QIcon*sipVal;
     ::QStyleOptionComboBox *sipCpp = reinterpret_cast< ::QStyleOptionComboBox *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -72);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->currentIcon;

    sipPy = sipConvertFromType(sipVal, sipType_QIcon, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -10, sipPySelf);
        sipKeepReference(sipPySelf, -72, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_QStyleOptionComboBox_currentIcon(void *, PyObject *, PyObject *);}
static int varset_QStyleOptionComboBox_currentIcon(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QIcon*sipVal;
     ::QStyleOptionComboBox *sipCpp = reinterpret_cast< ::QStyleOptionComboBox *>(sipSelf);

    int sipIsErr = 0;
    sipVal = reinterpret_cast< ::QIcon *>(sipForceConvertToType(sipPy, sipType_QIcon, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->currentIcon = *sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QStyleOptionComboBox_currentText(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionComboBox_currentText(void *sipSelf, PyObject *, PyObject *)
{
     ::QString*sipVal;
     ::QStyleOptionComboBox *sipCpp = reinterpret_cast< ::QStyleOptionComboBox *>(sipSelf);

    sipVal = &sipCpp->currentText;

    return sipConvertFromType(sipVal, sipType_QString, SIP_NULLPTR);
}


extern "C" {static int varset_QStyleOptionComboBox_currentText(void *, PyObject *, PyObject *);}
static int varset_QStyleOptionComboBox_currentText(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QString*sipVal;
     ::QStyleOptionComboBox *sipCpp = reinterpret_cast< ::QStyleOptionComboBox *>(sipSelf);

    int sipIsErr = 0;
    int sipValState;
    sipVal = reinterpret_cast< ::QString *>(sipForceConvertToType(sipPy, sipType_QString, SIP_NULLPTR, SIP_NOT_NONE, &sipValState, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->currentText = *sipVal;

    sipReleaseType(sipVal, sipType_QString, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_QStyleOptionComboBox_editable(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionComboBox_editable(void *sipSelf, PyObject *, PyObject *)
{
    bool sipVal;
     ::QStyleOptionComboBox *sipCpp = reinterpret_cast< ::QStyleOptionComboBox *>(sipSelf);

    sipVal = sipCpp->editable;

    return PyBool_FromLong(sipVal);
}


extern "C" {static int varset_QStyleOptionComboBox_editable(void *, PyObject *, PyObject *);}
static int varset_QStyleOptionComboBox_editable(void *sipSelf, PyObject *sipPy, PyObject *)
{
    int sipVal;
     ::QStyleOptionComboBox *sipCpp = reinterpret_cast< ::QStyleOptionComboBox *>(sipSelf);

    sipVal = sipConvertToBool(sipPy);

    if (sipVal < 0)
        return -1;

    sipCpp->editable = static_cast<bool>(sipVal);

    return 0;
}


extern "C" {static PyObject *varget_QStyleOptionComboBox_frame(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionComboBox_frame(void *sipSelf, PyObject *, PyObject *)
{
    bool sipVal;
     ::QStyleOptionComboBox *sipCpp = reinterpret_cast< ::QStyleOptionComboBox *>(sipSelf);

    sipVal = sipCpp->frame;

    return PyBool_FromLong(sipVal);
}


extern "C" {static int varset_QStyleOptionComboBox_frame(void *, PyObject *, PyObject *);}
static int varset_QStyleOptionComboBox_frame(void *sipSelf, PyObject *sipPy, PyObject *)
{
    int sipVal;
     ::QStyleOptionComboBox *sipCpp = reinterpret_cast< ::QStyleOptionComboBox *>(sipSelf);

    sipVal = sipConvertToBool(sipPy);

    if (sipVal < 0)
        return -1;

    sipCpp->frame = static_cast<bool>(sipVal);

    return 0;
}


extern "C" {static PyObject *varget_QStyleOptionComboBox_iconSize(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionComboBox_iconSize(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
     ::QSize*sipVal;
     ::QStyleOptionComboBox *sipCpp = reinterpret_cast< ::QStyleOptionComboBox *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -73);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->iconSize;

    sipPy = sipConvertFromType(sipVal, sipType_QSize, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -18, sipPySelf);
        sipKeepReference(sipPySelf, -73, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_QStyleOptionComboBox_iconSize(void *, PyObject *, PyObject *);}
static int varset_QStyleOptionComboBox_iconSize(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QSize*sipVal;
     ::QStyleOptionComboBox *sipCpp = reinterpret_cast< ::QStyleOptionComboBox *>(sipSelf);

    int sipIsErr = 0;
    sipVal = reinterpret_cast< ::QSize *>(sipForceConvertToType(sipPy, sipType_QSize, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->iconSize = *sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QStyleOptionComboBox_popupRect(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionComboBox_popupRect(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
     ::QRect*sipVal;
     ::QStyleOptionComboBox *sipCpp = reinterpret_cast< ::QStyleOptionComboBox *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -74);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->popupRect;

    sipPy = sipConvertFromType(sipVal, sipType_QRect, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -19, sipPySelf);
        sipKeepReference(sipPySelf, -74, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_QStyleOptionComboBox_popupRect(void *, PyObject *, PyObject *);}
static int varset_QStyleOptionComboBox_popupRect(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QRect*sipVal;
     ::QStyleOptionComboBox *sipCpp = reinterpret_cast< ::QStyleOptionComboBox *>(sipSelf);

    int sipIsErr = 0;
    sipVal = reinterpret_cast< ::QRect *>(sipForceConvertToType(sipPy, sipType_QRect, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->popupRect = *sipVal;

    return 0;
}

sipVariableDef variables_QStyleOptionComboBox[] = {
    {InstanceVariable, sipName_currentIcon, (PyMethodDef *)varget_QStyleOptionComboBox_currentIcon, (PyMethodDef *)varset_QStyleOptionComboBox_currentIcon, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_currentText, (PyMethodDef *)varget_QStyleOptionComboBox_currentText, (PyMethodDef *)varset_QStyleOptionComboBox_currentText, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_editable, (PyMethodDef *)varget_QStyleOptionComboBox_editable, (PyMethodDef *)varset_QStyleOptionComboBox_editable, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_frame, (PyMethodDef *)varget_QStyleOptionComboBox_frame, (PyMethodDef *)varset_QStyleOptionComboBox_frame, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_iconSize, (PyMethodDef *)varget_QStyleOptionComboBox_iconSize, (PyMethodDef *)varset_QStyleOptionComboBox_iconSize, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_popupRect, (PyMethodDef *)varget_QStyleOptionComboBox_popupRect, (PyMethodDef *)varset_QStyleOptionComboBox_popupRect, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_QStyleOptionComboBox, "\1QStyleOptionComboBox()\n"
"QStyleOptionComboBox(QStyleOptionComboBox)");


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


sipClassTypeDef sipTypeDef_QtWidgets_QStyleOptionComboBox = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QStyleOptionComboBox,
        SIP_NULLPTR,
        &plugin_QStyleOptionComboBox
    },
    {
        sipNameNr_QStyleOptionComboBox,
        {0, 0, 1},
        0, SIP_NULLPTR,
        2, enummembers_QStyleOptionComboBox,
        6, variables_QStyleOptionComboBox,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QStyleOptionComboBox,
    -1,
    -1,
    supers_QStyleOptionComboBox,
    SIP_NULLPTR,
    init_type_QStyleOptionComboBox,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QStyleOptionComboBox,
    assign_QStyleOptionComboBox,
    array_QStyleOptionComboBox,
    copy_QStyleOptionComboBox,
    release_QStyleOptionComboBox,
    cast_QStyleOptionComboBox,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QStyleOptionComboBox,
    sizeof ( ::QStyleOptionComboBox),
};
