/*
 * 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 735 "/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/sipQtWidgetsQStyleOptionSlider.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQStyleOptionSlider.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtWidgets/qslider.sip"
#include <qslider.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQStyleOptionSlider.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtWidgets/qwidget.sip"
#include <qwidget.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQStyleOptionSlider.cpp"


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

    if (targetType == sipType_QStyleOptionSlider)
        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_QStyleOptionSlider(void *, int);}
static void release_QStyleOptionSlider(void *sipCppV, int)
{
    delete reinterpret_cast< ::QStyleOptionSlider *>(sipCppV);
}


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QStyleOptionSlider* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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

static sipEnumMemberDef enummembers_QStyleOptionSlider[] = {
    {sipName_Type, static_cast<int>( ::QStyleOptionSlider::Type), 368},
    {sipName_Version, static_cast<int>( ::QStyleOptionSlider::Version), 369},
};


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

    sipVal = sipCpp->dialWrapping;

    return PyBool_FromLong(sipVal);
}


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

    sipVal = sipConvertToBool(sipPy);

    if (sipVal < 0)
        return -1;

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

    return 0;
}


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

    sipVal = sipCpp->maximum;

    return PyLong_FromLong(sipVal);
}


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

    sipVal = sipLong_AsInt(sipPy);

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

    sipCpp->maximum = sipVal;

    return 0;
}


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

    sipVal = sipCpp->minimum;

    return PyLong_FromLong(sipVal);
}


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

    sipVal = sipLong_AsInt(sipPy);

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

    sipCpp->minimum = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QStyleOptionSlider_notchTarget(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionSlider_notchTarget(void *sipSelf, PyObject *, PyObject *)
{
     ::qreal sipVal;
     ::QStyleOptionSlider *sipCpp = reinterpret_cast< ::QStyleOptionSlider *>(sipSelf);

    sipVal = sipCpp->notchTarget;

    return PyFloat_FromDouble(sipVal);
}


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

    sipVal = PyFloat_AsDouble(sipPy);

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

    sipCpp->notchTarget = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QStyleOptionSlider_orientation(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionSlider_orientation(void *sipSelf, PyObject *, PyObject *)
{
     ::Qt::Orientation sipVal;
     ::QStyleOptionSlider *sipCpp = reinterpret_cast< ::QStyleOptionSlider *>(sipSelf);

    sipVal = sipCpp->orientation;

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


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

    sipVal = ( ::Qt::Orientation)sipConvertToEnum(sipPy, sipType_Qt_Orientation);

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

    sipCpp->orientation = sipVal;

    return 0;
}


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

    sipVal = sipCpp->pageStep;

    return PyLong_FromLong(sipVal);
}


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

    sipVal = sipLong_AsInt(sipPy);

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

    sipCpp->pageStep = sipVal;

    return 0;
}


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

    sipVal = sipCpp->singleStep;

    return PyLong_FromLong(sipVal);
}


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

    sipVal = sipLong_AsInt(sipPy);

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

    sipCpp->singleStep = sipVal;

    return 0;
}


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

    sipVal = sipCpp->sliderPosition;

    return PyLong_FromLong(sipVal);
}


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

    sipVal = sipLong_AsInt(sipPy);

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

    sipCpp->sliderPosition = sipVal;

    return 0;
}


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

    sipVal = sipCpp->sliderValue;

    return PyLong_FromLong(sipVal);
}


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

    sipVal = sipLong_AsInt(sipPy);

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

    sipCpp->sliderValue = sipVal;

    return 0;
}


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

    sipVal = sipCpp->tickInterval;

    return PyLong_FromLong(sipVal);
}


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

    sipVal = sipLong_AsInt(sipPy);

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

    sipCpp->tickInterval = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QStyleOptionSlider_tickPosition(void *, PyObject *, PyObject *);}
static PyObject *varget_QStyleOptionSlider_tickPosition(void *sipSelf, PyObject *, PyObject *)
{
     ::QSlider::TickPosition sipVal;
     ::QStyleOptionSlider *sipCpp = reinterpret_cast< ::QStyleOptionSlider *>(sipSelf);

    sipVal = sipCpp->tickPosition;

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


extern "C" {static int varset_QStyleOptionSlider_tickPosition(void *, PyObject *, PyObject *);}
static int varset_QStyleOptionSlider_tickPosition(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QSlider::TickPosition sipVal;
     ::QStyleOptionSlider *sipCpp = reinterpret_cast< ::QStyleOptionSlider *>(sipSelf);

    sipVal = ( ::QSlider::TickPosition)sipConvertToEnum(sipPy, sipType_QSlider_TickPosition);

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

    sipCpp->tickPosition = sipVal;

    return 0;
}


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

    sipVal = sipCpp->upsideDown;

    return PyBool_FromLong(sipVal);
}


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

    sipVal = sipConvertToBool(sipPy);

    if (sipVal < 0)
        return -1;

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

    return 0;
}

sipVariableDef variables_QStyleOptionSlider[] = {
    {InstanceVariable, sipName_dialWrapping, (PyMethodDef *)varget_QStyleOptionSlider_dialWrapping, (PyMethodDef *)varset_QStyleOptionSlider_dialWrapping, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_maximum, (PyMethodDef *)varget_QStyleOptionSlider_maximum, (PyMethodDef *)varset_QStyleOptionSlider_maximum, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_minimum, (PyMethodDef *)varget_QStyleOptionSlider_minimum, (PyMethodDef *)varset_QStyleOptionSlider_minimum, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_notchTarget, (PyMethodDef *)varget_QStyleOptionSlider_notchTarget, (PyMethodDef *)varset_QStyleOptionSlider_notchTarget, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_orientation, (PyMethodDef *)varget_QStyleOptionSlider_orientation, (PyMethodDef *)varset_QStyleOptionSlider_orientation, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_pageStep, (PyMethodDef *)varget_QStyleOptionSlider_pageStep, (PyMethodDef *)varset_QStyleOptionSlider_pageStep, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_singleStep, (PyMethodDef *)varget_QStyleOptionSlider_singleStep, (PyMethodDef *)varset_QStyleOptionSlider_singleStep, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_sliderPosition, (PyMethodDef *)varget_QStyleOptionSlider_sliderPosition, (PyMethodDef *)varset_QStyleOptionSlider_sliderPosition, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_sliderValue, (PyMethodDef *)varget_QStyleOptionSlider_sliderValue, (PyMethodDef *)varset_QStyleOptionSlider_sliderValue, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_tickInterval, (PyMethodDef *)varget_QStyleOptionSlider_tickInterval, (PyMethodDef *)varset_QStyleOptionSlider_tickInterval, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_tickPosition, (PyMethodDef *)varget_QStyleOptionSlider_tickPosition, (PyMethodDef *)varset_QStyleOptionSlider_tickPosition, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_upsideDown, (PyMethodDef *)varget_QStyleOptionSlider_upsideDown, (PyMethodDef *)varset_QStyleOptionSlider_upsideDown, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_QStyleOptionSlider, "\1QStyleOptionSlider()\n"
"QStyleOptionSlider(QStyleOptionSlider)");


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


sipClassTypeDef sipTypeDef_QtWidgets_QStyleOptionSlider = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QStyleOptionSlider,
        SIP_NULLPTR,
        &plugin_QStyleOptionSlider
    },
    {
        sipNameNr_QStyleOptionSlider,
        {0, 0, 1},
        0, SIP_NULLPTR,
        2, enummembers_QStyleOptionSlider,
        12, variables_QStyleOptionSlider,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QStyleOptionSlider,
    -1,
    -1,
    supers_QStyleOptionSlider,
    SIP_NULLPTR,
    init_type_QStyleOptionSlider,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QStyleOptionSlider,
    assign_QStyleOptionSlider,
    array_QStyleOptionSlider,
    copy_QStyleOptionSlider,
    release_QStyleOptionSlider,
    cast_QStyleOptionSlider,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QStyleOptionSlider,
    sizeof ( ::QStyleOptionSlider),
};
