/****************************************************************************
**
** 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_qtgui_python.h"

// main header
#include "qcursor_wrapper.h"

// inner classes

// Extra includes
#include <QPixmap>
#include <Qt>
#include <QtGui/qbitmap.h>
#include <QtGui/qcursor.h>
#include <QtGui/qpixmap.h>
#include <QtGui/qscreen.h>
#include <qdatastream.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;
}


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

extern "C" {
static int
Sbk_QCursor_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< ::QCursor >()))
        return -1;

    ::QCursor *cptr{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QCursor.__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 > 4) {
        static PyObject *const too_many = Shiboken::String::createStaticString(">");
        errInfo.reset(too_many);
        Py_INCREF(errInfo.object());
        goto Sbk_QCursor_Init_TypeError;
    }

    if (!PyArg_ParseTuple(args, "|OOOO:QCursor", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3])))
        return -1;


    // Overloaded function decisor
    // 0: QCursor::QCursor()
    // 1: QCursor::QCursor(Qt::CursorShape)
    // 2: QCursor::QCursor(QBitmap,QBitmap,int,int)
    // 3: QCursor::QCursor(QCursor)
    // 4: QCursor::QCursor(QPixmap,int,int)
    if (numArgs == 0) {
        overloadId = 0; // QCursor()
    } else if (numArgs >= 2
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtGuiTypes[SBK_QBITMAP_IDX], (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtGuiTypes[SBK_QBITMAP_IDX], (pyArgs[1])))) {
        if (numArgs == 2) {
            overloadId = 2; // QCursor(QBitmap,QBitmap,int,int)
        } else if (numArgs >= 3
            && (pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[2])))) {
            if (numArgs == 3) {
                overloadId = 2; // QCursor(QBitmap,QBitmap,int,int)
            } else if (numArgs >= 4
                && (pythonToCpp[3] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[3])))) {
                overloadId = 2; // QCursor(QBitmap,QBitmap,int,int)
            }
        }
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtGuiTypes[SBK_QPIXMAP_IDX], (pyArgs[0])))) {
        if (numArgs == 1) {
            overloadId = 4; // QCursor(QPixmap,int,int)
        } else if (numArgs >= 2
            && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[1])))) {
            if (numArgs == 2) {
                overloadId = 4; // QCursor(QPixmap,int,int)
            } else if (numArgs >= 3
                && (pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[2])))) {
                overloadId = 4; // QCursor(QPixmap,int,int)
            }
        }
    } else if (numArgs == 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtCoreTypes[SBK_QT_CURSORSHAPE_IDX]))->converter, (pyArgs[0])))) {
        overloadId = 1; // QCursor(Qt::CursorShape)
    } else if (numArgs == 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtGuiTypes[SBK_QCURSOR_IDX], (pyArgs[0])))) {
        overloadId = 3; // QCursor(QCursor)
    }

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

    // Call function/method
    switch (overloadId) {
        case 0: // QCursor()
        {
            if (kwds && PyDict_Size(kwds) > 0) {
                errInfo.reset(kwds);
                Py_INCREF(errInfo.object());
                goto Sbk_QCursor_Init_TypeError;
            }

            if (!PyErr_Occurred()) {
                // QCursor()
                cptr = new ::QCursor();
            }
            break;
        }
        case 1: // QCursor(Qt::CursorShape shape)
        {
            if (kwds && PyDict_Size(kwds) > 0) {
                errInfo.reset(kwds);
                Py_INCREF(errInfo.object());
                goto Sbk_QCursor_Init_TypeError;
            }
            ::Qt::CursorShape cppArg0{Qt::ArrowCursor};
            pythonToCpp[0](pyArgs[0], &cppArg0);

            if (!PyErr_Occurred()) {
                // QCursor(Qt::CursorShape)
                cptr = new ::QCursor(cppArg0);
            }
            break;
        }
        case 2: // QCursor(const QBitmap & bitmap, const QBitmap & mask, int hotX, int hotY)
        {
            if (kwds && PyDict_Size(kwds) > 0) {
                PyObject *value{};
                Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
                static PyObject *const key_hotX = Shiboken::String::createStaticString("hotX");
                if (PyDict_Contains(kwds, key_hotX)) {
                    value = PyDict_GetItem(kwds, key_hotX);
                    if (value && pyArgs[2]) {
                        errInfo.reset(key_hotX);
                        Py_INCREF(errInfo.object());
                        goto Sbk_QCursor_Init_TypeError;
                    }
                    if (value) {
                        pyArgs[2] = value;
                        if (!(pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[2]))))
                            goto Sbk_QCursor_Init_TypeError;
                    }
                    PyDict_DelItem(kwds_dup, key_hotX);
                }
                static PyObject *const key_hotY = Shiboken::String::createStaticString("hotY");
                if (PyDict_Contains(kwds, key_hotY)) {
                    value = PyDict_GetItem(kwds, key_hotY);
                    if (value && pyArgs[3]) {
                        errInfo.reset(key_hotY);
                        Py_INCREF(errInfo.object());
                        goto Sbk_QCursor_Init_TypeError;
                    }
                    if (value) {
                        pyArgs[3] = value;
                        if (!(pythonToCpp[3] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[3]))))
                            goto Sbk_QCursor_Init_TypeError;
                    }
                    PyDict_DelItem(kwds_dup, key_hotY);
                }
                if (PyDict_Size(kwds_dup) > 0) {
                    errInfo.reset(kwds_dup.release());
                    goto Sbk_QCursor_Init_TypeError;
                }
            }
            if (!Shiboken::Object::isValid(pyArgs[0]))
                return -1;
            ::QBitmap cppArg0_local;
            ::QBitmap *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;
            ::QBitmap cppArg1_local;
            ::QBitmap *cppArg1 = &cppArg1_local;
            if (pythonToCpp[1].isValue())
                pythonToCpp[1](pyArgs[1], &cppArg1_local);
            else
                pythonToCpp[1](pyArgs[1], &cppArg1);

            int cppArg2 = -1;
            if (pythonToCpp[2])
                pythonToCpp[2](pyArgs[2], &cppArg2);
            int cppArg3 = -1;
            if (pythonToCpp[3])
                pythonToCpp[3](pyArgs[3], &cppArg3);

            if (!PyErr_Occurred()) {
                // QCursor(QBitmap,QBitmap,int,int)
                cptr = new ::QCursor(*cppArg0, *cppArg1, cppArg2, cppArg3);
            }
            break;
        }
        case 3: // QCursor(const QCursor & cursor)
        {
            if (kwds && PyDict_Size(kwds) > 0) {
                errInfo.reset(kwds);
                Py_INCREF(errInfo.object());
                goto Sbk_QCursor_Init_TypeError;
            }
            if (!Shiboken::Object::isValid(pyArgs[0]))
                return -1;
            ::QCursor cppArg0_local;
            ::QCursor *cppArg0 = &cppArg0_local;
            if (pythonToCpp[0].isValue())
                pythonToCpp[0](pyArgs[0], &cppArg0_local);
            else
                pythonToCpp[0](pyArgs[0], &cppArg0);


            if (!PyErr_Occurred()) {
                // QCursor(QCursor)
                cptr = new ::QCursor(*cppArg0);
            }
            break;
        }
        case 4: // QCursor(const QPixmap & pixmap, int hotX, int hotY)
        {
            if (kwds && PyDict_Size(kwds) > 0) {
                PyObject *value{};
                Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
                static PyObject *const key_hotX = Shiboken::String::createStaticString("hotX");
                if (PyDict_Contains(kwds, key_hotX)) {
                    value = PyDict_GetItem(kwds, key_hotX);
                    if (value && pyArgs[1]) {
                        errInfo.reset(key_hotX);
                        Py_INCREF(errInfo.object());
                        goto Sbk_QCursor_Init_TypeError;
                    }
                    if (value) {
                        pyArgs[1] = value;
                        if (!(pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[1]))))
                            goto Sbk_QCursor_Init_TypeError;
                    }
                    PyDict_DelItem(kwds_dup, key_hotX);
                }
                static PyObject *const key_hotY = Shiboken::String::createStaticString("hotY");
                if (PyDict_Contains(kwds, key_hotY)) {
                    value = PyDict_GetItem(kwds, key_hotY);
                    if (value && pyArgs[2]) {
                        errInfo.reset(key_hotY);
                        Py_INCREF(errInfo.object());
                        goto Sbk_QCursor_Init_TypeError;
                    }
                    if (value) {
                        pyArgs[2] = value;
                        if (!(pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[2]))))
                            goto Sbk_QCursor_Init_TypeError;
                    }
                    PyDict_DelItem(kwds_dup, key_hotY);
                }
                if (PyDict_Size(kwds_dup) > 0) {
                    errInfo.reset(kwds_dup.release());
                    goto Sbk_QCursor_Init_TypeError;
                }
            }
            if (!Shiboken::Object::isValid(pyArgs[0]))
                return -1;
            ::QPixmap cppArg0_local;
            ::QPixmap *cppArg0 = &cppArg0_local;
            if (pythonToCpp[0].isValue())
                pythonToCpp[0](pyArgs[0], &cppArg0_local);
            else
                pythonToCpp[0](pyArgs[0], &cppArg0);

            int cppArg1 = -1;
            if (pythonToCpp[1])
                pythonToCpp[1](pyArgs[1], &cppArg1);
            int cppArg2 = -1;
            if (pythonToCpp[2])
                pythonToCpp[2](pyArgs[2], &cppArg2);

            if (!PyErr_Occurred()) {
                // QCursor(QPixmap,int,int)
                cptr = new ::QCursor(*cppArg0, cppArg1, cppArg2);
            }
            break;
        }
    }

    if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::QCursor >(), cptr)) {
        delete cptr;
        return -1;
    }
    if (!cptr) goto Sbk_QCursor_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_QCursor_Init_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return -1;
}

static PyObject *Sbk_QCursorFunc_bitmap(PyObject *self, PyObject *args)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QCursor *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QCURSOR_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QCursor.bitmap";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[1];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0};

    // invalid argument lengths


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


    // Overloaded function decisor
    // 0: QCursor::bitmap()const->QBitmap
    // 1: QCursor::bitmap(Qt::ReturnByValueConstant)const->QBitmap
    if (numArgs == 0) {
        overloadId = 0; // bitmap()const
    } else if (numArgs == 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtCoreTypes[SBK_QT_RETURNBYVALUECONSTANT_IDX]))->converter, (pyArgs[0])))) {
        overloadId = 1; // bitmap(Qt::ReturnByValueConstant)const
    }

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

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

            if (!PyErr_Occurred()) {
                // bitmap()const
                QBitmap cppResult = const_cast<const ::QCursor *>(cppSelf)->bitmap();
                pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtGuiTypes[SBK_QBITMAP_IDX], &cppResult);
            }
            break;
        }
        case 1: // bitmap(Qt::ReturnByValueConstant arg__1) const
        {
            ::Qt::ReturnByValueConstant cppArg0{Qt::ReturnByValue};
            pythonToCpp[0](pyArgs[0], &cppArg0);

            if (!PyErr_Occurred()) {
                // bitmap(Qt::ReturnByValueConstant)const
                QBitmap cppResult = const_cast<const ::QCursor *>(cppSelf)->bitmap(cppArg0);
                pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtGuiTypes[SBK_QBITMAP_IDX], &cppResult);
            }
            break;
        }
    }

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

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

static PyObject *Sbk_QCursorFunc_hotSpot(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QCursor *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QCURSOR_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QCursor.hotSpot";
    SBK_UNUSED(fullName)

    // Call function/method
    {

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

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

static PyObject *Sbk_QCursorFunc_mask(PyObject *self, PyObject *args)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QCursor *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QCURSOR_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QCursor.mask";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[1];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0};

    // invalid argument lengths


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


    // Overloaded function decisor
    // 0: QCursor::mask()const->QBitmap
    // 1: QCursor::mask(Qt::ReturnByValueConstant)const->QBitmap
    if (numArgs == 0) {
        overloadId = 0; // mask()const
    } else if (numArgs == 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtCoreTypes[SBK_QT_RETURNBYVALUECONSTANT_IDX]))->converter, (pyArgs[0])))) {
        overloadId = 1; // mask(Qt::ReturnByValueConstant)const
    }

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

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

            if (!PyErr_Occurred()) {
                // mask()const
                QBitmap cppResult = const_cast<const ::QCursor *>(cppSelf)->mask();
                pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtGuiTypes[SBK_QBITMAP_IDX], &cppResult);
            }
            break;
        }
        case 1: // mask(Qt::ReturnByValueConstant arg__1) const
        {
            ::Qt::ReturnByValueConstant cppArg0{Qt::ReturnByValue};
            pythonToCpp[0](pyArgs[0], &cppArg0);

            if (!PyErr_Occurred()) {
                // mask(Qt::ReturnByValueConstant)const
                QBitmap cppResult = const_cast<const ::QCursor *>(cppSelf)->mask(cppArg0);
                pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtGuiTypes[SBK_QBITMAP_IDX], &cppResult);
            }
            break;
        }
    }

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

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

static PyObject *Sbk_QCursorFunc_pixmap(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QCursor *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QCURSOR_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QCursor.pixmap";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // pixmap()const
            QPixmap cppResult = const_cast<const ::QCursor *>(cppSelf)->pixmap();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtGuiTypes[SBK_QPIXMAP_IDX], &cppResult);
        }
    }

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

static PyObject *Sbk_QCursorFunc_pos(PyObject *self, PyObject *args)
{
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QCursor.pos";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[1];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0};

    // invalid argument lengths


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


    // Overloaded function decisor
    // 0: static QCursor::pos()->QPoint
    // 1: static QCursor::pos(const QScreen*)->QPoint
    if (numArgs == 0) {
        overloadId = 0; // pos()
    } else if (numArgs == 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtGuiTypes[SBK_QSCREEN_IDX], (pyArgs[0])))) {
        overloadId = 1; // pos(const QScreen*)
    }

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

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

            if (!PyErr_Occurred()) {
                // pos()
                QPoint cppResult = ::QCursor::pos();
                pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QPOINT_IDX], &cppResult);
            }
            break;
        }
        case 1: // pos(const QScreen * screen)
        {
            if (!Shiboken::Object::isValid(pyArgs[0]))
                return {};
            ::QScreen *cppArg0;
            pythonToCpp[0](pyArgs[0], &cppArg0);

            if (!PyErr_Occurred()) {
                // pos(const QScreen*)
                QPoint cppResult = ::QCursor::pos(cppArg0);
                pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QPOINT_IDX], &cppResult);
            }
            break;
        }
    }

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

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

static PyObject *Sbk_QCursorFunc_setPos(PyObject *self, PyObject *args)
{
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QCursor.setPos";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[3];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0, 0, 0};

    // invalid argument lengths


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


    // Overloaded function decisor
    // 0: static QCursor::setPos(QScreen*,QPoint)
    // 1: static QCursor::setPos(QScreen*,int,int)
    // 2: static QCursor::setPos(QPoint)
    // 3: static QCursor::setPos(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 = 3; // setPos(int,int)
    } else if (numArgs == 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QPOINT_IDX], (pyArgs[0])))) {
        overloadId = 2; // setPos(QPoint)
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtGuiTypes[SBK_QSCREEN_IDX], (pyArgs[0])))) {
        if (numArgs == 3
            && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[1])))
            && (pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[2])))) {
            overloadId = 1; // setPos(QScreen*,int,int)
        } else if (numArgs == 2
            && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QPOINT_IDX], (pyArgs[1])))) {
            overloadId = 0; // setPos(QScreen*,QPoint)
        }
    }

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

    // Call function/method
    switch (overloadId) {
        case 0: // setPos(QScreen * screen, const QPoint & p)
        {
            if (!Shiboken::Object::isValid(pyArgs[0]))
                return {};
            ::QScreen *cppArg0;
            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()) {
                // setPos(QScreen*,QPoint)
                ::QCursor::setPos(cppArg0, *cppArg1);
            }
            break;
        }
        case 1: // setPos(QScreen * screen, int x, int y)
        {
            if (!Shiboken::Object::isValid(pyArgs[0]))
                return {};
            ::QScreen *cppArg0;
            pythonToCpp[0](pyArgs[0], &cppArg0);
            int cppArg1;
            pythonToCpp[1](pyArgs[1], &cppArg1);
            int cppArg2;
            pythonToCpp[2](pyArgs[2], &cppArg2);

            if (!PyErr_Occurred()) {
                // setPos(QScreen*,int,int)
                ::QCursor::setPos(cppArg0, cppArg1, cppArg2);
            }
            break;
        }
        case 2: // setPos(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()) {
                // setPos(QPoint)
                ::QCursor::setPos(*cppArg0);
            }
            break;
        }
        case 3: // setPos(int x, int y)
        {
            int cppArg0;
            pythonToCpp[0](pyArgs[0], &cppArg0);
            int cppArg1;
            pythonToCpp[1](pyArgs[1], &cppArg1);

            if (!PyErr_Occurred()) {
                // setPos(int,int)
                ::QCursor::setPos(cppArg0, cppArg1);
            }
            break;
        }
    }

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

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

static PyObject *Sbk_QCursorFunc_setShape(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QCursor *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QCURSOR_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QCursor.setShape";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QCursor::setShape(Qt::CursorShape)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtCoreTypes[SBK_QT_CURSORSHAPE_IDX]))->converter, (pyArg)))) {
        overloadId = 0; // setShape(Qt::CursorShape)
    }

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

    // Call function/method
    {
        ::Qt::CursorShape cppArg0{Qt::ArrowCursor};
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setShape(Qt::CursorShape)
            cppSelf->setShape(cppArg0);
        }
    }

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

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

static PyObject *Sbk_QCursorFunc_shape(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QCursor *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QCURSOR_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QCursor.shape";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // shape()const
            Qt::CursorShape cppResult = const_cast<const ::QCursor *>(cppSelf)->shape();
            pyResult = Shiboken::Conversions::copyToPython(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtCoreTypes[SBK_QT_CURSORSHAPE_IDX]))->converter, &cppResult);
        }
    }

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

static PyObject *Sbk_QCursorFunc_swap(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QCursor *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QCURSOR_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QCursor.swap";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QCursor::swap(QCursor&)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtGuiTypes[SBK_QCURSOR_IDX], (pyArg)))) {
        overloadId = 0; // swap(QCursor&)
    }

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

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


        if (!PyErr_Occurred()) {
            // swap(QCursor&)
            cppSelf->swap(*cppArg0);
        }
    }

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

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

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


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

static PyMethodDef Sbk_QCursor_methods[] = {
    {"bitmap", reinterpret_cast<PyCFunction>(Sbk_QCursorFunc_bitmap), METH_VARARGS},
    {"hotSpot", reinterpret_cast<PyCFunction>(Sbk_QCursorFunc_hotSpot), METH_NOARGS},
    {"mask", reinterpret_cast<PyCFunction>(Sbk_QCursorFunc_mask), METH_VARARGS},
    {"pixmap", reinterpret_cast<PyCFunction>(Sbk_QCursorFunc_pixmap), METH_NOARGS},
    {"pos", reinterpret_cast<PyCFunction>(Sbk_QCursorFunc_pos), METH_VARARGS|METH_STATIC},
    {"setPos", reinterpret_cast<PyCFunction>(Sbk_QCursorFunc_setPos), METH_VARARGS|METH_STATIC},
    {"setShape", reinterpret_cast<PyCFunction>(Sbk_QCursorFunc_setShape), METH_O},
    {"shape", reinterpret_cast<PyCFunction>(Sbk_QCursorFunc_shape), METH_NOARGS},
    {"swap", reinterpret_cast<PyCFunction>(Sbk_QCursorFunc_swap), METH_O},

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

static PyObject *Sbk_QCursorFunc___lshift__(PyObject *self, PyObject *pyArg)
{
    bool isReverse = SbkObject_TypeCheck(SbkPySide6_QtGuiTypes[SBK_QCURSOR_IDX], pyArg)
                    && !SbkObject_TypeCheck(SbkPySide6_QtGuiTypes[SBK_QCURSOR_IDX], self);
    if (isReverse)
        std::swap(self, pyArg);
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QCursor *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QCURSOR_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QCursor.__lshift__";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    Shiboken::AutoDecRef attrName(Py_BuildValue("s", "__rlshift__"));
    if (!isReverse
        && Shiboken::Object::checkType(pyArg)
        && !PyObject_TypeCheck(pyArg, self->ob_type)
        && PyObject_HasAttr(pyArg, attrName)) {
        PyObject *revOpMethod = PyObject_GetAttr(pyArg, attrName);
        if (revOpMethod && PyCallable_Check(revOpMethod)) {
            pyResult = PyObject_CallFunction(revOpMethod, "O", self);
            if (PyErr_Occurred() && (PyErr_ExceptionMatches(PyExc_NotImplementedError) || PyErr_ExceptionMatches(PyExc_AttributeError))) {
                PyErr_Clear();
                Py_XDECREF(pyResult);
                pyResult = nullptr;
            }
        }
        Py_XDECREF(revOpMethod);

    }

    // Do not enter here if other object has implemented a reverse operator.
    if (!pyResult) {
        // Overloaded function decisor
        // 0: QCursor::operator<<(QDataStream&)->QDataStream&
        if (isReverse
            && (pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QDATASTREAM_IDX], (pyArg)))) {
            overloadId = 0; // operator<<(QDataStream&,QCursor)
        }

        if (isReverse && overloadId == -1) {
            PyErr_SetString(PyExc_NotImplementedError, "reverse operator not implemented.");
            return {};
        }

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

        // Call function/method
        {
            if (!Shiboken::Object::isValid(pyArg))
                return {};
            ::QDataStream *cppArg0;
            pythonToCpp(pyArg, &cppArg0);

            if (!PyErr_Occurred()) {
                // operator<<(QDataStream&,QCursor) [reverse operator]
                QDataStream & cppResult = (*cppArg0) << (*cppSelf);
                pyResult = Shiboken::Conversions::referenceToPython(SbkPySide6_QtCoreTypes[SBK_QDATASTREAM_IDX], &cppResult);
            }
        }

    } // End of "if (!pyResult)"

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

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

static PyObject *Sbk_QCursorFunc___rshift__(PyObject *self, PyObject *pyArg)
{
    bool isReverse = SbkObject_TypeCheck(SbkPySide6_QtGuiTypes[SBK_QCURSOR_IDX], pyArg)
                    && !SbkObject_TypeCheck(SbkPySide6_QtGuiTypes[SBK_QCURSOR_IDX], self);
    if (isReverse)
        std::swap(self, pyArg);
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QCursor *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QCURSOR_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtGui.QCursor.__rshift__";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    Shiboken::AutoDecRef attrName(Py_BuildValue("s", "__rrshift__"));
    if (!isReverse
        && Shiboken::Object::checkType(pyArg)
        && !PyObject_TypeCheck(pyArg, self->ob_type)
        && PyObject_HasAttr(pyArg, attrName)) {
        PyObject *revOpMethod = PyObject_GetAttr(pyArg, attrName);
        if (revOpMethod && PyCallable_Check(revOpMethod)) {
            pyResult = PyObject_CallFunction(revOpMethod, "O", self);
            if (PyErr_Occurred() && (PyErr_ExceptionMatches(PyExc_NotImplementedError) || PyErr_ExceptionMatches(PyExc_AttributeError))) {
                PyErr_Clear();
                Py_XDECREF(pyResult);
                pyResult = nullptr;
            }
        }
        Py_XDECREF(revOpMethod);

    }

    // Do not enter here if other object has implemented a reverse operator.
    if (!pyResult) {
        // Overloaded function decisor
        // 0: QCursor::operator>>(QDataStream&)->QDataStream&
        if (isReverse
            && (pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QDATASTREAM_IDX], (pyArg)))) {
            overloadId = 0; // operator>>(QDataStream&,QCursor&)
        }

        if (isReverse && overloadId == -1) {
            PyErr_SetString(PyExc_NotImplementedError, "reverse operator not implemented.");
            return {};
        }

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

        // Call function/method
        {
            if (!Shiboken::Object::isValid(pyArg))
                return {};
            ::QDataStream *cppArg0;
            pythonToCpp(pyArg, &cppArg0);

            if (!PyErr_Occurred()) {
                // operator>>(QDataStream&,QCursor&) [reverse operator]
                QDataStream & cppResult = (*cppArg0) >> (*cppSelf);
                pyResult = Shiboken::Conversions::referenceToPython(SbkPySide6_QtCoreTypes[SBK_QDATASTREAM_IDX], &cppResult);
            }
        }

    } // End of "if (!pyResult)"

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

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

// Rich comparison
static PyObject * Sbk_QCursor_richcompare(PyObject *self, PyObject *pyArg, int op)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto &cppSelf = *reinterpret_cast< ::QCursor *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QCURSOR_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_QtGuiTypes[SBK_QCURSOR_IDX], (pyArg)))) {
                // operator!=(const QCursor & rhs)
                if (!Shiboken::Object::isValid(pyArg))
                    return {};
                ::QCursor cppArg0_local;
                ::QCursor *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;
        default:
            // PYSIDE-74: By default, we redirect to object's tp_richcompare (which is `==`, `!=`).
            return FallbackRichCompare(self, pyArg, op);
            goto Sbk_QCursor_RichComparison_TypeError;
    }

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

}

} // extern "C"

static int Sbk_QCursor_traverse(PyObject *self, visitproc visit, void *arg)
{
    return SbkObject_TypeF()->tp_traverse(self, visit, arg);
}
static int Sbk_QCursor_clear(PyObject *self)
{
    return reinterpret_cast<PyTypeObject *>(SbkObject_TypeF())->tp_clear(self);
}
extern "C"
{
static PyObject *Sbk_QCursor__repr__(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QCursor *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QCURSOR_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    QBuffer buffer;
    buffer.open(QBuffer::ReadWrite);
    QDebug dbg(&buffer);
    dbg << *cppSelf;
    buffer.close();
    QByteArray str = buffer.data();
    int idx = str.indexOf('(');
    if (idx >= 0)
        str.replace(0, idx, Py_TYPE(self)->tp_name);
    str = str.trimmed();
    PyObject *mod = PyDict_GetItem(Py_TYPE(self)->tp_dict, Shiboken::PyMagicName::module());
    if (mod && !strchr(str, '.'))
        return Shiboken::String::fromFormat("<%s.%s at %p>", Shiboken::String::toCString(mod), str.constData(), self);
    else
        return Shiboken::String::fromFormat("<%s at %p>", str.constData(), self);
}
} // extern C

// Class Definition -----------------------------------------------
extern "C" {
static PyTypeObject *_Sbk_QCursor_Type = nullptr;
static PyTypeObject *Sbk_QCursor_TypeF(void)
{
    return _Sbk_QCursor_Type;
}

static PyType_Slot Sbk_QCursor_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(&SbkDeallocWrapper)},
    {Py_tp_repr,        reinterpret_cast<void *>(Sbk_QCursor__repr__)},
    {Py_tp_hash,        nullptr},
    {Py_tp_call,        nullptr},
    {Py_tp_str,         nullptr},
    {Py_tp_getattro,    nullptr},
    {Py_tp_setattro,    nullptr},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_QCursor_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_QCursor_clear)},
    {Py_tp_richcompare, reinterpret_cast<void *>(Sbk_QCursor_richcompare)},
    {Py_tp_iter,        nullptr},
    {Py_tp_iternext,    nullptr},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_QCursor_methods)},
    {Py_tp_getset,      nullptr},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_QCursor_Init)},
    {Py_tp_new,         reinterpret_cast<void *>(SbkObjectTpNew)},
    // type supports number protocol
    {Py_nb_lshift, reinterpret_cast<void *>(Sbk_QCursorFunc___lshift__)},
    {Py_nb_rshift, reinterpret_cast<void *>(Sbk_QCursorFunc___rshift__)},
    {0, nullptr}
};
static PyType_Spec Sbk_QCursor_spec = {
    "2:PySide6.QtGui.QCursor",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_QCursor_slots
};

} //extern "C"


// Type conversion functions.

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

// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity).
static PyObject *QCursor_PTR_CppToPython_QCursor(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 ::QCursor *>(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_QCursor_TypeF(), const_cast<void *>(cppIn), false, /* exactType */ changedTypeName, typeName);
    if (changedTypeName)
        delete [] typeName;
    return result;
}

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

