/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.14.0
 *
 * Copyright (c) 2024 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 "sipAPIQtPositioning.h"

#line 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtPositioning/qgeopositioninfo.sip"
#include <qgeopositioninfo.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.11/build/QtPositioning/sipQtPositioningQGeoPositionInfo.cpp"

#line 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtPositioning/qgeocoordinate.sip"
#include <qgeocoordinate.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.11/build/QtPositioning/sipQtPositioningQGeoPositionInfo.cpp"
#line 360 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qdatetime.sip"
#include <qdatetime.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.11/build/QtPositioning/sipQtPositioningQGeoPositionInfo.cpp"


PyDoc_STRVAR(doc_QGeoPositionInfo_isValid, "isValid(self) -> bool");

extern "C" {static PyObject *meth_QGeoPositionInfo_isValid(PyObject *, PyObject *);}
static PyObject *meth_QGeoPositionInfo_isValid(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QGeoPositionInfo *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QGeoPositionInfo, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isValid();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoPositionInfo, sipName_isValid, doc_QGeoPositionInfo_isValid);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoPositionInfo_setTimestamp, "setTimestamp(self, timestamp: Union[QDateTime, datetime.datetime])");

extern "C" {static PyObject *meth_QGeoPositionInfo_setTimestamp(PyObject *, PyObject *);}
static PyObject *meth_QGeoPositionInfo_setTimestamp(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QDateTime* a0;
        int a0State = 0;
        ::QGeoPositionInfo *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QGeoPositionInfo, &sipCpp, sipType_QDateTime, &a0, &a0State))
        {
            sipCpp->setTimestamp(*a0);
            sipReleaseType(const_cast< ::QDateTime *>(a0), sipType_QDateTime, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoPositionInfo, sipName_setTimestamp, doc_QGeoPositionInfo_setTimestamp);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoPositionInfo_timestamp, "timestamp(self) -> QDateTime");

extern "C" {static PyObject *meth_QGeoPositionInfo_timestamp(PyObject *, PyObject *);}
static PyObject *meth_QGeoPositionInfo_timestamp(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QGeoPositionInfo *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QGeoPositionInfo, &sipCpp))
        {
            ::QDateTime*sipRes;

            sipRes = new ::QDateTime(sipCpp->timestamp());

            return sipConvertFromNewType(sipRes, sipType_QDateTime, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoPositionInfo, sipName_timestamp, doc_QGeoPositionInfo_timestamp);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoPositionInfo_setCoordinate, "setCoordinate(self, coordinate: QGeoCoordinate)");

extern "C" {static PyObject *meth_QGeoPositionInfo_setCoordinate(PyObject *, PyObject *);}
static PyObject *meth_QGeoPositionInfo_setCoordinate(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QGeoCoordinate* a0;
        ::QGeoPositionInfo *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QGeoPositionInfo, &sipCpp, sipType_QGeoCoordinate, &a0))
        {
            sipCpp->setCoordinate(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoPositionInfo, sipName_setCoordinate, doc_QGeoPositionInfo_setCoordinate);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoPositionInfo_coordinate, "coordinate(self) -> QGeoCoordinate");

extern "C" {static PyObject *meth_QGeoPositionInfo_coordinate(PyObject *, PyObject *);}
static PyObject *meth_QGeoPositionInfo_coordinate(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QGeoPositionInfo *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QGeoPositionInfo, &sipCpp))
        {
            ::QGeoCoordinate*sipRes;

            sipRes = new ::QGeoCoordinate(sipCpp->coordinate());

            return sipConvertFromNewType(sipRes, sipType_QGeoCoordinate, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoPositionInfo, sipName_coordinate, doc_QGeoPositionInfo_coordinate);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoPositionInfo_setAttribute, "setAttribute(self, attribute: QGeoPositionInfo.Attribute, value: float)");

extern "C" {static PyObject *meth_QGeoPositionInfo_setAttribute(PyObject *, PyObject *);}
static PyObject *meth_QGeoPositionInfo_setAttribute(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QGeoPositionInfo::Attribute a0;
        ::qreal a1;
        ::QGeoPositionInfo *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BEd", &sipSelf, sipType_QGeoPositionInfo, &sipCpp, sipType_QGeoPositionInfo_Attribute, &a0, &a1))
        {
            sipCpp->setAttribute(a0, a1);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoPositionInfo, sipName_setAttribute, doc_QGeoPositionInfo_setAttribute);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoPositionInfo_attribute, "attribute(self, attribute: QGeoPositionInfo.Attribute) -> float");

extern "C" {static PyObject *meth_QGeoPositionInfo_attribute(PyObject *, PyObject *);}
static PyObject *meth_QGeoPositionInfo_attribute(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QGeoPositionInfo::Attribute a0;
        const ::QGeoPositionInfo *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QGeoPositionInfo, &sipCpp, sipType_QGeoPositionInfo_Attribute, &a0))
        {
            ::qreal sipRes;

            sipRes = sipCpp->attribute(a0);

            return PyFloat_FromDouble(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoPositionInfo, sipName_attribute, doc_QGeoPositionInfo_attribute);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoPositionInfo_removeAttribute, "removeAttribute(self, attribute: QGeoPositionInfo.Attribute)");

