当前位置: 首页>>代码示例>>C++>>正文


C++ sipConvertFromType函数代码示例

本文整理汇总了C++中sipConvertFromType函数的典型用法代码示例。如果您正苦于以下问题:C++ sipConvertFromType函数的具体用法?C++ sipConvertFromType怎么用?C++ sipConvertFromType使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了sipConvertFromType函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

static PyObject *convertFrom_QList_0101QAction(void *sipCppV, PyObject *sipTransferObj)
{
   QList<QAction*> *sipCpp = reinterpret_cast<QList<QAction*> *>(sipCppV);

#line 124 "/Users/Kunwiji/Dropbox/Spectroscopy_paper/PyQt-mac-gpl-4.11.2/sip/QtCore/qlist.sip"
    // Create the list.
    PyObject *l;

    if ((l = PyList_New(sipCpp->size())) == NULL)
        return NULL;

    // Set the list elements.
    for (int i = 0; i < sipCpp->size(); ++i)
    {
        QAction *t = sipCpp->at(i);
        PyObject *tobj;

        // The explicit (void *) cast allows QAction to be const.
        if ((tobj = sipConvertFromType((void *)t, sipType_QAction, sipTransferObj)) == NULL)
        {
            Py_DECREF(l);
            return NULL;
        }

        PyList_SET_ITEM(l, i, tobj);
    }

    return l;
#line 156 "/Users/Kunwiji/Dropbox/Spectroscopy_paper/PyQt-mac-gpl-4.11.2/QtGui/sipQtGuiQList0101QAction.cpp"
}
开发者ID:kunwijik,项目名称:Spectroscopy_paper,代码行数:30,代码来源:sipQtGuiQList0101QAction.cpp

示例2: sipConvertFromType

static PyObject *meth_QThreadPool_globalInstance(PyObject *, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        if (sipParseArgs(&sipParseErr, sipArgs, ""))
        {
            QThreadPool*sipRes;
            PyObject *sipResObj;

            Py_BEGIN_ALLOW_THREADS
            sipRes = QThreadPool::globalInstance();
            Py_END_ALLOW_THREADS

            sipResObj = sipConvertFromType(sipRes,sipType_QThreadPool,NULL);

            sipKeepReference(NULL, -11, sipResObj);

            return sipResObj;
        }
    }

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

    return NULL;
}
开发者ID:kunwijik,项目名称:Spectroscopy_paper,代码行数:27,代码来源:sipQtCoreQThreadPool.cpp

示例3: sipIsDerived

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;
}
开发者ID:rff255,项目名称:python-qt5,代码行数:31,代码来源:sipQtWidgetsQItemEditorFactory.cpp

示例4:

static PyObject *convertFrom_QList_0101QDockWidget(void *sipCppV, PyObject *sipTransferObj)
{
   QList<QDockWidget*> *sipCpp = reinterpret_cast<QList<QDockWidget*> *>(sipCppV);

#line 124 "sip/QtCore/qlist.sip"
    // Create the list.
    PyObject *l;

    if ((l = PyList_New(sipCpp->size())) == NULL)
        return NULL;

    // Set the list elements.
    for (int i = 0; i < sipCpp->size(); ++i)
    {
        QDockWidget *t = sipCpp->at(i);
        PyObject *tobj;

        // The explicit (void *) cast allows QDockWidget to be const.
        if ((tobj = sipConvertFromType((void *)t, sipType_QDockWidget, sipTransferObj)) == NULL)
        {
            Py_DECREF(l);
            return NULL;
        }

        PyList_SET_ITEM(l, i, tobj);
    }

    return l;
#line 156 "/Users/ktaylora/PLJV/tillage_likelihood_model/gui/PyQt4/QtGui/sipQtGuiQList0101QDockWidget.cpp"
}
开发者ID:PLJV,项目名称:commodity_crop_dev_suitability_model,代码行数:30,代码来源:sipQtGuiQList0101QDockWidget.cpp

示例5: sipIsDerived

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

    {
        QObject* a0;
        const QString* a1;
        int a1State = 0;
        const QExtensionManager *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8J1", &sipSelf, sipType_QExtensionManager, &sipCpp, sipType_QObject, &a0, sipType_QString,&a1, &a1State))
        {
            QObject*sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->QExtensionManager::extension(a0,*a1) : sipCpp->extension(a0,*a1));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a1),sipType_QString,a1State);

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

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_QExtensionManager, sipName_extension, doc_QExtensionManager_extension);

    return NULL;
}
开发者ID:kunwijik,项目名称:Spectroscopy_paper,代码行数:29,代码来源:sipQtDesignerQExtensionManager.cpp

示例6: sipAbstractMethod

static PyObject *meth_QPaintDevice_paintEngine(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        const QPaintDevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPaintDevice, &sipCpp))
        {
            QPaintEngine*sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QPaintDevice, sipName_paintEngine);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->paintEngine();
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_QPaintEngine,NULL);
        }
    }
