/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt for Python.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/

//workaround to access protected functions
#define protected public

// default includes
#include <shiboken.h>
#ifndef QT_NO_VERSION_TAGGING
#  define QT_NO_VERSION_TAGGING
#endif
#include <QDebug>
#include <pysidesignal.h>
#include <pysideproperty.h>
#include <pyside.h>
#include <pysideqenum.h>
#include <feature_select.h>
QT_WARNING_DISABLE_DEPRECATED

#include <typeinfo>
#include <iterator>

// module include
#include "pyside6_qtcore_python.h"

// main header
#include "qline_wrapper.h"

// inner classes

// Extra includes
#include <qline.h>
#include <qpoint.h>


#include <cctype>
#include <cstring>



template <class T>
static const char *typeNameOf(const T &t)
{
    const char *typeName =  typeid(t).name();
    auto size = std::strlen(typeName);
#if defined(Q_CC_MSVC) // MSVC: "class QPaintDevice * __ptr64"
    if (auto lastStar = strchr(typeName, '*')) {
        // MSVC: "class QPaintDevice * __ptr64"
        while (*--lastStar == ' ') {
        }
        size = lastStar - typeName + 1;
    }
#else // g++, Clang: "QPaintDevice *" -> "P12QPaintDevice"
    if (size > 2 && typeName[0] == 'P' && std::isdigit(typeName[1])) {
        ++typeName;
        --size;
    }
#endif
    char *result = new char[size + 1];
    result[size] = '\0';
    memcpy(result, typeName, size);
    return result;
}

// Begin code injection
// ========================================================================
// START of custom code block [file: ../glue/qtcore.cpp (qline-hash)]
namespace PySide {
    template<> inline Py_ssize_t hash(const QLine &l)
    {
        const int v[4] = {l.x1(), l.y1(), l.x2(), l.y2()};
        return qHashRange(v, v + 4);
    }
};
// END of custom code block [file: ../glue/qtcore.cpp (qline-hash)]
// ========================================================================
// End of code injection



// Target ---------------------------------------------------------

extern "C" {
static int
Sbk_QLine_Init(PyObject *self, PyObject *args, PyObject *kwds)
{
    SbkObject *sbkSelf = reinterpret_cast<SbkObject *>(self);
    PySide::Feature::Select(self);
    if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::QLine >()))
        return -1;

    ::QLine *cptr{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QLine.__init__";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[4];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0, 0, 0, 0};

    // invalid argument lengths
    if (numArgs == 3)
        goto Sbk_QLine_Init_TypeError;

    if (!PyArg_UnpackTuple(args, "QLine", 0, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3])))
        return -1;


    // Overloaded function decisor
    // 0: QLine::QLine()
    // 1: QLine::QLine(QLine)
    // 2: QLine::QLine(QPoint,QPoint)
    // 3: QLine::QLine(int,int,int,int)
    if (numArgs == 0) {
        overloadId = 0; // QLine()
    } else if (numArgs == 4
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[1])))
        && (pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[2])))
        && (pythonToCpp[3] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[3])))) {
        overloadId = 3; // QLine(int,int,int,int)
    } else if (numArgs == 2
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QPOINT_IDX], (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QPOINT_IDX], (pyArgs[1])))) {
        overloadId = 2; // QLine(QPoint,QPoint)
    } else if (numArgs == 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], (pyArgs[0])))) {
        overloadId = 1; // QLine(QLine)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLine_Init_TypeError;

    // Call function/method
    switch (overloadId) {
        case 0: // QLine()
        {

            if (!PyErr_Occurred()) {
                // QLine()
                cptr = new ::QLine();
            }
            break;
        }
        case 1: // QLine(const QLine & QLine)
        {
            if (!Shiboken::Object::isValid(pyArgs[0]))
                return -1;
            ::QLine cppArg0_local;
            ::QLine *cppArg0 = &cppArg0_local;
            if (pythonToCpp[0].isValue())
                pythonToCpp[0](pyArgs[0], &cppArg0_local);
            else
                pythonToCpp[0](pyArgs[0], &cppArg0);


            if (!PyErr_Occurred()) {
                // QLine(QLine)
                cptr = new ::QLine(*cppArg0);
            }
            break;
        }
        case 2: // QLine(const QPoint & pt1, const QPoint & pt2)
        {
            if (!Shiboken::Object::isValid(pyArgs[0]))
                return -1;
            ::QPoint cppArg0_local;
            ::QPoint *cppArg0 = &cppArg0_local;
            if (pythonToCpp[0].isValue())
                pythonToCpp[0](pyArgs[0], &cppArg0_local);
            else
                pythonToCpp[0](pyArgs[0], &cppArg0);

            if (!Shiboken::Object::isValid(pyArgs[1]))
                return -1;
            ::QPoint cppArg1_local;
            ::QPoint *cppArg1 = &cppArg1_local;
            if (pythonToCpp[1].isValue())
                pythonToCpp[1](pyArgs[1], &cppArg1_local);
            else
                pythonToCpp[1](pyArgs[1], &cppArg1);


            if (!PyErr_Occurred()) {
                // QLine(QPoint,QPoint)
                cptr = new ::QLine(*cppArg0, *cppArg1);
            }
            break;
        }
        case 3: // QLine(int x1, int y1, int x2, int y2)
        {
            int cppArg0;
            pythonToCpp[0](pyArgs[0], &cppArg0);
            int cppArg1;
            pythonToCpp[1](pyArgs[1], &cppArg1);
            int cppArg2;
            pythonToCpp[2](pyArgs[2], &cppArg2);
            int cppArg3;
            pythonToCpp[3](pyArgs[3], &cppArg3);

            if (!PyErr_Occurred()) {
                // QLine(int,int,int,int)
                cptr = new ::QLine(cppArg0, cppArg1, cppArg2, cppArg3);
            }
            break;
        }
    }

    if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::QLine >(), cptr)) {
        delete cptr;
        return -1;
    }
    if (!cptr) goto Sbk_QLine_Init_TypeError;

    Shiboken::Object::setValidCpp(sbkSelf, true);
    if (Shiboken::BindingManager::instance().hasWrapper(cptr)) {
        Shiboken::BindingManager::instance().releaseWrapper(Shiboken::BindingManager::instance().retrieveWrapper(cptr));
    }
    Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr);


    return 1;

    Sbk_QLine_Init_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return -1;
}