// Python to C++ copy conversion.
static void QCursor_PythonToCpp_QCursor_COPY(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QCursor *>(cppOut) = *reinterpret_cast< ::QCursor *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QCURSOR_IDX], reinterpret_cast<SbkObject *>(pyIn)));
}
static PythonToCppFunc is_QCursor_PythonToCpp_QCursor_COPY_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, reinterpret_cast<PyTypeObject *>(Sbk_QCursor_TypeF())))
        return QCursor_PythonToCpp_QCursor_COPY;
    return {};
}

// Implicit conversions.
static void PySide6_QtCore_Qt_CursorShape_PythonToCpp_QCursor(PyObject *pyIn, void *cppOut)
{
    ::Qt::CursorShape cppIn{Qt::ArrowCursor};
    Shiboken::Conversions::pythonToCppCopy(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtCoreTypes[SBK_QT_CURSORSHAPE_IDX]))->converter, pyIn, &cppIn);
    *reinterpret_cast<::QCursor *>(cppOut) = ::QCursor(cppIn);
}
static PythonToCppFunc is_PySide6_QtCore_Qt_CursorShape_PythonToCpp_QCursor_Convertible(PyObject *pyIn)
{
    if (SbkObject_TypeCheck(SbkPySide6_QtCoreTypes[SBK_QT_CURSORSHAPE_IDX], pyIn))
        return PySide6_QtCore_Qt_CursorShape_PythonToCpp_QCursor;
    return {};
}