开发者ID:kunwijik,项目名称:Spectroscopy_paper,代码行数:25,代码来源:sipQtGuiQPaintDevice.cpp

示例7: sipAbstractMethod

static PyObject *meth_QDesignerFormWindowCursorInterface_selectedWidget(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        int a0;
        const QDesignerFormWindowCursorInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QDesignerFormWindowCursorInterface, &sipCpp, &a0))
        {
            QWidget*sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QDesignerFormWindowCursorInterface, sipName_selectedWidget);
                return NULL;
            }

            sipRes = sipCpp->selectedWidget(a0);

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

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_QDesignerFormWindowCursorInterface, sipName_selectedWidget, doc_QDesignerFormWindowCursorInterface_selectedWidget);

    return NULL;
}
开发者ID:rff255,项目名称:python-qt5,代码行数:30,代码来源:sipQtDesignerQDesignerFormWindowCursorInterface.cpp

示例8: sipConvertFromType

static PyObject *meth_QTreeWidgetItemIterator_value(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        const QTreeWidgetItemIterator *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTreeWidgetItemIterator, &sipCpp))
        {
            QTreeWidgetItem*sipRes = 0;

#line 65 "/home/vikky/Desktop/DVCS/stuff/scrapy/soft/PyQt-x11-gpl-4.11.4/sip/QtGui/qtreewidgetitemiterator.sip"
        // SIP doesn't support operator* so this is a thin wrapper around it.
        sipRes = sipCpp->operator*();
#line 60 "/home/vikky/Desktop/DVCS/stuff/scrapy/soft/PyQt-x11-gpl-4.11.4/QtGui/sipQtGuiQTreeWidgetItemIterator.cpp"

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

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_QTreeWidgetItemIterator, sipName_value, doc_QTreeWidgetItemIterator_value);

    return NULL;
}
开发者ID:annelida,项目名称:stuff,代码行数:25,代码来源:sipQtGuiQTreeWidgetItemIterator.cpp

示例9:

static PyObject *convertFrom_QList_0101QTableWidgetItem(void *sipCppV, PyObject *sipTransferObj)
{
   QList<QTableWidgetItem*> *sipCpp = reinterpret_cast<QList<QTableWidgetItem*> *>(sipCppV);

#line 119 "sip/QtCore/qlist.sip"
    // Create the list.
    PyObject *l;

    if ((l = PyList_New(sipCpp->size())) == NULL)
        return NULL;

    // Set the list elements.
    for (int i = 0; i < sipCpp->size(); ++i)
    {
        QTableWidgetItem *t = sipCpp->at(i);
        PyObject *tobj;

        // The explicit (void *) cast allows QTableWidgetItem to be const.
        if ((tobj = sipConvertFromType((void *)t, sipType_QTableWidgetItem, sipTransferObj)) == NULL)
        {
            Py_DECREF(l);
            return NULL;
        }

        PyList_SET_ITEM(l, i, tobj);
    }

    return l;
#line 151 "/home/vikky/Desktop/DVCS/stuff/scrapy/soft/PyQt-x11-gpl-4.11.4/QtGui/sipQtGuiQList0101QTableWidgetItem.cpp"
}
开发者ID:annelida,项目名称:stuff,代码行数:30,代码来源:sipQtGuiQList0101QTableWidgetItem.cpp

示例10: sipReleaseType

static PyObject *meth_tlp_GlComposite_findGlEntity(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        const std::string * a0;
        int a0State = 0;
        tlp::GlComposite *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_tlp_GlComposite, &sipCpp, sipType_std_string,&a0, &a0State))
        {
            tlp::GlSimpleEntity *sipRes;

            sipRes = sipCpp->findGlEntity(*a0);
            sipReleaseType(const_cast<std::string *>(a0),sipType_std_string,a0State);

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

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_GlComposite, sipName_findGlEntity, doc_tlp_GlComposite_findGlEntity);

    return NULL;
}
开发者ID:kdbanman,项目名称:browseRDF,代码行数:25,代码来源:siptulipogltlpGlComposite.cpp

示例11:

static PyObject *convertFrom_QList_0101QAbstractState(void *sipCppV,PyObject *sipTransferObj)
{
   QList<QAbstractState *> *sipCpp = reinterpret_cast<QList<QAbstractState *> *>(sipCppV);

#line 129 "/home/tsheasha/GUC/Bachelors/android-python27/python-build/PyQt-x11-gpl-4.8/sip/QtCore/qlist.sip"
    // Create the list.
    PyObject *l;

    if ((l = PyList_New(sipCpp->size())) == NULL)
        return NULL;

    // Set the list elements.
    for (int i = 0; i < sipCpp->size(); ++i)
    {
        QAbstractState *t = sipCpp->at(i);
        PyObject *tobj;

        if ((tobj = sipConvertFromType(t, sipType_QAbstractState, sipTransferObj)) == NULL)
        {
            Py_DECREF(l);
            return NULL;
        }

        PyList_SET_ITEM(l, i, tobj);
    }

    return l;
#line 160 "sipQtCoreQList0101QAbstractState.cpp"
}
开发者ID:ClydeMojura,项目名称:android-python27,代码行数:29,代码来源:sipQtCoreQList0101QAbstractState.cpp