static PyObject *Sbk_QLineFunc___reduce__(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QLine.__reduce__";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // __reduce__()
            // Begin code injection
            // TEMPLATE - reduce_code - START
            pyResult = Py_BuildValue("(N(iiii))", PyObject_Type(self), cppSelf->x1(), cppSelf->y1(), cppSelf->x2(), cppSelf->y2());
            // TEMPLATE - reduce_code - END
            // End of code injection

        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLineFunc___repr__(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QLine.__repr__";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // __repr__()
            // Begin code injection
            // TEMPLATE - repr_code - START
            QString format = QString::asprintf("%s(%i, %i, %i, %i)",
                Py_TYPE(self)->tp_name, cppSelf->x1(), cppSelf->y1(), cppSelf->x2(), cppSelf->y2());
            pyResult = Shiboken::String::fromCString(qPrintable(format));
            // TEMPLATE - repr_code - END
            // End of code injection

        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLineFunc_center(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QLine.center";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // center()const
            QPoint cppResult = const_cast<const ::QLine *>(cppSelf)->center();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QPOINT_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLineFunc_dx(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QLine.dx";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // dx()const
            int cppResult = const_cast<const ::QLine *>(cppSelf)->dx();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLineFunc_dy(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QLine.dy";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // dy()const
            int cppResult = const_cast<const ::QLine *>(cppSelf)->dy();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLineFunc_isNull(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QLine.isNull";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // isNull()const
            bool cppResult = const_cast<const ::QLine *>(cppSelf)->isNull();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLineFunc_p1(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QLine.p1";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // p1()const
            QPoint cppResult = const_cast<const ::QLine *>(cppSelf)->p1();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QPOINT_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLineFunc_p2(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QLine.p2";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // p2()const
            QPoint cppResult = const_cast<const ::QLine *>(cppSelf)->p2();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QPOINT_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLineFunc_setLine(PyObject *self, PyObject *args)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QLine.setLine";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[4];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0, 0, 0, 0};

    // invalid argument lengths


    if (!PyArg_UnpackTuple(args, "setLine", 4, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3])))
        return {};


    // Overloaded function decisor
    // 0: QLine::setLine(int,int,int,int)
    if (numArgs == 4
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[1])))
        && (pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[2])))
        && (pythonToCpp[3] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[3])))) {
        overloadId = 0; // setLine(int,int,int,int)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLineFunc_setLine_TypeError;

    // Call function/method
    {
        int cppArg0;
        pythonToCpp[0](pyArgs[0], &cppArg0);
        int cppArg1;
        pythonToCpp[1](pyArgs[1], &cppArg1);
        int cppArg2;
        pythonToCpp[2](pyArgs[2], &cppArg2);
        int cppArg3;
        pythonToCpp[3](pyArgs[3], &cppArg3);

        if (!PyErr_Occurred()) {
            // setLine(int,int,int,int)
            cppSelf->setLine(cppArg0, cppArg1, cppArg2, cppArg3);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QLineFunc_setLine_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLineFunc_setP1(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QLine.setP1";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QLine::setP1(QPoint)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QPOINT_IDX], (pyArg)))) {
        overloadId = 0; // setP1(QPoint)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLineFunc_setP1_TypeError;

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArg))
            return {};
        ::QPoint cppArg0_local;
        ::QPoint *cppArg0 = &cppArg0_local;
        if (pythonToCpp.isValue())
            pythonToCpp(pyArg, &cppArg0_local);
        else
            pythonToCpp(pyArg, &cppArg0);


        if (!PyErr_Occurred()) {
            // setP1(QPoint)
            cppSelf->setP1(*cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QLineFunc_setP1_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLineFunc_setP2(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QLine.setP2";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QLine::setP2(QPoint)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QPOINT_IDX], (pyArg)))) {
        overloadId = 0; // setP2(QPoint)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLineFunc_setP2_TypeError;

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArg))
            return {};
        ::QPoint cppArg0_local;
        ::QPoint *cppArg0 = &cppArg0_local;
        if (pythonToCpp.isValue())
            pythonToCpp(pyArg, &cppArg0_local);
        else
            pythonToCpp(pyArg, &cppArg0);


        if (!PyErr_Occurred()) {
            // setP2(QPoint)
            cppSelf->setP2(*cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QLineFunc_setP2_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLineFunc_setPoints(PyObject *self, PyObject *args)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QLine.setPoints";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[2];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0, 0};

    // invalid argument lengths


    if (!PyArg_UnpackTuple(args, "setPoints", 2, 2, &(pyArgs[0]), &(pyArgs[1])))
        return {};


    // Overloaded function decisor
    // 0: QLine::setPoints(QPoint,QPoint)
    if (numArgs == 2
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QPOINT_IDX], (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QPOINT_IDX], (pyArgs[1])))) {
        overloadId = 0; // setPoints(QPoint,QPoint)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLineFunc_setPoints_TypeError;

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArgs[0]))
            return {};
        ::QPoint cppArg0_local;
        ::QPoint *cppArg0 = &cppArg0_local;
        if (pythonToCpp[0].isValue())
            pythonToCpp[0](pyArgs[0], &cppArg0_local);
        else
            pythonToCpp[0](pyArgs[0], &cppArg0);

        if (!Shiboken::Object::isValid(pyArgs[1]))
            return {};
        ::QPoint cppArg1_local;
        ::QPoint *cppArg1 = &cppArg1_local;
        if (pythonToCpp[1].isValue())
            pythonToCpp[1](pyArgs[1], &cppArg1_local);
        else
            pythonToCpp[1](pyArgs[1], &cppArg1);


        if (!PyErr_Occurred()) {
            // setPoints(QPoint,QPoint)
            cppSelf->setPoints(*cppArg0, *cppArg1);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QLineFunc_setPoints_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLineFunc_toTuple(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QLine.toTuple";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // toTuple()
            // Begin code injection
            // TEMPLATE - to_tuple - START
            pyResult = Py_BuildValue("iiii", cppSelf->x1(), cppSelf->y1(), cppSelf->x2(), cppSelf->y2());
            // TEMPLATE - to_tuple - END
            // End of code injection

        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLineFunc_translate(PyObject *self, PyObject *args)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QLine.translate";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[2];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0, 0};

    // invalid argument lengths


    if (!PyArg_UnpackTuple(args, "translate", 1, 2, &(pyArgs[0]), &(pyArgs[1])))
        return {};


    // Overloaded function decisor
    // 0: QLine::translate(QPoint)
    // 1: QLine::translate(int,int)
    if (numArgs == 2
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[1])))) {
        overloadId = 1; // translate(int,int)
    } else if (numArgs == 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QPOINT_IDX], (pyArgs[0])))) {
        overloadId = 0; // translate(QPoint)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLineFunc_translate_TypeError;

    // Call function/method
    switch (overloadId) {
        case 0: // translate(const QPoint & p)
        {
            if (!Shiboken::Object::isValid(pyArgs[0]))
                return {};
            ::QPoint cppArg0_local;
            ::QPoint *cppArg0 = &cppArg0_local;
            if (pythonToCpp[0].isValue())
                pythonToCpp[0](pyArgs[0], &cppArg0_local);
            else
                pythonToCpp[0](pyArgs[0], &cppArg0);


            if (!PyErr_Occurred()) {
                // translate(QPoint)
                cppSelf->translate(*cppArg0);
            }
            break;
        }
        case 1: // translate(int dx, int dy)
        {
            int cppArg0;
            pythonToCpp[0](pyArgs[0], &cppArg0);
            int cppArg1;
            pythonToCpp[1](pyArgs[1], &cppArg1);

            if (!PyErr_Occurred()) {
                // translate(int,int)
                cppSelf->translate(cppArg0, cppArg1);
            }
            break;
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QLineFunc_translate_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLineFunc_translated(PyObject *self, PyObject *args)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QLine.translated";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[2];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0, 0};

    // invalid argument lengths


    if (!PyArg_UnpackTuple(args, "translated", 1, 2, &(pyArgs[0]), &(pyArgs[1])))
        return {};


    // Overloaded function decisor
    // 0: QLine::translated(QPoint)const->QLine
    // 1: QLine::translated(int,int)const->QLine
    if (numArgs == 2
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[1])))) {
        overloadId = 1; // translated(int,int)const
    } else if (numArgs == 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QPOINT_IDX], (pyArgs[0])))) {
        overloadId = 0; // translated(QPoint)const
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLineFunc_translated_TypeError;

    // Call function/method
    switch (overloadId) {
        case 0: // translated(const QPoint & p) const
        {
            if (!Shiboken::Object::isValid(pyArgs[0]))
                return {};
            ::QPoint cppArg0_local;
            ::QPoint *cppArg0 = &cppArg0_local;
            if (pythonToCpp[0].isValue())
                pythonToCpp[0](pyArgs[0], &cppArg0_local);
            else
                pythonToCpp[0](pyArgs[0], &cppArg0);


            if (!PyErr_Occurred()) {
                // translated(QPoint)const
                QLine cppResult = const_cast<const ::QLine *>(cppSelf)->translated(*cppArg0);
                pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], &cppResult);
            }
            break;
        }
        case 1: // translated(int dx, int dy) const
        {
            int cppArg0;
            pythonToCpp[0](pyArgs[0], &cppArg0);
            int cppArg1;
            pythonToCpp[1](pyArgs[1], &cppArg1);

            if (!PyErr_Occurred()) {
                // translated(int,int)const
                QLine cppResult = const_cast<const ::QLine *>(cppSelf)->translated(cppArg0, cppArg1);
                pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], &cppResult);
            }
            break;
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QLineFunc_translated_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLineFunc_x1(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QLine.x1";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // x1()const
            int cppResult = const_cast<const ::QLine *>(cppSelf)->x1();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLineFunc_x2(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QLine.x2";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // x2()const
            int cppResult = const_cast<const ::QLine *>(cppSelf)->x2();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLineFunc_y1(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QLine.y1";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // y1()const
            int cppResult = const_cast<const ::QLine *>(cppSelf)->y1();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLineFunc_y2(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QLine.y2";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // y2()const
            int cppResult = const_cast<const ::QLine *>(cppSelf)->y2();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLine___copy__(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto &cppSelf = *reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], &cppSelf);
    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}


static const char *Sbk_QLine_PropertyStrings[] = {
    nullptr // Sentinel
};

static PyMethodDef Sbk_QLine_methods[] = {
    {"__reduce__", reinterpret_cast<PyCFunction>(Sbk_QLineFunc___reduce__), METH_NOARGS},
    {"center", reinterpret_cast<PyCFunction>(Sbk_QLineFunc_center), METH_NOARGS},
    {"dx", reinterpret_cast<PyCFunction>(Sbk_QLineFunc_dx), METH_NOARGS},
    {"dy", reinterpret_cast<PyCFunction>(Sbk_QLineFunc_dy), METH_NOARGS},
    {"isNull", reinterpret_cast<PyCFunction>(Sbk_QLineFunc_isNull), METH_NOARGS},
    {"p1", reinterpret_cast<PyCFunction>(Sbk_QLineFunc_p1), METH_NOARGS},
    {"p2", reinterpret_cast<PyCFunction>(Sbk_QLineFunc_p2), METH_NOARGS},
    {"setLine", reinterpret_cast<PyCFunction>(Sbk_QLineFunc_setLine), METH_VARARGS},
    {"setP1", reinterpret_cast<PyCFunction>(Sbk_QLineFunc_setP1), METH_O},
    {"setP2", reinterpret_cast<PyCFunction>(Sbk_QLineFunc_setP2), METH_O},
    {"setPoints", reinterpret_cast<PyCFunction>(Sbk_QLineFunc_setPoints), METH_VARARGS},
    {"toTuple", reinterpret_cast<PyCFunction>(Sbk_QLineFunc_toTuple), METH_NOARGS},
    {"translate", reinterpret_cast<PyCFunction>(Sbk_QLineFunc_translate), METH_VARARGS},
    {"translated", reinterpret_cast<PyCFunction>(Sbk_QLineFunc_translated), METH_VARARGS},
    {"x1", reinterpret_cast<PyCFunction>(Sbk_QLineFunc_x1), METH_NOARGS},
    {"x2", reinterpret_cast<PyCFunction>(Sbk_QLineFunc_x2), METH_NOARGS},
    {"y1", reinterpret_cast<PyCFunction>(Sbk_QLineFunc_y1), METH_NOARGS},
    {"y2", reinterpret_cast<PyCFunction>(Sbk_QLineFunc_y2), METH_NOARGS},

    {"__copy__", reinterpret_cast<PyCFunction>(Sbk_QLine___copy__), METH_NOARGS},
    {nullptr, nullptr} // Sentinel
};

static int Sbk_QLine___nb_bool(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return -1;
    auto cppSelf = reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    return cppSelf->isNull() ? 0 : 1;
}

// Rich comparison
static PyObject * Sbk_QLine_richcompare(PyObject *self, PyObject *pyArg, int op)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto &cppSelf = *reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    switch (op) {
        case Py_NE:
            if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], (pyArg)))) {
                // operator!=(const QLine & d) const
                if (!Shiboken::Object::isValid(pyArg))
                    return {};
                ::QLine cppArg0_local;
                ::QLine *cppArg0 = &cppArg0_local;
                if (pythonToCpp.isValue())
                    pythonToCpp(pyArg, &cppArg0_local);
                else
                    pythonToCpp(pyArg, &cppArg0);

                bool cppResult = cppSelf !=(*cppArg0);
                pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
            } else {
                pyResult = Py_True;
                Py_INCREF(pyResult);
            }

            break;
        case Py_EQ:
            if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], (pyArg)))) {
                // operator==(const QLine & d) const
                if (!Shiboken::Object::isValid(pyArg))
                    return {};
                ::QLine cppArg0_local;
                ::QLine *cppArg0 = &cppArg0_local;
                if (pythonToCpp.isValue())
                    pythonToCpp(pyArg, &cppArg0_local);
                else
                    pythonToCpp(pyArg, &cppArg0);

                bool cppResult = cppSelf ==(*cppArg0);
                pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
            } else {
                pyResult = Py_False;
                Py_INCREF(pyResult);
            }

            break;
        default:
            // PYSIDE-74: By default, we redirect to object's tp_richcompare (which is `==`, `!=`).
            return FallbackRichCompare(self, pyArg, op);
            goto Sbk_QLine_RichComparison_TypeError;
    }

    if (pyResult && !PyErr_Occurred())
        return pyResult;
    Sbk_QLine_RichComparison_TypeError:
    PyErr_SetString(PyExc_NotImplementedError, "operator not implemented.");
    return {};

}

} // extern "C"