static void constQPixmapREF_PythonToCpp_QCursor(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QCursor *>(cppOut) = ::QCursor( *reinterpret_cast< ::QPixmap *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtGuiTypes[SBK_QPIXMAP_IDX], reinterpret_cast<SbkObject *>(pyIn))));
}
static PythonToCppFunc is_constQPixmapREF_PythonToCpp_QCursor_Convertible(PyObject *pyIn)
{
    if (SbkObject_TypeCheck(SbkPySide6_QtGuiTypes[SBK_QPIXMAP_IDX], pyIn))
        return constQPixmapREF_PythonToCpp_QCursor;
    return {};
}

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
static const char *QCursor_SignatureStrings[] = {
    "4:PySide6.QtGui.QCursor(self)",
    "3:PySide6.QtGui.QCursor(self,shape:PySide6.QtCore.Qt.CursorShape)",
    "2:PySide6.QtGui.QCursor(self,bitmap:typing.Union[PySide6.QtGui.QBitmap, QString],mask:typing.Union[PySide6.QtGui.QBitmap, QString],hotX:int=-1,hotY:int=-1)",
    "1:PySide6.QtGui.QCursor(self,cursor:typing.Union[PySide6.QtGui.QCursor, PySide6.QtCore.Qt.CursorShape, PySide6.QtGui.QPixmap])",
    "0:PySide6.QtGui.QCursor(self,pixmap:typing.Union[PySide6.QtGui.QPixmap, PySide6.QtGui.QImage, QString],hotX:int=-1,hotY:int=-1)",
    "1:PySide6.QtGui.QCursor.bitmap(self)->PySide6.QtGui.QBitmap",
    "0:PySide6.QtGui.QCursor.bitmap(self,arg__1:PySide6.QtCore.Qt.ReturnByValueConstant)->PySide6.QtGui.QBitmap",
    "PySide6.QtGui.QCursor.hotSpot(self)->PySide6.QtCore.QPoint",
    "1:PySide6.QtGui.QCursor.mask(self)->PySide6.QtGui.QBitmap",
    "0:PySide6.QtGui.QCursor.mask(self,arg__1:PySide6.QtCore.Qt.ReturnByValueConstant)->PySide6.QtGui.QBitmap",
    "PySide6.QtGui.QCursor.pixmap(self)->PySide6.QtGui.QPixmap",
    "1:PySide6.QtGui.QCursor.pos()->PySide6.QtCore.QPoint",
    "0:PySide6.QtGui.QCursor.pos(screen:PySide6.QtGui.QScreen)->PySide6.QtCore.QPoint",
    "3:PySide6.QtGui.QCursor.setPos(screen:PySide6.QtGui.QScreen,p:PySide6.QtCore.QPoint)",
    "2:PySide6.QtGui.QCursor.setPos(screen:PySide6.QtGui.QScreen,x:int,y:int)",
    "1:PySide6.QtGui.QCursor.setPos(p:PySide6.QtCore.QPoint)",
    "0:PySide6.QtGui.QCursor.setPos(x:int,y:int)",
    "PySide6.QtGui.QCursor.setShape(self,newShape:PySide6.QtCore.Qt.CursorShape)",
    "PySide6.QtGui.QCursor.shape(self)->PySide6.QtCore.Qt.CursorShape",
    "PySide6.QtGui.QCursor.swap(self,other:typing.Union[PySide6.QtGui.QCursor, PySide6.QtCore.Qt.CursorShape, PySide6.QtGui.QPixmap])",
    "PySide6.QtGui.QCursor.__copy__()",
    "PySide6.QtGui.QCursor.__lshift__(self,outS:PySide6.QtCore.QDataStream)->PySide6.QtCore.QDataStream",
    "PySide6.QtGui.QCursor.__rshift__(self,inS:PySide6.QtCore.QDataStream)->PySide6.QtCore.QDataStream",
    nullptr}; // Sentinel

