/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt5.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtGui.h"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextoption.sip"
#include <qtextoption.h>
#line 84 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextoption.sip"
#include <qtextoption.h>
#line 31 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextOptionTab.cpp"

#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qchar.sip"
#include <qchar.h>
#line 35 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextOptionTab.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qtextoption.sip"
#include <qtextoption.h>
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQTextOptionTab.cpp"


extern "C" {static PyObject *slot_QTextOption_Tab___ne__(PyObject *,PyObject *);}
static PyObject *slot_QTextOption_Tab___ne__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QTextOption::Tab *sipCpp = reinterpret_cast< ::QTextOption::Tab *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QTextOption_Tab));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QTextOption::Tab* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QTextOption_Tab, &a0))
        {
            bool sipRes;

            sipRes = sipCpp-> ::QTextOption::Tab::operator!=(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtGui, ne_slot, sipType_QTextOption_Tab, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QTextOption_Tab___eq__(PyObject *,PyObject *);}
static PyObject *slot_QTextOption_Tab___eq__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QTextOption::Tab *sipCpp = reinterpret_cast< ::QTextOption::Tab *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QTextOption_Tab));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QTextOption::Tab* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QTextOption_Tab, &a0))
        {
            bool sipRes;

            sipRes = sipCpp-> ::QTextOption::Tab::operator==(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtGui, eq_slot, sipType_QTextOption_Tab, sipSelf, sipArg);
}


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


extern "C" {static void *array_QTextOption_Tab(Py_ssize_t);}
static void *array_QTextOption_Tab(Py_ssize_t sipNrElem)
{
    return new  ::QTextOption::Tab[sipNrElem];
}


extern "C" {static void array_delete_QTextOption_Tab(void *);}
static void array_delete_QTextOption_Tab(void *sipCpp)
{
    delete[] reinterpret_cast< ::QTextOption::Tab *>(sipCpp);
}


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


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


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


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

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

            return sipCpp;
        }
    }

    {
         ::qreal a0;
         ::QTextOption::TabType a1;
         ::QChar a2def = QChar();
         ::QChar* a2 = &a2def;
        int a2State = 0;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            SIP_NULLPTR,
            sipName_delim,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "dE|J1", &a0, sipType_QTextOption_TabType, &a1, sipType_QChar, &a2, &a2State))
        {
            sipCpp = new  ::QTextOption::Tab(a0,a1,*a2);
            sipReleaseType(a2, sipType_QChar, a2State);

            return sipCpp;
        }
    }

    {
        const  ::QTextOption::Tab* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QTextOption_Tab[] = {
    {(void *)slot_QTextOption_Tab___ne__, ne_slot},
    {(void *)slot_QTextOption_Tab___eq__, eq_slot},
    {0, (sipPySlotType)0}
};


extern "C" {static PyObject *varget_QTextOption_Tab_delimiter(void *, PyObject *, PyObject *);}
static PyObject *varget_QTextOption_Tab_delimiter(void *sipSelf, PyObject *, PyObject *)
{
     ::QChar*sipVal;
     ::QTextOption::Tab *sipCpp = reinterpret_cast< ::QTextOption::Tab *>(sipSelf);

    sipVal = &sipCpp->delimiter;

    return sipConvertFromType(sipVal, sipType_QChar, SIP_NULLPTR);
}


extern "C" {static int varset_QTextOption_Tab_delimiter(void *, PyObject *, PyObject *);}
static int varset_QTextOption_Tab_delimiter(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QChar*sipVal;
     ::QTextOption::Tab *sipCpp = reinterpret_cast< ::QTextOption::Tab *>(sipSelf);

    int sipIsErr = 0;
    int sipValState;
    sipVal = reinterpret_cast< ::QChar *>(sipForceConvertToType(sipPy, sipType_QChar, SIP_NULLPTR, SIP_NOT_NONE, &sipValState, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->delimiter = *sipVal;

    sipReleaseType(sipVal, sipType_QChar, sipValState);

    return 0;
}


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

    sipVal = sipCpp->position;

    return PyFloat_FromDouble(sipVal);
}


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

    sipVal = PyFloat_AsDouble(sipPy);

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

    sipCpp->position = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QTextOption_Tab_type(void *, PyObject *, PyObject *);}
static PyObject *varget_QTextOption_Tab_type(void *sipSelf, PyObject *, PyObject *)
{
     ::QTextOption::TabType sipVal;
     ::QTextOption::Tab *sipCpp = reinterpret_cast< ::QTextOption::Tab *>(sipSelf);

    sipVal = sipCpp->type;

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


extern "C" {static int varset_QTextOption_Tab_type(void *, PyObject *, PyObject *);}
static int varset_QTextOption_Tab_type(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QTextOption::TabType sipVal;
     ::QTextOption::Tab *sipCpp = reinterpret_cast< ::QTextOption::Tab *>(sipSelf);

    sipVal = ( ::QTextOption::TabType)sipConvertToEnum(sipPy, sipType_QTextOption_TabType);

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

    sipCpp->type = sipVal;

    return 0;
}

sipVariableDef variables_QTextOption_Tab[] = {
    {InstanceVariable, sipName_delimiter, (PyMethodDef *)varget_QTextOption_Tab_delimiter, (PyMethodDef *)varset_QTextOption_Tab_delimiter, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_position, (PyMethodDef *)varget_QTextOption_Tab_position, (PyMethodDef *)varset_QTextOption_Tab_position, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_type, (PyMethodDef *)varget_QTextOption_Tab_type, (PyMethodDef *)varset_QTextOption_Tab_type, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_QTextOption_Tab, "\1QTextOption.Tab()\n"
"QTextOption.Tab(float, QTextOption.TabType, delim: str = '')\n"
"QTextOption.Tab(QTextOption.Tab)");


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


sipClassTypeDef sipTypeDef_QtGui_QTextOption_Tab = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QTextOption__Tab,
        SIP_NULLPTR,
        &plugin_QTextOption_Tab
    },
    {
        sipNameNr_Tab,
        {346, 255, 0},
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        3, variables_QTextOption_Tab,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QTextOption_Tab,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QTextOption_Tab,
    init_type_QTextOption_Tab,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QTextOption_Tab,
    assign_QTextOption_Tab,
    array_QTextOption_Tab,
    copy_QTextOption_Tab,
    release_QTextOption_Tab,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QTextOption_Tab,
    sizeof ( ::QTextOption::Tab),
};