static Py_hash_t Sbk_QLine_HashFunc(PyObject *self) {
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    return Py_hash_t(PySide::hash(*cppSelf));
}

static int Sbk_QLine_traverse(PyObject *self, visitproc visit, void *arg)
{
    return SbkObject_TypeF()->tp_traverse(self, visit, arg);
}
static int Sbk_QLine_clear(PyObject *self)
{
    return reinterpret_cast<PyTypeObject *>(SbkObject_TypeF())->tp_clear(self);
}
// Class Definition -----------------------------------------------
extern "C" {
static PyTypeObject *_Sbk_QLine_Type = nullptr;
static PyTypeObject *Sbk_QLine_TypeF(void)
{
    return _Sbk_QLine_Type;
}

static PyType_Slot Sbk_QLine_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(&SbkDeallocWrapper)},
    {Py_tp_repr,        reinterpret_cast<void *>(Sbk_QLineFunc___repr__)},
    {Py_tp_hash,        reinterpret_cast<void *>(&Sbk_QLine_HashFunc)},
    {Py_tp_call,        nullptr},
    {Py_tp_str,         nullptr},
    {Py_tp_getattro,    nullptr},
    {Py_tp_setattro,    nullptr},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_QLine_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_QLine_clear)},
    {Py_tp_richcompare, reinterpret_cast<void *>(Sbk_QLine_richcompare)},
    {Py_tp_iter,        nullptr},
    {Py_tp_iternext,    nullptr},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_QLine_methods)},
    {Py_tp_getset,      nullptr},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_QLine_Init)},
    {Py_tp_new,         reinterpret_cast<void *>(SbkObjectTpNew)},
    // type supports number protocol
    {Py_nb_bool, reinterpret_cast<void *>(Sbk_QLine___nb_bool)},
    {0, nullptr}
};
static PyType_Spec Sbk_QLine_spec = {
    "2:PySide6.QtCore.QLine",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_QLine_slots
};

} //extern "C"


