/*
 * Interface wrapper code.
 *
 * Generated by SIP 4.19.23
 *
 * Copyright (c) 2020 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 579 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtWidgets/qstyleoption.sip"
#include <qstyleoption.h>
#line 29 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtWidgets/sipQtWidgetsQStyleOptionViewItem.cpp"

#line 26 "sip/QtGui/qbrush.sip"
#include <qbrush.h>
#line 33 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtWidgets/sipQtWidgetsQStyleOptionViewItem.cpp"
#line 26 "sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 36 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtWidgets/sipQtWidgetsQStyleOptionViewItem.cpp"
#line 26 "sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 39 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtWidgets/sipQtWidgetsQStyleOptionViewItem.cpp"
#line 26 "sip/QtCore/qsize.sip"
#include <qsize.h>
#line 42 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtWidgets/sipQtWidgetsQStyleOptionViewItem.cpp"
#line 579 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtWidgets/qstyleoption.sip"
#include <qstyleoption.h>
#line 45 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtWidgets/sipQtWidgetsQStyleOptionViewItem.cpp"
#line 26 "sip/QtGui/qfont.sip"
#include <qfont.h>
#line 48 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtWidgets/sipQtWidgetsQStyleOptionViewItem.cpp"
#line 26 "sip/QtGui/qicon.sip"
#include <qicon.h>
#line 51 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtWidgets/sipQtWidgetsQStyleOptionViewItem.cpp"
#line 26 "sip/QtCore/qabstractitemmodel.sip"
#include <qabstractitemmodel.h>
#line 54 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtWidgets/sipQtWidgetsQStyleOptionViewItem.cpp"
#line 26 "sip/QtCore/qlocale.sip"
#include <qlocale.h>
#line 57 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtWidgets/sipQtWidgetsQStyleOptionViewItem.cpp"
#line 27 "sip/QtCore/qstring.sip"
#include <qstring.h>
#line 60 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtWidgets/sipQtWidgetsQStyleOptionViewItem.cpp"
#line 28 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtWidgets/qwidget.sip"
#include <qwidget.h>
#line 63 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtWidgets/sipQtWidgetsQStyleOptionViewItem.cpp"


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

    if (targetType == sipType_QStyleOption)
        return static_cast< ::QStyleOption *>(sipCpp);

    return sipCppV;
}


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


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


extern "C" {static void assign_QStyleOptionViewItem(void *, SIP_SSIZE_T, void *);}
static void assign_QStyleOptionViewItem(void *sipDst, SIP_SSIZE_T sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::QStyleOptionViewItem *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::QStyleOptionViewItem *>(sipSrc);
}


extern "C" {static void *copy_QStyleOptionViewItem(const void *, SIP_SSIZE_T);}
static void *copy_QStyleOptionViewItem(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new  ::QStyleOptionViewItem(reinterpret_cast<const  ::QStyleOptionViewItem *>(sipSrc)[sipSrcIdx]);
}


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QStyleOptionViewItem* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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

static sipEnumMemberDef enummembers_QStyleOptionViewItem[] = {
    {sipName_Alternate, static_cast<int>( ::QStyleOptionViewItem::Alternate), 413},
    {sipName_Beginning, static_cast<int>( ::QStyleOptionViewItem::Beginning), 415},
    {sipName_Bottom, static_cast<int>( ::QStyleOptionViewItem::Bottom), 410},
    {sipName_End, static_cast<int>( ::QStyleOptionViewItem::End), 415},
    {sipName_HasCheckIndicator, static_cast<int>( ::QStyleOptionViewItem::HasCheckIndicator), 413},
    {sipName_HasDecoration, static_cast<int>( ::QStyleOptionViewItem::HasDecoration), 413},
    {sipName_HasDisplay, static_cast<int>( ::QStyleOptionViewItem::HasDisplay), 413},
    {sipName_Invalid, static_cast<int>( ::QStyleOptionViewItem::Invalid), 415},
    {sipName_Left, static_cast<int>( ::QStyleOptionViewItem::Left), 410},
    {sipName_Middle, static_cast<int>( ::QStyleOptionViewItem::Middle), 415},
    {sipName_None_, static_cast<int>( ::QStyleOptionViewItem::None), 413},
    {sipName_OnlyOne, static_cast<int>( ::QStyleOptionViewItem::OnlyOne), 415},
    {sipName_Right, static_cast<int>( ::QStyleOptionViewItem::Right), 410},
    {sipName_Top, static_cast<int>( ::QStyleOptionViewItem::Top), 410},
    {sipName_Type, static_cast<int>( ::QStyleOptionViewItem::Type), 411},
    {sipName_Version, static_cast<int>( ::QStyleOptionViewItem::Version), 412},
    {sipName_WrapText, static_cast<int>( ::QStyleOptionViewItem::WrapText), 413},
};


extern "C" {static PyObject *varget_QStyleOptionViewItem_backgroundBrush(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionViewItem_backgroundBrush(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
     ::QBrush*sipVal;
     ::QStyleOptionViewItem *sipCpp = reinterpret_cast< ::QStyleOptionViewItem *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -88);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->backgroundBrush;

    sipPy = sipConvertFromType(sipVal, sipType_QBrush, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -14, sipPySelf);
        sipKeepReference(sipPySelf, -88, sipPy);
    }

    return sipPy;
}


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

    int sipValState;
    int sipIsErr = 0;

    sipVal = reinterpret_cast< ::QBrush *>(sipForceConvertToType(sipPy, sipType_QBrush, SIP_NULLPTR, SIP_NOT_NONE, &sipValState, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->backgroundBrush = *sipVal;

    sipReleaseType(sipVal, sipType_QBrush, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_QStyleOptionViewItem_checkState(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionViewItem_checkState(void *sipSelf, PyObject *, PyObject *)
{
     ::Qt::CheckState sipVal;
     ::QStyleOptionViewItem *sipCpp = reinterpret_cast< ::QStyleOptionViewItem *>(sipSelf);

    sipVal = sipCpp->checkState;

    return sipConvertFromEnum(static_cast<int>(sipVal), sipType_Qt_CheckState);
}


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

    sipVal = ( ::Qt::CheckState)sipConvertToEnum(sipPy, sipType_Qt_CheckState);

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

    sipCpp->checkState = sipVal;

    return 0;
}


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

    sipPy = sipGetReference(sipPySelf, -89);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->decorationAlignment;

    sipPy = sipConvertFromType(sipVal, sipType_Qt_Alignment, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -22, sipPySelf);
        sipKeepReference(sipPySelf, -89, sipPy);
    }

    return sipPy;
}


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

    int sipValState;
    int sipIsErr = 0;

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

    if (sipIsErr)
        return -1;

    sipCpp->decorationAlignment = *sipVal;

    sipReleaseType(sipVal, sipType_Qt_Alignment, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_QStyleOptionViewItem_decorationPosition(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionViewItem_decorationPosition(void *sipSelf, PyObject *, PyObject *)
{
     ::QStyleOptionViewItem::Position sipVal;
     ::QStyleOptionViewItem *sipCpp = reinterpret_cast< ::QStyleOptionViewItem *>(sipSelf);

    sipVal = sipCpp->decorationPosition;

    return sipConvertFromEnum(static_cast<int>(sipVal), sipType_QStyleOptionViewItem_Position);
}


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

    sipVal = ( ::QStyleOptionViewItem::Position)sipConvertToEnum(sipPy, sipType_QStyleOptionViewItem_Position);

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

    sipCpp->decorationPosition = sipVal;

    return 0;
}


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

    sipPy = sipGetReference(sipPySelf, -90);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->decorationSize;

    sipPy = sipConvertFromType(sipVal, sipType_QSize, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -23, sipPySelf);
        sipKeepReference(sipPySelf, -90, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_QStyleOptionViewItem_decorationSize(void *, PyObject *, PyObject *);}
static int varset_QStyleOptionViewItem_decorationSize(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QSize*sipVal;
     ::QStyleOptionViewItem *sipCpp = reinterpret_cast< ::QStyleOptionViewItem *>(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->decorationSize = *sipVal;

    return 0;
}


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

    sipPy = sipGetReference(sipPySelf, -91);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->displayAlignment;

    sipPy = sipConvertFromType(sipVal, sipType_Qt_Alignment, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -24, sipPySelf);
        sipKeepReference(sipPySelf, -91, sipPy);
    }

    return sipPy;
}


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

    int sipValState;
    int sipIsErr = 0;

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

    if (sipIsErr)
        return -1;

    sipCpp->displayAlignment = *sipVal;

    sipReleaseType(sipVal, sipType_Qt_Alignment, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_QStyleOptionViewItem_features(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionViewItem_features(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
     ::QStyleOptionViewItem::ViewItemFeatures*sipVal;
     ::QStyleOptionViewItem *sipCpp = reinterpret_cast< ::QStyleOptionViewItem *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -93);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->features;

    sipPy = sipConvertFromType(sipVal, sipType_QStyleOptionViewItem_ViewItemFeatures, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -92, sipPySelf);
        sipKeepReference(sipPySelf, -93, sipPy);
    }

    return sipPy;
}


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

    int sipValState;
    int sipIsErr = 0;

    sipVal = reinterpret_cast< ::QStyleOptionViewItem::ViewItemFeatures *>(sipForceConvertToType(sipPy, sipType_QStyleOptionViewItem_ViewItemFeatures, SIP_NULLPTR, SIP_NOT_NONE, &sipValState, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->features = *sipVal;

    sipReleaseType(sipVal, sipType_QStyleOptionViewItem_ViewItemFeatures, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_QStyleOptionViewItem_font(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionViewItem_font(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
     ::QFont*sipVal;
     ::QStyleOptionViewItem *sipCpp = reinterpret_cast< ::QStyleOptionViewItem *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -94);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->font;

    sipPy = sipConvertFromType(sipVal, sipType_QFont, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -15, sipPySelf);
        sipKeepReference(sipPySelf, -94, sipPy);
    }

    return sipPy;
}


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

    int sipIsErr = 0;

    sipVal = reinterpret_cast< ::QFont *>(sipForceConvertToType(sipPy, sipType_QFont, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->font = *sipVal;

    return 0;
}


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

    sipPy = sipGetReference(sipPySelf, -95);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->icon;

    sipPy = sipConvertFromType(sipVal, sipType_QIcon, SIP_NULLPTR);

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

    return sipPy;
}


extern "C" {static int varset_QStyleOptionViewItem_icon(void *, PyObject *, PyObject *);}
static int varset_QStyleOptionViewItem_icon(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QIcon*sipVal;
     ::QStyleOptionViewItem *sipCpp = reinterpret_cast< ::QStyleOptionViewItem *>(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->icon = *sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QStyleOptionViewItem_index(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionViewItem_index(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
     ::QModelIndex*sipVal;
     ::QStyleOptionViewItem *sipCpp = reinterpret_cast< ::QStyleOptionViewItem *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -96);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->index;

    sipPy = sipConvertFromType(sipVal, sipType_QModelIndex, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -25, sipPySelf);
        sipKeepReference(sipPySelf, -96, sipPy);
    }

    return sipPy;
}


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

    int sipIsErr = 0;

    sipVal = reinterpret_cast< ::QModelIndex *>(sipForceConvertToType(sipPy, sipType_QModelIndex, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->index = *sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QStyleOptionViewItem_locale(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionViewItem_locale(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
     ::QLocale*sipVal;
     ::QStyleOptionViewItem *sipCpp = reinterpret_cast< ::QStyleOptionViewItem *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -97);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->locale;

    sipPy = sipConvertFromType(sipVal, sipType_QLocale, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -26, sipPySelf);
        sipKeepReference(sipPySelf, -97, sipPy);
    }

    return sipPy;
}


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

    int sipIsErr = 0;

    sipVal = reinterpret_cast< ::QLocale *>(sipForceConvertToType(sipPy, sipType_QLocale, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->locale = *sipVal;

    return 0;
}


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

    sipVal = sipCpp->showDecorationSelected;

    return PyBool_FromLong(sipVal);
}


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

    sipVal = sipConvertToBool(sipPy);

    if (sipVal < 0)
        return -1;

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

    return 0;
}


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

    sipVal = &sipCpp->text;

    return sipConvertFromType(sipVal, sipType_QString, SIP_NULLPTR);
}


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

    int sipValState;
    int sipIsErr = 0;

    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_QStyleOptionViewItem_textElideMode(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionViewItem_textElideMode(void *sipSelf, PyObject *, PyObject *)
{
     ::Qt::TextElideMode sipVal;
     ::QStyleOptionViewItem *sipCpp = reinterpret_cast< ::QStyleOptionViewItem *>(sipSelf);

    sipVal = sipCpp->textElideMode;

    return sipConvertFromEnum(static_cast<int>(sipVal), sipType_Qt_TextElideMode);
}


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

    sipVal = ( ::Qt::TextElideMode)sipConvertToEnum(sipPy, sipType_Qt_TextElideMode);

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

    sipCpp->textElideMode = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QStyleOptionViewItem_viewItemPosition(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionViewItem_viewItemPosition(void *sipSelf, PyObject *, PyObject *)
{
     ::QStyleOptionViewItem::ViewItemPosition sipVal;
     ::QStyleOptionViewItem *sipCpp = reinterpret_cast< ::QStyleOptionViewItem *>(sipSelf);

    sipVal = sipCpp->viewItemPosition;

    return sipConvertFromEnum(static_cast<int>(sipVal), sipType_QStyleOptionViewItem_ViewItemPosition);
}


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

    sipVal = ( ::QStyleOptionViewItem::ViewItemPosition)sipConvertToEnum(sipPy, sipType_QStyleOptionViewItem_ViewItemPosition);

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

    sipCpp->viewItemPosition = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QStyleOptionViewItem_widget(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionViewItem_widget(void *sipSelf, PyObject *, PyObject *)
{
    const  ::QWidget*sipVal;
     ::QStyleOptionViewItem *sipCpp = reinterpret_cast< ::QStyleOptionViewItem *>(sipSelf);

    sipVal = sipCpp->widget;

    return sipConvertFromType(const_cast< ::QWidget *>(sipVal), sipType_QWidget, SIP_NULLPTR);
}


extern "C" {static int varset_QStyleOptionViewItem_widget(void *, PyObject *, PyObject *);}
static int varset_QStyleOptionViewItem_widget(void *sipSelf, PyObject *sipPy, PyObject *)
{
    const  ::QWidget*sipVal;
     ::QStyleOptionViewItem *sipCpp = reinterpret_cast< ::QStyleOptionViewItem *>(sipSelf);

    int sipIsErr = 0;

    sipVal = reinterpret_cast< ::QWidget *>(sipForceConvertToType(sipPy, sipType_QWidget, SIP_NULLPTR, 0, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->widget = sipVal;

    return 0;
}

sipVariableDef variables_QStyleOptionViewItem[] = {
    {InstanceVariable, sipName_backgroundBrush, (PyMethodDef *)varget_QStyleOptionViewItem_backgroundBrush, (PyMethodDef *)varset_QStyleOptionViewItem_backgroundBrush, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_checkState, (PyMethodDef *)varget_QStyleOptionViewItem_checkState, (PyMethodDef *)varset_QStyleOptionViewItem_checkState, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_decorationAlignment, (PyMethodDef *)varget_QStyleOptionViewItem_decorationAlignment, (PyMethodDef *)varset_QStyleOptionViewItem_decorationAlignment, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_decorationPosition, (PyMethodDef *)varget_QStyleOptionViewItem_decorationPosition, (PyMethodDef *)varset_QStyleOptionViewItem_decorationPosition, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_decorationSize, (PyMethodDef *)varget_QStyleOptionViewItem_decorationSize, (PyMethodDef *)varset_QStyleOptionViewItem_decorationSize, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_displayAlignment, (PyMethodDef *)varget_QStyleOptionViewItem_displayAlignment, (PyMethodDef *)varset_QStyleOptionViewItem_displayAlignment, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_features, (PyMethodDef *)varget_QStyleOptionViewItem_features, (PyMethodDef *)varset_QStyleOptionViewItem_features, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_font, (PyMethodDef *)varget_QStyleOptionViewItem_font, (PyMethodDef *)varset_QStyleOptionViewItem_font, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_icon, (PyMethodDef *)varget_QStyleOptionViewItem_icon, (PyMethodDef *)varset_QStyleOptionViewItem_icon, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_index, (PyMethodDef *)varget_QStyleOptionViewItem_index, (PyMethodDef *)varset_QStyleOptionViewItem_index, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_locale, (PyMethodDef *)varget_QStyleOptionViewItem_locale, (PyMethodDef *)varset_QStyleOptionViewItem_locale, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_showDecorationSelected, (PyMethodDef *)varget_QStyleOptionViewItem_showDecorationSelected, (PyMethodDef *)varset_QStyleOptionViewItem_showDecorationSelected, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_text, (PyMethodDef *)varget_QStyleOptionViewItem_text, (PyMethodDef *)varset_QStyleOptionViewItem_text, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_textElideMode, (PyMethodDef *)varget_QStyleOptionViewItem_textElideMode, (PyMethodDef *)varset_QStyleOptionViewItem_textElideMode, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_viewItemPosition, (PyMethodDef *)varget_QStyleOptionViewItem_viewItemPosition, (PyMethodDef *)varset_QStyleOptionViewItem_viewItemPosition, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_widget, (PyMethodDef *)varget_QStyleOptionViewItem_widget, (PyMethodDef *)varset_QStyleOptionViewItem_widget, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_QStyleOptionViewItem, "\1QStyleOptionViewItem()\n"
"QStyleOptionViewItem(QStyleOptionViewItem)");


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


sipClassTypeDef sipTypeDef_QtWidgets_QStyleOptionViewItem = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QStyleOptionViewItem,
        {SIP_NULLPTR},
        &plugin_QStyleOptionViewItem
    },
    {
        sipNameNr_QStyleOptionViewItem,
        {0, 0, 1},
        0, SIP_NULLPTR,
        17, enummembers_QStyleOptionViewItem,
        16, variables_QStyleOptionViewItem,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QStyleOptionViewItem,
    -1,
    -1,
    supers_QStyleOptionViewItem,
    SIP_NULLPTR,
    init_type_QStyleOptionViewItem,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_QStyleOptionViewItem,
    assign_QStyleOptionViewItem,
    array_QStyleOptionViewItem,
    copy_QStyleOptionViewItem,
    release_QStyleOptionViewItem,
    cast_QStyleOptionViewItem,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
