/*
 * 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 982 "/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/sipQtWidgetsQStyleOptionGroupBox.cpp"

#line 208 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtWidgets/qstyleoption.sip"
#include <qstyleoption.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQStyleOptionGroupBox.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/sipQtWidgetsQStyleOptionGroupBox.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQStyleOptionGroupBox.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qcolor.sip"
#include <qcolor.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQStyleOptionGroupBox.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/sipQtWidgetsQStyleOptionGroupBox.cpp"


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

    if (targetType == sipType_QStyleOptionGroupBox)
        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_QStyleOptionGroupBox(void *, int);}
static void release_QStyleOptionGroupBox(void *sipCppV, int)
{
    delete reinterpret_cast< ::QStyleOptionGroupBox *>(sipCppV);
}


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QStyleOptionGroupBox* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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

static sipEnumMemberDef enummembers_QStyleOptionGroupBox[] = {
    {sipName_Type, static_cast<int>( ::QStyleOptionGroupBox::Type), 345},
    {sipName_Version, static_cast<int>( ::QStyleOptionGroupBox::Version), 346},
};


extern "C" {static PyObject *varget_QStyleOptionGroupBox_features(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionGroupBox_features(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
     ::QStyleOptionFrame::FrameFeatures*sipVal;
     ::QStyleOptionGroupBox *sipCpp = reinterpret_cast< ::QStyleOptionGroupBox *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -64);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->features;

    sipPy = sipConvertFromType(sipVal, sipType_QStyleOptionFrame_FrameFeatures, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -63, sipPySelf);
        sipKeepReference(sipPySelf, -64, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_QStyleOptionGroupBox_features(void *, PyObject *, PyObject *);}
static int varset_QStyleOptionGroupBox_features(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QStyleOptionFrame::FrameFeatures*sipVal;
     ::QStyleOptionGroupBox *sipCpp = reinterpret_cast< ::QStyleOptionGroupBox *>(sipSelf);

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

    if (sipIsErr)
        return -1;

    sipCpp->features = *sipVal;

    sipReleaseType(sipVal, sipType_QStyleOptionFrame_FrameFeatures, sipValState);

    return 0;
}


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

    sipVal = sipCpp->lineWidth;

    return PyLong_FromLong(sipVal);
}


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

    sipVal = sipLong_AsInt(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->lineWidth = sipVal;

    return 0;
}


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

    sipVal = sipCpp->midLineWidth;

    return PyLong_FromLong(sipVal);
}


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

    sipVal = sipLong_AsInt(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->midLineWidth = sipVal;

    return 0;
}


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

    sipVal = &sipCpp->text;

    return sipConvertFromType(sipVal, sipType_QString, SIP_NULLPTR);
}


extern "C" {static int varset_QStyleOptionGroupBox_text(void *, PyObject *, PyObject *);}
static int varset_QStyleOptionGroupBox_text(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QString*sipVal;
     ::QStyleOptionGroupBox *sipCpp = reinterpret_cast< ::QStyleOptionGroupBox *>(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->text = *sipVal;

    sipReleaseType(sipVal, sipType_QString, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_QStyleOptionGroupBox_textAlignment(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionGroupBox_textAlignment(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
     ::Qt::Alignment*sipVal;
     ::QStyleOptionGroupBox *sipCpp = reinterpret_cast< ::QStyleOptionGroupBox *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -65);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->textAlignment;

    sipPy = sipConvertFromType(sipVal, sipType_Qt_Alignment, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -16, sipPySelf);
        sipKeepReference(sipPySelf, -65, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_QStyleOptionGroupBox_textAlignment(void *, PyObject *, PyObject *);}
static int varset_QStyleOptionGroupBox_textAlignment(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::Qt::Alignment*sipVal;
     ::QStyleOptionGroupBox *sipCpp = reinterpret_cast< ::QStyleOptionGroupBox *>(sipSelf);

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

    if (sipIsErr)
        return -1;

    sipCpp->textAlignment = *sipVal;

    sipReleaseType(sipVal, sipType_Qt_Alignment, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_QStyleOptionGroupBox_textColor(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionGroupBox_textColor(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
     ::QColor*sipVal;
     ::QStyleOptionGroupBox *sipCpp = reinterpret_cast< ::QStyleOptionGroupBox *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -66);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->textColor;

    sipPy = sipConvertFromType(sipVal, sipType_QColor, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -7, sipPySelf);
        sipKeepReference(sipPySelf, -66, sipPy);
    }

    return sipPy;
}


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

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

    if (sipIsErr)
        return -1;

    sipCpp->textColor = *sipVal;

    sipReleaseType(sipVal, sipType_QColor, sipValState);

    return 0;
}

sipVariableDef variables_QStyleOptionGroupBox[] = {
    {InstanceVariable, sipName_features, (PyMethodDef *)varget_QStyleOptionGroupBox_features, (PyMethodDef *)varset_QStyleOptionGroupBox_features, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_lineWidth, (PyMethodDef *)varget_QStyleOptionGroupBox_lineWidth, (PyMethodDef *)varset_QStyleOptionGroupBox_lineWidth, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_midLineWidth, (PyMethodDef *)varget_QStyleOptionGroupBox_midLineWidth, (PyMethodDef *)varset_QStyleOptionGroupBox_midLineWidth, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_text, (PyMethodDef *)varget_QStyleOptionGroupBox_text, (PyMethodDef *)varset_QStyleOptionGroupBox_text, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_textAlignment, (PyMethodDef *)varget_QStyleOptionGroupBox_textAlignment, (PyMethodDef *)varset_QStyleOptionGroupBox_textAlignment, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_textColor, (PyMethodDef *)varget_QStyleOptionGroupBox_textColor, (PyMethodDef *)varset_QStyleOptionGroupBox_textColor, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_QStyleOptionGroupBox, "\1QStyleOptionGroupBox()\n"
"QStyleOptionGroupBox(QStyleOptionGroupBox)");


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


sipClassTypeDef sipTypeDef_QtWidgets_QStyleOptionGroupBox = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QStyleOptionGroupBox,
        SIP_NULLPTR,
        &plugin_QStyleOptionGroupBox
    },
    {
        sipNameNr_QStyleOptionGroupBox,
        {0, 0, 1},
        0, SIP_NULLPTR,
        2, enummembers_QStyleOptionGroupBox,
        6, variables_QStyleOptionGroupBox,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QStyleOptionGroupBox,
    -1,
    -1,
    supers_QStyleOptionGroupBox,
    SIP_NULLPTR,
    init_type_QStyleOptionGroupBox,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QStyleOptionGroupBox,
    assign_QStyleOptionGroupBox,
    array_QStyleOptionGroupBox,
    copy_QStyleOptionGroupBox,
    release_QStyleOptionGroupBox,
    cast_QStyleOptionGroupBox,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QStyleOptionGroupBox,
    sizeof ( ::QStyleOptionGroupBox),
};