示例12:

static PyObject *convertFrom_QList_0101QAction(void *sipCppV, PyObject *sipTransferObj)
{
   QList< ::QAction*> *sipCpp = reinterpret_cast<QList< ::QAction*> *>(sipCppV);

#line 119 "sip/QtCore/qlist.sip"
    // Create the list.
    PyObject *l;

    if ((l = PyList_New(sipCpp->size())) == NULL)
        return NULL;

    // Set the list elements.
    for (int i = 0; i < sipCpp->size(); ++i)
    {
        QAction *t = sipCpp->at(i);
        PyObject *tobj;

        // The explicit (void *) cast allows QAction to be const.
        if ((tobj = sipConvertFromType((void *)t, sipType_QAction, sipTransferObj)) == NULL)
        {
            Py_DECREF(l);
            return NULL;
        }

        PyList_SET_ITEM(l, i, tobj);
    }

    return l;
#line 151 "/home/thais/Faculdade/TCC/NEW/PyQt4_gpl_x11-4.12/QtGui/sipQtGuiQList0101QAction.cpp"
}
开发者ID:thaisdb,项目名称:TCC,代码行数:30,代码来源:sipQtGuiQList0101QAction.cpp

示例13:

static PyObject *convertFrom_QList_0101qt_gui_cpp_PluginProvider(void *sipCppV, PyObject *sipTransferObj)
{
   QList<qt_gui_cpp::PluginProvider*> *sipCpp = reinterpret_cast<QList<qt_gui_cpp::PluginProvider*> *>(sipCppV);

#line 119 "/usr/share/sip/PyQt4/QtCore/qlist.sip"
    // Create the list.
    PyObject *l;

    if ((l = PyList_New(sipCpp->size())) == NULL)
        return NULL;

    // Set the list elements.
    for (int i = 0; i < sipCpp->size(); ++i)
    {
        qt_gui_cpp::PluginProvider *t = sipCpp->at(i);
        PyObject *tobj;

        // The explicit (void *) cast allows qt_gui_cpp::PluginProvider to be const.
        if ((tobj = sipConvertFromType((void *)t, sipType_qt_gui_cpp_PluginProvider, sipTransferObj)) == NULL)
        {
            Py_DECREF(l);
            return NULL;
        }

        PyList_SET_ITEM(l, i, tobj);
    }

    return l;
#line 134 "/opt/ros_catkin_ws/build_isolated/qt_gui_cpp/sip/qt_gui_cpp_sip/siplibqt_gui_cpp_sipQList0101qt_gui_cppPluginProvider.cpp"
}
开发者ID:twighk,项目名称:ROS-Pi3,代码行数:30,代码来源:siplibqt_gui_cpp_sipQList0101qt_gui_cppPluginProvider.cpp

示例14: sipAbstractMethod

static PyObject *meth_QXmlReader_entityResolver(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    PyObject *sipOrigSelf = sipSelf;

    {
        const QXmlReader *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QXmlReader, &sipCpp))
        {
            QXmlEntityResolver*sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QXmlReader, sipName_entityResolver);
                return NULL;
            }

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->entityResolver();
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_QXmlEntityResolver,NULL);
        }
    }
开发者ID:annelida,项目名称:stuff,代码行数:25,代码来源:sipQtXmlQXmlReader.cpp

示例15: while

static PyObject *convertFrom_QSet_0101QAbstractState(void *sipCppV, PyObject *sipTransferObj)
{
   QSet<QAbstractState*> *sipCpp = reinterpret_cast<QSet<QAbstractState*> *>(sipCppV);

#line 319 "/home/vikky/Desktop/DVCS/stuff/scrapy/soft/PyQt-x11-gpl-4.11.4/sip/QtCore/qset.sip"
    // Create the set.
    PyObject *s;

    if ((s = PySet_New(NULL)) == NULL)
        return NULL;

    // Set the set elements.
    QSet<QAbstractState *>::const_iterator it = sipCpp->constBegin();
    QSet<QAbstractState *>::const_iterator end = sipCpp->constEnd();

    while (it != end)
    {
        PyObject *tobj;

        // The explicit (void *) cast allows QAbstractState to be const.
        if ((tobj = sipConvertFromType((void *)*it, sipType_QAbstractState, sipTransferObj)) == NULL)
        {
            Py_DECREF(s);
            return NULL;
        }

        PySet_Add(s, tobj);

        ++it;
    }

    return s;
#line 165 "/home/vikky/Desktop/DVCS/stuff/scrapy/soft/PyQt-x11-gpl-4.11.4/QtCore/sipQtCoreQSet0101QAbstractState.cpp"
}
开发者ID:annelida,项目名称:stuff,代码行数:34,代码来源:sipQtCoreQSet0101QAbstractState.cpp


注:本文中的sipConvertFromType函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。