/*
 * 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 55 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSensors/qambienttemperaturesensor.sip"
#include <qambienttemperaturesensor.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"

#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobject.sip"
#include <qobject.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSensors/qambienttemperaturesensor.sip"
#include <qambienttemperaturesensor.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 85 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSensors/qsensor.sip"
#include <qsensor.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 30 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 149 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 48 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 68 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSensors/qsensor.sip"
#include <qsensor.h>
#line 51 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 54 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 57 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 34 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSensors/qsensor.sip"
#include <qsensor.h>
#line 60 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 460 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#include <qpair.h>
#line 64 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.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 69 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 72 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 75 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 247 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 78 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 235 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 81 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 84 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 149 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 87 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 90 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qthread.sip"
#include <qthread.h>
#line 93 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 96 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qregexp.sip"
#include <qregexp.h>
#line 99 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 102 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 105 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSensors/sipQtSensorsQAmbientTemperatureSensor.cpp"


class sipQAmbientTemperatureSensor : public  ::QAmbientTemperatureSensor
{
public:
    sipQAmbientTemperatureSensor( ::QObject*);
    virtual ~sipQAmbientTemperatureSensor();

    int qt_metacall(QMetaObject::Call, int, void **) SIP_OVERRIDE;
    void *qt_metacast(const char *) SIP_OVERRIDE;
    const QMetaObject *metaObject() const SIP_OVERRIDE;

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    void disconnectNotify(const  ::QMetaMethod&) SIP_OVERRIDE;
    void connectNotify(const  ::QMetaMethod&) SIP_OVERRIDE;
    void customEvent( ::QEvent*) SIP_OVERRIDE;
    void childEvent( ::QChildEvent*) SIP_OVERRIDE;
    void timerEvent( ::QTimerEvent*) SIP_OVERRIDE;
    bool eventFilter( ::QObject*, ::QEvent*) SIP_OVERRIDE;
    bool event( ::QEvent*) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipQAmbientTemperatureSensor(const sipQAmbientTemperatureSensor &);
    sipQAmbientTemperatureSensor &operator = (const sipQAmbientTemperatureSensor &);

    char sipPyMethods[7];
};

sipQAmbientTemperatureSensor::sipQAmbientTemperatureSensor( ::QObject*a0):  ::QAmbientTemperatureSensor(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQAmbientTemperatureSensor::~sipQAmbientTemperatureSensor()
{
    sipInstanceDestroyedEx(&sipPySelf);
}

const QMetaObject *sipQAmbientTemperatureSensor::metaObject() const
{
    if (sipGetInterpreter())
        return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : sip_QtSensors_qt_metaobject(sipPySelf,sipType_QAmbientTemperatureSensor);

    return  ::QAmbientTemperatureSensor::metaObject();
}

int sipQAmbientTemperatureSensor::qt_metacall(QMetaObject::Call _c,int _id,void **_a)
{
    _id =  ::QAmbientTemperatureSensor::qt_metacall(_c,_id,_a);

    if (_id >= 0)
    {
        SIP_BLOCK_THREADS
        _id = sip_QtSensors_qt_metacall(sipPySelf,sipType_QAmbientTemperatureSensor,_c,_id,_a);
        SIP_UNBLOCK_THREADS
    }

    return _id;
}

void *sipQAmbientTemperatureSensor::qt_metacast(const char *_clname)
{
    void *sipCpp;

    return (sip_QtSensors_qt_metacast(sipPySelf, sipType_QAmbientTemperatureSensor, _clname, &sipCpp) ? sipCpp :  ::QAmbientTemperatureSensor::qt_metacast(_clname));
}

void sipQAmbientTemperatureSensor::disconnectNotify(const  ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[0], &sipPySelf, SIP_NULLPTR, sipName_disconnectNotify);

    if (!sipMeth)
    {
         ::QAmbientTemperatureSensor::disconnectNotify(a0);
        return;
    }

    extern void sipVH_QtSensors_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMetaMethod&);

    sipVH_QtSensors_0(sipGILState, sipImportedVirtErrorHandlers_QtSensors_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQAmbientTemperatureSensor::connectNotify(const  ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[1], &sipPySelf, SIP_NULLPTR, sipName_connectNotify);

    if (!sipMeth)
    {
         ::QAmbientTemperatureSensor::connectNotify(a0);
        return;
    }

    extern void sipVH_QtSensors_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMetaMethod&);

    sipVH_QtSensors_0(sipGILState, sipImportedVirtErrorHandlers_QtSensors_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQAmbientTemperatureSensor::customEvent( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[2], &sipPySelf, SIP_NULLPTR, sipName_customEvent);

    if (!sipMeth)
    {
         ::QAmbientTemperatureSensor::customEvent(a0);
        return;
    }

    extern void sipVH_QtSensors_1(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QEvent*);

    sipVH_QtSensors_1(sipGILState, sipImportedVirtErrorHandlers_QtSensors_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQAmbientTemperatureSensor::childEvent( ::QChildEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[3], &sipPySelf, SIP_NULLPTR, sipName_childEvent);

    if (!sipMeth)
    {
         ::QAmbientTemperatureSensor::childEvent(a0);
        return;
    }

    extern void sipVH_QtSensors_2(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QChildEvent*);

    sipVH_QtSensors_2(sipGILState, sipImportedVirtErrorHandlers_QtSensors_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQAmbientTemperatureSensor::timerEvent( ::QTimerEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[4], &sipPySelf, SIP_NULLPTR, sipName_timerEvent);

    if (!sipMeth)
    {
         ::QAmbientTemperatureSensor::timerEvent(a0);
        return;
    }

    extern void sipVH_QtSensors_3(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QTimerEvent*);

    sipVH_QtSensors_3(sipGILState, sipImportedVirtErrorHandlers_QtSensors_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQAmbientTemperatureSensor::eventFilter( ::QObject*a0, ::QEvent*a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[5], &sipPySelf, SIP_NULLPTR, sipName_eventFilter);

    if (!sipMeth)
        return  ::QAmbientTemperatureSensor::eventFilter(a0,a1);

    extern bool sipVH_QtSensors_4(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QObject*, ::QEvent*);

    return sipVH_QtSensors_4(sipGILState, sipImportedVirtErrorHandlers_QtSensors_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}

bool sipQAmbientTemperatureSensor::event( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[6], &sipPySelf, SIP_NULLPTR, sipName_event);

    if (!sipMeth)
        return  ::QAmbientTemperatureSensor::event(a0);

    extern bool sipVH_QtSensors_5(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QEvent*);

    return sipVH_QtSensors_5(sipGILState, sipImportedVirtErrorHandlers_QtSensors_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}


PyDoc_STRVAR(doc_QAmbientTemperatureSensor_reading, "reading(self) -> QAmbientTemperatureReading");

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

    {
        const  ::QAmbientTemperatureSensor *sipCpp;

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

            sipRes = sipCpp->reading();

            return sipConvertFromType(sipRes,sipType_QAmbientTemperatureReading,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QAmbientTemperatureSensor, sipName_reading, doc_QAmbientTemperatureSensor_reading);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QAmbientTemperatureSensor)
        return sipCppV;

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

    return SIP_NULLPTR;
}


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

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


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


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


extern "C" {static void dealloc_QAmbientTemperatureSensor(sipSimpleWrapper *);}
static void dealloc_QAmbientTemperatureSensor(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipQAmbientTemperatureSensor *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;

    if (sipIsOwnedByPython(sipSelf))
    {
        release_QAmbientTemperatureSensor(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
    }
}


extern "C" {static void *init_type_QAmbientTemperatureSensor(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QAmbientTemperatureSensor(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **sipOwner, PyObject **sipParseErr)
{
    sipQAmbientTemperatureSensor *sipCpp = SIP_NULLPTR;

    {
         ::QObject* a0 = 0;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|JH", sipType_QObject, &a0, sipOwner))
        {
            sipCpp = new sipQAmbientTemperatureSensor(a0);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_QAmbientTemperatureSensor[] = {
    {sipName_reading, meth_QAmbientTemperatureSensor_reading, METH_VARARGS, doc_QAmbientTemperatureSensor_reading}
};

PyDoc_STRVAR(doc_QAmbientTemperatureSensor, "\1QAmbientTemperatureSensor(parent: QObject = None)");


static pyqt5ClassPluginDef plugin_QAmbientTemperatureSensor = {
    & ::QAmbientTemperatureSensor::staticMetaObject,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtSensors_QAmbientTemperatureSensor = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QAmbientTemperatureSensor,
        SIP_NULLPTR,
        &plugin_QAmbientTemperatureSensor
    },
    {
        sipNameNr_QAmbientTemperatureSensor,
        {0, 0, 1},
        1, methods_QAmbientTemperatureSensor,
        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},
    },
    doc_QAmbientTemperatureSensor,
    -1,
    -1,
    supers_QAmbientTemperatureSensor,
    SIP_NULLPTR,
    init_type_QAmbientTemperatureSensor,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QAmbientTemperatureSensor,
    SIP_NULLPTR,
    array_QAmbientTemperatureSensor,
    SIP_NULLPTR,
    release_QAmbientTemperatureSensor,
    cast_QAmbientTemperatureSensor,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QAmbientTemperatureSensor,
    sizeof ( ::QAmbientTemperatureSensor),
};
