static PyObject *meth_QItemEditorFactory_createEditor(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        int a0;
        QWidget* a1;
        sipWrapper *sipOwner = 0;
        const QItemEditorFactory *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BiJH", &sipSelf, sipType_QItemEditorFactory, &sipCpp, &a0, sipType_QWidget, &a1, &sipOwner))
        {
            QWidget*sipRes;

            sipRes = (sipSelfWasArg ? sipCpp->QItemEditorFactory::createEditor(a0,a1) : sipCpp->createEditor(a0,a1));

            if (sipOwner)
                sipTransferTo(sipSelf, (PyObject *)sipOwner);
            else
                sipTransferBack(sipSelf);

            return sipConvertFromType(sipRes,sipType_QWidget,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_QItemEditorFactory, sipName_createEditor, doc_QItemEditorFactory_createEditor);

    return NULL;
}
static PyObject *meth_QThreadPool_tryStart(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        QRunnable* a0;
        PyObject *a0Wrapper;
        QThreadPool *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B@J8", &sipSelf, sipType_QThreadPool, &sipCpp, &a0Wrapper, sipType_QRunnable, &a0))
        {
            bool sipRes = 0;

#line 53 "/Users/Kunwiji/Dropbox/Spectroscopy_paper/PyQt-mac-gpl-4.11.2/sip/QtCore/qthreadpool.sip"
            // We have to handle the object ownership manually.
            if (a0->autoDelete())
                sipTransferTo(a0Wrapper, sipSelf);

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->tryStart(a0);
            Py_END_ALLOW_THREADS
#line 362 "/Users/Kunwiji/Dropbox/Spectroscopy_paper/PyQt-mac-gpl-4.11.2/QtCore/sipQtCoreQThreadPool.cpp"

            return PyBool_FromLong(sipRes);
        }
    }
// Create the QObject instance.
QObject *QPyQmlSingletonObjectProxy::createObject(QQmlEngine *engine,
        QJSEngine *scriptEngine, PyObject *factory)
{
    // This should never happen.
    if (!factory)
        return 0;

    QObject *qobject;

    SIP_BLOCK_THREADS

    PyObject *py_obj = sipCallMethod(NULL, factory, "DD", engine,
            sipType_QQmlEngine, NULL, scriptEngine, sipType_QJSEngine, NULL);

    if (py_obj)
    {
        qobject = reinterpret_cast<QObject *>(
                sipGetAddress((sipSimpleWrapper *)py_obj));

        // The engine will call the dtor and garbage collect the Python object.
        sipTransferTo(py_obj, Py_None);
        Py_DECREF(py_obj);
    }
    else
    {
        qobject = 0;
        pyqt5_qtqml_err_print();
    }

    Py_DECREF(factory);

    SIP_UNBLOCK_THREADS

    return qobject;
}
static PyObject *meth_QStackedLayout_insertWidget(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        int a0;
        QWidget* a1;
        PyObject *a1Wrapper;
        QStackedLayout *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi@J8", &sipSelf, sipType_QStackedLayout, &sipCpp, &a0, &a1Wrapper, sipType_QWidget, &a1))
        {
            int sipRes = 0;

#line 74 "/Users/Kunwiji/Dropbox/Spectroscopy_paper/PyQt-mac-gpl-4.11.2/sip/QtGui/qstackedlayout.sip"
        Py_BEGIN_ALLOW_THREADS
        sipCpp->insertWidget(a0, a1);
        Py_END_ALLOW_THREADS
        
        // The layout's parent widget (if there is one) will now have ownership.
        QWidget *parent = sipCpp->parentWidget();
        
        if (parent)
        {
            PyObject *py_parent = sipGetPyObject(parent, sipType_QWidget);
            
            if (py_parent)
                sipTransferTo(a1Wrapper, py_parent);
        }
        else
        {
            // For now give the Python ownership to the layout.  This maintains
            // compatibility with previous versions and allows insertWidget(QWidget()).
            sipTransferTo(a1Wrapper, sipSelf);
        }
#line 704 "/Users/Kunwiji/Dropbox/Spectroscopy_paper/PyQt-mac-gpl-4.11.2/QtGui/sipQtGuiQStackedLayout.cpp"

            return SIPLong_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_QStackedLayout, sipName_insertWidget, doc_QStackedLayout_insertWidget);

    return NULL;
}
Esempio n. 5
0
static PyObject *meth_QStackedLayout_addWidget(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
         ::QWidget* a0;
        PyObject *a0Wrapper;
         ::QStackedLayout *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B@J8", &sipSelf, sipType_QStackedLayout, &sipCpp, &a0Wrapper, sipType_QWidget, &a0))
        {
            int sipRes = 0;

#line 45 "/home/thais/Faculdade/TCC/NEW/PyQt4_gpl_x11-4.12/sip/QtGui/qstackedlayout.sip"
        Py_BEGIN_ALLOW_THREADS
        sipRes = sipCpp->addWidget(a0);
        Py_END_ALLOW_THREADS
        
        // The layout's parent widget (if there is one) will now have ownership.
        QWidget *parent = sipCpp->parentWidget();
        
        if (parent)
        {
            PyObject *py_parent = sipGetPyObject(parent, sipType_QWidget);
            
            if (py_parent)
                sipTransferTo(a0Wrapper, py_parent);
        }
        else
        {
            // For now give the Python ownership to the layout.  This maintains
            // compatibility with previous versions and allows addWidget(QWidget()).
            sipTransferTo(a0Wrapper, sipSelf);
        }
#line 649 "/home/thais/Faculdade/TCC/NEW/PyQt4_gpl_x11-4.12/QtGui/sipQtGuiQStackedLayout.cpp"

            return SIPLong_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_QStackedLayout, sipName_addWidget, doc_QStackedLayout_addWidget);

    return NULL;
}
static PyObject *meth_QThreadPool_start(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = NULL;

    {
        QRunnable* a0;
        PyObject *a0Wrapper;
        int a1 = 0;
        QThreadPool *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "B@J8|i", &sipSelf, sipType_QThreadPool, &sipCpp, &a0Wrapper, sipType_QRunnable, &a0, &a1))
        {
#line 42 "/Users/Kunwiji/Dropbox/Spectroscopy_paper/PyQt-mac-gpl-4.11.2/sip/QtCore/qthreadpool.sip"
            // We have to handle the object ownership manually.
            if (a0->autoDelete())
                sipTransferTo(a0Wrapper, sipSelf);

            Py_BEGIN_ALLOW_THREADS
            sipCpp->start(a0, a1);
            Py_END_ALLOW_THREADS
#line 324 "/Users/Kunwiji/Dropbox/Spectroscopy_paper/PyQt-mac-gpl-4.11.2/QtCore/sipQtCoreQThreadPool.cpp"

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_QThreadPool, sipName_start, doc_QThreadPool_start);

    return NULL;
}