// Type conversion functions.

// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity).
static void QLine_PythonToCpp_QLine_PTR(PyObject *pyIn, void *cppOut)
{
    Shiboken::Conversions::pythonToCppPointer(Sbk_QLine_TypeF(), pyIn, cppOut);
}
static PythonToCppFunc is_QLine_PythonToCpp_QLine_PTR_Convertible(PyObject *pyIn)
{
    if (pyIn == Py_None)
        return Shiboken::Conversions::nonePythonToCppNullPtr;
    if (PyObject_TypeCheck(pyIn, reinterpret_cast<PyTypeObject *>(Sbk_QLine_TypeF())))
        return QLine_PythonToCpp_QLine_PTR;
    return {};
}

// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity).
static PyObject *QLine_PTR_CppToPython_QLine(const void *cppIn)
{
    auto pyOut = reinterpret_cast<PyObject *>(Shiboken::BindingManager::instance().retrieveWrapper(cppIn));
    if (pyOut) {
        Py_INCREF(pyOut);
        return pyOut;
    }
    bool changedTypeName = false;
    auto tCppIn = reinterpret_cast<const ::QLine *>(cppIn);
    const char *typeName = typeid(*tCppIn).name();
    auto sbkType = Shiboken::ObjectType::typeForTypeName(typeName);
    if (sbkType && Shiboken::ObjectType::hasSpecialCastFunction(sbkType)) {
        typeName = typeNameOf(tCppIn);
        changedTypeName = true;
    }
    PyObject *result = Shiboken::Object::newObject(Sbk_QLine_TypeF(), const_cast<void *>(cppIn), false, /* exactType */ changedTypeName, typeName);
    if (changedTypeName)
        delete [] typeName;
    return result;
}

