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

#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSensors/qaltimeter.sip"
#include <qaltimeter.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAltimeterReading.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAltimeterReading.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 146 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAltimeterReading.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 41 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAltimeterReading.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 44 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAltimeterReading.cpp"
#line 247 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 47 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAltimeterReading.cpp"
#line 235 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 50 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAltimeterReading.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobject.sip"
#include <qobject.h>
#line 53 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAltimeterReading.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 56 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAltimeterReading.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 59 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAltimeterReading.cpp"
#line 30 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 62 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAltimeterReading.cpp"
#line 149 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 65 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAltimeterReading.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 68 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAltimeterReading.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qthread.sip"
#include <qthread.h>
#line 71 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAltimeterReading.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 74 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAltimeterReading.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qregexp.sip"
#include <qregexp.h>
#line 77 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAltimeterReading.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 80 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAltimeterReading.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 83 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAltimeterReading.cpp"


PyDoc_STRVAR(doc_QAltimeterReading_altitude, "altitude(self) -> float");

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

    {
        const  ::QAltimeterReading *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QAltimeterReading, &sipCpp))
        {
             ::qreal sipRes;

            sipRes = sipCpp->altitude();

            return PyFloat_FromDouble(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QAltimeterReading, sipName_altitude, doc_QAltimeterReading_altitude);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAltimeterReading_setAltitude, "setAltitude(self, float)");

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

    {
         ::qreal a0;
         ::QAltimeterReading *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bd", &sipSelf, sipType_QAltimeterReading, &sipCpp, &a0))
        {
            sipCpp->setAltitude(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QAltimeterReading, sipName_setAltitude, doc_QAltimeterReading_setAltitude);

    return SIP_NULLPTR;
}


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_QAltimeterReading(void *, const sipTypeDef *);}
static void *cast_QAltimeterReading(void *sipCppV, const sipTypeDef *targetType)
{
     ::QAltimeterReading *sipCpp = reinterpret_cast< ::QAltimeterReading *>(sipCppV);

    if (targetType == sipType_QAltimeterReading)
        return sipCppV;

    sipCppV = ((const sipClassTypeDef *)sipType_QSensorReading)->ctd_cast(static_cast< ::QSensorReading *>(sipCpp), targetType);
    if (sipCppV)
        return sipCppV;

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QAltimeterReading(void *, int);}
static void release_QAltimeterReading(void *sipCppV, int)
{
     ::QAltimeterReading *sipCpp = reinterpret_cast< ::QAltimeterReading *>(sipCppV);

    if (QThread::currentThread() == sipCpp->thread())
        delete sipCpp;
    else
        sipCpp->deleteLater();
}


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


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QAltimeterReading[] = {{60, 255, 1}};


static PyMethodDef methods_QAltimeterReading[] = {
    {sipName_altitude, meth_QAltimeterReading_altitude, METH_VARARGS, doc_QAltimeterReading_altitude},
    {sipName_setAltitude, meth_QAltimeterReading_setAltitude, METH_VARARGS, doc_QAltimeterReading_setAltitude}
};


static pyqt5ClassPluginDef plugin_QAltimeterReading = {
    & ::QAltimeterReading::staticMetaObject,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtSensors_QAltimeterReading = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QAltimeterReading,
        SIP_NULLPTR,
        &plugin_QAltimeterReading
    },
    {
        sipNameNr_QAltimeterReading,
        {0, 0, 1},
        2, methods_QAltimeterReading,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    SIP_NULLPTR,
    -1,
    -1,
    supers_QAltimeterReading,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QAltimeterReading,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QAltimeterReading,
    cast_QAltimeterReading,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    0,
};