void init_QCursor(PyObject *module)
{
    _Sbk_QCursor_Type = Shiboken::ObjectType::introduceWrapperType(
        module,
        "QCursor",
        "QCursor",
        &Sbk_QCursor_spec,
        &Shiboken::callCppDestructor< ::QCursor >,
        0,
        0,
        0);
    auto *pyType = Sbk_QCursor_TypeF(); // references _Sbk_QCursor_Type
    InitSignatureStrings(pyType, QCursor_SignatureStrings);
    SbkObjectType_SetPropertyStrings(reinterpret_cast<PyTypeObject *>(_Sbk_QCursor_Type), Sbk_QCursor_PropertyStrings);
    SbkPySide6_QtGuiTypes[SBK_QCURSOR_IDX]
        = Sbk_QCursor_TypeF();

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(Sbk_QCursor_TypeF(),
        QCursor_PythonToCpp_QCursor_PTR,
        is_QCursor_PythonToCpp_QCursor_PTR_Convertible,
        QCursor_PTR_CppToPython_QCursor,
        QCursor_COPY_CppToPython_QCursor);

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

    // Add Python to C++ copy (value, not pointer neither reference) conversion to type converter.
    Shiboken::Conversions::addPythonToCppValueConversion(converter,
        QCursor_PythonToCpp_QCursor_COPY,
        is_QCursor_PythonToCpp_QCursor_COPY_Convertible);
    // Add implicit conversions to type converter.
    Shiboken::Conversions::addPythonToCppValueConversion(converter,
        PySide6_QtCore_Qt_CursorShape_PythonToCpp_QCursor,
        is_PySide6_QtCore_Qt_CursorShape_PythonToCpp_QCursor_Convertible);
    Shiboken::Conversions::addPythonToCppValueConversion(converter,
        constQPixmapREF_PythonToCpp_QCursor,
        is_constQPixmapREF_PythonToCpp_QCursor_Convertible);

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