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

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtQml/qqmlpropertyvaluesource.sip"
#include <qqmlpropertyvaluesource.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQQmlPropertyValueSource.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtQml/qqmlproperty.sip"
#include <qqmlproperty.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQQmlPropertyValueSource.cpp"


class sipQQmlPropertyValueSource : public  ::QQmlPropertyValueSource
{
public:
    sipQQmlPropertyValueSource();
    sipQQmlPropertyValueSource(const  ::QQmlPropertyValueSource&);
    virtual ~sipQQmlPropertyValueSource();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    void setTarget(const  ::QQmlProperty&) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[1];
};

sipQQmlPropertyValueSource::sipQQmlPropertyValueSource():  ::QQmlPropertyValueSource(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQQmlPropertyValueSource::sipQQmlPropertyValueSource(const  ::QQmlPropertyValueSource& a0):  ::QQmlPropertyValueSource(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

void sipQQmlPropertyValueSource::setTarget(const  ::QQmlProperty& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[0], &sipPySelf, sipName_QQmlPropertyValueSource, sipName_setTarget);

    if (!sipMeth)
        return;

    extern void sipVH_QtQml_18(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QQmlProperty&);

    sipVH_QtQml_18(sipGILState, sipImportedVirtErrorHandlers_QtQml_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}


PyDoc_STRVAR(doc_QQmlPropertyValueSource_setTarget, "setTarget(self, QQmlProperty)");

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

    {
        const  ::QQmlProperty* a0;
         ::QQmlPropertyValueSource *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QQmlPropertyValueSource, &sipCpp, sipType_QQmlProperty, &a0))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QQmlPropertyValueSource, sipName_setTarget);
                return SIP_NULLPTR;
            }

            sipCpp->setTarget(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QQmlPropertyValueSource, sipName_setTarget, doc_QQmlPropertyValueSource_setTarget);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QQmlPropertyValueSource(void *, int);}
static void release_QQmlPropertyValueSource(void *sipCppV, int sipState)
{
    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipQQmlPropertyValueSource *>(sipCppV);
    else
        delete reinterpret_cast< ::QQmlPropertyValueSource *>(sipCppV);
}


extern "C" {static int mixin_QQmlPropertyValueSource(PyObject *, PyObject *, PyObject *);}
static int mixin_QQmlPropertyValueSource(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    return sipInitMixin(sipSelf, sipArgs, sipKwds, (sipClassTypeDef *)&sipTypeDef_QtQml_QQmlPropertyValueSource);
}


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

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


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

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::QQmlPropertyValueSource* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QQmlPropertyValueSource[] = {
    {sipName_setTarget, meth_QQmlPropertyValueSource_setTarget, METH_VARARGS, doc_QQmlPropertyValueSource_setTarget}
};

PyDoc_STRVAR(doc_QQmlPropertyValueSource, "\1QQmlPropertyValueSource()\n"
"QQmlPropertyValueSource(QQmlPropertyValueSource)");


static pyqt5ClassPluginDef plugin_QQmlPropertyValueSource = {
    SIP_NULLPTR,
    0,
    SIP_NULLPTR,
    "org.qt-project.Qt.QQmlPropertyValueSource"
};


sipClassTypeDef sipTypeDef_QtQml_QQmlPropertyValueSource = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QQmlPropertyValueSource,
        SIP_NULLPTR,
        &plugin_QQmlPropertyValueSource
    },
    {
        sipNameNr_QQmlPropertyValueSource,
        {0, 0, 1},
        1, methods_QQmlPropertyValueSource,
        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_QQmlPropertyValueSource,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QQmlPropertyValueSource,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QQmlPropertyValueSource,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QQmlPropertyValueSource,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    mixin_QQmlPropertyValueSource,
    SIP_NULLPTR,
    sizeof ( ::QQmlPropertyValueSource),
};