// C++ to Python copy conversion.
static PyObject *QLine_COPY_CppToPython_QLine(const void *cppIn)
{
    return Shiboken::Object::newObject(Sbk_QLine_TypeF(), new ::QLine(*reinterpret_cast<const ::QLine *>(cppIn)), true, true);
}

// Python to C++ copy conversion.
static void QLine_PythonToCpp_QLine_COPY(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QLine *>(cppOut) = *reinterpret_cast< ::QLine *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QLINE_IDX], reinterpret_cast<SbkObject *>(pyIn)));
}
static PythonToCppFunc is_QLine_PythonToCpp_QLine_COPY_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, reinterpret_cast<PyTypeObject *>(Sbk_QLine_TypeF())))
        return QLine_PythonToCpp_QLine_COPY;
    return {};
}

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
static const char *QLine_SignatureStrings[] = {
    "3:PySide6.QtCore.QLine(self)",
    "2:PySide6.QtCore.QLine(self,QLine:PySide6.QtCore.QLine)",
    "1:PySide6.QtCore.QLine(self,pt1:PySide6.QtCore.QPoint,pt2:PySide6.QtCore.QPoint)",
    "0:PySide6.QtCore.QLine(self,x1:int,y1:int,x2:int,y2:int)",
    "PySide6.QtCore.QLine.__reduce__(self)->PyObject",
    "PySide6.QtCore.QLine.__repr__(self)->PyObject",
    "PySide6.QtCore.QLine.center(self)->PySide6.QtCore.QPoint",
    "PySide6.QtCore.QLine.dx(self)->int",
    "PySide6.QtCore.QLine.dy(self)->int",
    "PySide6.QtCore.QLine.isNull(self)->bool",
    "PySide6.QtCore.QLine.p1(self)->PySide6.QtCore.QPoint",
    "PySide6.QtCore.QLine.p2(self)->PySide6.QtCore.QPoint",
    "PySide6.QtCore.QLine.setLine(self,x1:int,y1:int,x2:int,y2:int)",
    "PySide6.QtCore.QLine.setP1(self,p1:PySide6.QtCore.QPoint)",
    "PySide6.QtCore.QLine.setP2(self,p2:PySide6.QtCore.QPoint)",
    "PySide6.QtCore.QLine.setPoints(self,p1:PySide6.QtCore.QPoint,p2:PySide6.QtCore.QPoint)",
    "PySide6.QtCore.QLine.toTuple(self)->PyObject",
    "1:PySide6.QtCore.QLine.translate(self,p:PySide6.QtCore.QPoint)",
    "0:PySide6.QtCore.QLine.translate(self,dx:int,dy:int)",
    "1:PySide6.QtCore.QLine.translated(self,p:PySide6.QtCore.QPoint)->PySide6.QtCore.QLine",
    "0:PySide6.QtCore.QLine.translated(self,dx:int,dy:int)->PySide6.QtCore.QLine",
    "PySide6.QtCore.QLine.x1(self)->int",
    "PySide6.QtCore.QLine.x2(self)->int",
    "PySide6.QtCore.QLine.y1(self)->int",
    "PySide6.QtCore.QLine.y2(self)->int",
    "PySide6.QtCore.QLine.__copy__()",
    nullptr}; // Sentinel

