/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt6-Graphs.
 * 
 * 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 "sipAPIQtGraphs.h"

#line 26 "/build/pyqt6-graphs/src/pyqt6_graphs-6.11.0/sip/QtGraphs/qabstractseries.sip"
#include <qabstractseries.h>
#line 29 "/build/pyqt6-graphs/src/pyqt6_graphs-6.11.0/build/QtGraphs/sipQtGraphsQLegendData.cpp"

#line 26 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtGui/qcolor.sip"
#include <qcolor.h>
#line 33 "/build/pyqt6-graphs/src/pyqt6_graphs-6.11.0/build/QtGraphs/sipQtGraphsQLegendData.cpp"
#line 24 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtCore/qstring.sip"
#include <qstring.h>
#line 36 "/build/pyqt6-graphs/src/pyqt6_graphs-6.11.0/build/QtGraphs/sipQtGraphsQLegendData.cpp"


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const ::QLegendData* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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

    sipPy = sipGetReference(sipPySelf, -4);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->borderColor;

    sipPy = sipConvertFromType(sipVal, sipType_QColor, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -8, sipPySelf);
        sipKeepReference(sipPySelf, -4, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_QLegendData_borderColor(void *, PyObject *, PyObject *);}
static int varset_QLegendData_borderColor(void *sipSelf, PyObject *sipPy, PyObject *)
{
    ::QColor*sipVal;
    ::QLegendData *sipCpp = reinterpret_cast< ::QLegendData *>(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->borderColor = *sipVal;

    sipReleaseType(sipVal, sipType_QColor, sipValState);

    return 0;
}


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

    sipPy = sipGetReference(sipPySelf, -5);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->color;

    sipPy = sipConvertFromType(sipVal, sipType_QColor, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -9, sipPySelf);
        sipKeepReference(sipPySelf, -5, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_QLegendData_color(void *, PyObject *, PyObject *);}
static int varset_QLegendData_color(void *sipSelf, PyObject *sipPy, PyObject *)
{
    ::QColor*sipVal;
    ::QLegendData *sipCpp = reinterpret_cast< ::QLegendData *>(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->color = *sipVal;

    sipReleaseType(sipVal, sipType_QColor, sipValState);

    return 0;
}


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

    sipVal = &sipCpp->label;

    return sipConvertFromType(sipVal, sipType_QString, SIP_NULLPTR);
}


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

    sipReleaseType(sipVal, sipType_QString, sipValState);

    return 0;
}

sipVariableDef variables_QLegendData[] = {
    {InstanceVariable, sipName_borderColor, (PyMethodDef *)varget_QLegendData_borderColor, (PyMethodDef *)varset_QLegendData_borderColor, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_color, (PyMethodDef *)varget_QLegendData_color, (PyMethodDef *)varset_QLegendData_color, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_label, (PyMethodDef *)varget_QLegendData_label, (PyMethodDef *)varset_QLegendData_label, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_QLegendData, "\1QLegendData()\n"
"QLegendData(a0: QLegendData)");


sipClassTypeDef sipTypeDef_QtGraphs_QLegendData = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QLegendData,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QLegendData,
        {0, 0, 1},
        0, SIP_NULLPTR,
        3, variables_QLegendData,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QLegendData,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QLegendData,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QLegendData,
    assign_QLegendData,
    array_QLegendData,
    copy_QLegendData,
    release_QLegendData,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QLegendData,
    sizeof (::QLegendData),
};