extern "C" {static PyObject *meth_QGeoPositionInfo_removeAttribute(PyObject *, PyObject *);}
static PyObject *meth_QGeoPositionInfo_removeAttribute(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QGeoPositionInfo::Attribute a0;
        ::QGeoPositionInfo *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QGeoPositionInfo, &sipCpp, sipType_QGeoPositionInfo_Attribute, &a0))
        {
            sipCpp->removeAttribute(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoPositionInfo, sipName_removeAttribute, doc_QGeoPositionInfo_removeAttribute);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoPositionInfo_hasAttribute, "hasAttribute(self, attribute: QGeoPositionInfo.Attribute) -> bool");

extern "C" {static PyObject *meth_QGeoPositionInfo_hasAttribute(PyObject *, PyObject *);}
static PyObject *meth_QGeoPositionInfo_hasAttribute(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QGeoPositionInfo::Attribute a0;
        const ::QGeoPositionInfo *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QGeoPositionInfo, &sipCpp, sipType_QGeoPositionInfo_Attribute, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->hasAttribute(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoPositionInfo, sipName_hasAttribute, doc_QGeoPositionInfo_hasAttribute);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QGeoPositionInfo___ne__(PyObject *, PyObject *);}
static PyObject *slot_QGeoPositionInfo___ne__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QGeoPositionInfo *sipCpp = reinterpret_cast< ::QGeoPositionInfo *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QGeoPositionInfo));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QGeoPositionInfo* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtPositioning, ne_slot, sipType_QGeoPositionInfo, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QGeoPositionInfo___eq__(PyObject *, PyObject *);}
static PyObject *slot_QGeoPositionInfo___eq__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QGeoPositionInfo *sipCpp = reinterpret_cast< ::QGeoPositionInfo *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QGeoPositionInfo));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QGeoPositionInfo* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtPositioning, eq_slot, sipType_QGeoPositionInfo, sipSelf, sipArg);
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const ::QGeoCoordinate* a0;
        const ::QDateTime* a1;
        int a1State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9J1", sipType_QGeoCoordinate, &a0, sipType_QDateTime, &a1, &a1State))
        {
            sipCpp = new ::QGeoPositionInfo(*a0, *a1);
            sipReleaseType(const_cast< ::QDateTime *>(a1), sipType_QDateTime, a1State);

            return sipCpp;
        }
    }

    {
        const ::QGeoPositionInfo* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_QGeoPositionInfo[] = {
    {sipName_attribute, meth_QGeoPositionInfo_attribute, METH_VARARGS, doc_QGeoPositionInfo_attribute},
    {sipName_coordinate, meth_QGeoPositionInfo_coordinate, METH_VARARGS, doc_QGeoPositionInfo_coordinate},
    {sipName_hasAttribute, meth_QGeoPositionInfo_hasAttribute, METH_VARARGS, doc_QGeoPositionInfo_hasAttribute},
    {sipName_isValid, meth_QGeoPositionInfo_isValid, METH_VARARGS, doc_QGeoPositionInfo_isValid},
    {sipName_removeAttribute, meth_QGeoPositionInfo_removeAttribute, METH_VARARGS, doc_QGeoPositionInfo_removeAttribute},
    {sipName_setAttribute, meth_QGeoPositionInfo_setAttribute, METH_VARARGS, doc_QGeoPositionInfo_setAttribute},
    {sipName_setCoordinate, meth_QGeoPositionInfo_setCoordinate, METH_VARARGS, doc_QGeoPositionInfo_setCoordinate},
    {sipName_setTimestamp, meth_QGeoPositionInfo_setTimestamp, METH_VARARGS, doc_QGeoPositionInfo_setTimestamp},
    {sipName_timestamp, meth_QGeoPositionInfo_timestamp, METH_VARARGS, doc_QGeoPositionInfo_timestamp}
};

static sipEnumMemberDef enummembers_QGeoPositionInfo[] = {
    {sipName_Direction, static_cast<int>(::QGeoPositionInfo::Direction), 14},
    {sipName_GroundSpeed, static_cast<int>(::QGeoPositionInfo::GroundSpeed), 14},
    {sipName_HorizontalAccuracy, static_cast<int>(::QGeoPositionInfo::HorizontalAccuracy), 14},
    {sipName_MagneticVariation, static_cast<int>(::QGeoPositionInfo::MagneticVariation), 14},
    {sipName_VerticalAccuracy, static_cast<int>(::QGeoPositionInfo::VerticalAccuracy), 14},
    {sipName_VerticalSpeed, static_cast<int>(::QGeoPositionInfo::VerticalSpeed), 14},
};

PyDoc_STRVAR(doc_QGeoPositionInfo, "\1QGeoPositionInfo()\n"
"QGeoPositionInfo(coordinate: QGeoCoordinate, updateTime: Union[QDateTime, datetime.datetime])\n"
"QGeoPositionInfo(other: QGeoPositionInfo)");


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


sipClassTypeDef sipTypeDef_QtPositioning_QGeoPositionInfo = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QGeoPositionInfo,
        SIP_NULLPTR,
        &plugin_QGeoPositionInfo,
    },
    {
        sipNameNr_QGeoPositionInfo,
        {0, 0, 1},
        9, methods_QGeoPositionInfo,
        6, enummembers_QGeoPositionInfo,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QGeoPositionInfo,
    -1,
    -1,
    SIP_NULLPTR,
    slots_QGeoPositionInfo,
    init_type_QGeoPositionInfo,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QGeoPositionInfo,
    assign_QGeoPositionInfo,
    array_QGeoPositionInfo,
    copy_QGeoPositionInfo,
    release_QGeoPositionInfo,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QGeoPositionInfo,
    sizeof (::QGeoPositionInfo),
};