void init_QLine(PyObject *module)
{
    _Sbk_QLine_Type = Shiboken::ObjectType::introduceWrapperType(
        module,
        "QLine",
        "QLine",
        &Sbk_QLine_spec,
        &Shiboken::callCppDestructor< ::QLine >,
        0,
        0,
        0);
    auto *pyType = Sbk_QLine_TypeF(); // references _Sbk_QLine_Type
    InitSignatureStrings(pyType, QLine_SignatureStrings);
    SbkObjectType_SetPropertyStrings(reinterpret_cast<PyTypeObject *>(_Sbk_QLine_Type), Sbk_QLine_PropertyStrings);
    SbkPySide6_QtCoreTypes[SBK_QLINE_IDX]
        = Sbk_QLine_TypeF();

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(Sbk_QLine_TypeF(),
        QLine_PythonToCpp_QLine_PTR,
        is_QLine_PythonToCpp_QLine_PTR_Convertible,
        QLine_PTR_CppToPython_QLine,
        QLine_COPY_CppToPython_QLine);

    Shiboken::Conversions::registerConverterName(converter, "QLine");
    Shiboken::Conversions::registerConverterName(converter, "QLine*");
    Shiboken::Conversions::registerConverterName(converter, "QLine&");
    Shiboken::Conversions::registerConverterName(converter, typeid(::QLine).name());

    // Add Python to C++ copy (value, not pointer neither reference) conversion to type converter.
    Shiboken::Conversions::addPythonToCppValueConversion(converter,
        QLine_PythonToCpp_QLine_COPY,
        is_QLine_PythonToCpp_QLine_COPY_Convertible);



    qRegisterMetaType< ::QLine >("QLine");
}

