本文整理汇总了C++中sipConvertToType函数的典型用法代码示例。如果您正苦于以下问题:C++ sipConvertToType函数的具体用法?C++ sipConvertToType怎么用?C++ sipConvertToType使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sipConvertToType函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: convertTo_QList_0100QSize
static int convertTo_QList_0100QSize(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QList<QSize> **sipCppPtr = reinterpret_cast<QList<QSize> **>(sipCppPtrV);
#line 64 "sip/QtCore/qlist.sip"
SIP_SSIZE_T len;
// Check the type if that is all that is required.
if (sipIsErr == NULL)
{
if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
return 0;
for (SIP_SSIZE_T i = 0; i < len; ++i)
{
PyObject *itm = PySequence_ITEM(sipPy, i);
bool ok = (itm && sipCanConvertToType(itm, sipType_QSize, SIP_NOT_NONE));
Py_XDECREF(itm);
if (!ok)
return 0;
}
return 1;
}
QList<QSize> *ql = new QList<QSize>;
len = PySequence_Size(sipPy);
for (SIP_SSIZE_T i = 0; i < len; ++i)
{
PyObject *itm = PySequence_ITEM(sipPy, i);
int state;
QSize *t = reinterpret_cast<QSize *>(sipConvertToType(itm, sipType_QSize, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
Py_DECREF(itm);
if (*sipIsErr)
{
sipReleaseType(t, sipType_QSize, state);
delete ql;
return 0;
}
ql->append(*t);
sipReleaseType(t, sipType_QSize, state);
}
*sipCppPtr = ql;
return sipGetState(sipTransferObj);
#line 128 "/Users/ktaylora/PLJV/tillage_likelihood_model/gui/PyQt4/QtGui/sipQtGuiQList0100QSize.cpp"
}
开发者ID:PLJV,项目名称:commodity_crop_dev_suitability_model,代码行数:56,代码来源:sipQtGuiQList0100QSize.cpp
示例2: convertTo_QList_0100QNetworkProxy
static int convertTo_QList_0100QNetworkProxy(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QList<QNetworkProxy> **sipCppPtr = reinterpret_cast<QList<QNetworkProxy> **>(sipCppPtrV);
#line 64 "/Users/Kunwiji/Dropbox/Spectroscopy_paper/PyQt-mac-gpl-4.11.2/sip/QtCore/qlist.sip"
SIP_SSIZE_T len;
// Check the type if that is all that is required.
if (sipIsErr == NULL)
{
if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
return 0;
for (SIP_SSIZE_T i = 0; i < len; ++i)
{
PyObject *itm = PySequence_ITEM(sipPy, i);
bool ok = (itm && sipCanConvertToType(itm, sipType_QNetworkProxy, SIP_NOT_NONE));
Py_XDECREF(itm);
if (!ok)
return 0;
}
return 1;
}
QList<QNetworkProxy> *ql = new QList<QNetworkProxy>;
len = PySequence_Size(sipPy);
for (SIP_SSIZE_T i = 0; i < len; ++i)
{
PyObject *itm = PySequence_ITEM(sipPy, i);
int state;
QNetworkProxy *t = reinterpret_cast<QNetworkProxy *>(sipConvertToType(itm, sipType_QNetworkProxy, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
Py_DECREF(itm);
if (*sipIsErr)
{
sipReleaseType(t, sipType_QNetworkProxy, state);
delete ql;
return 0;
}
ql->append(*t);
sipReleaseType(t, sipType_QNetworkProxy, state);
}
*sipCppPtr = ql;
return sipGetState(sipTransferObj);
#line 128 "/Users/Kunwiji/Dropbox/Spectroscopy_paper/PyQt-mac-gpl-4.11.2/QtNetwork/sipQtNetworkQList0100QNetworkProxy.cpp"
}
开发者ID:kunwijik,项目名称:Spectroscopy_paper,代码行数:56,代码来源:sipQtNetworkQList0100QNetworkProxy.cpp
示例3: convertTo_QList_0100QLocale
static int convertTo_QList_0100QLocale(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QList<QLocale> **sipCppPtr = reinterpret_cast<QList<QLocale> **>(sipCppPtrV);
#line 59 "/home/vikky/Desktop/DVCS/stuff/scrapy/soft/PyQt-x11-gpl-4.11.4/sip/QtCore/qlist.sip"
SIP_SSIZE_T len;
// Check the type if that is all that is required.
if (sipIsErr == NULL)
{
if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
return 0;
for (SIP_SSIZE_T i = 0; i < len; ++i)
{
PyObject *itm = PySequence_ITEM(sipPy, i);
bool ok = (itm && sipCanConvertToType(itm, sipType_QLocale, SIP_NOT_NONE));
Py_XDECREF(itm);
if (!ok)
return 0;
}
return 1;
}
QList<QLocale> *ql = new QList<QLocale>;
len = PySequence_Size(sipPy);
for (SIP_SSIZE_T i = 0; i < len; ++i)
{
PyObject *itm = PySequence_ITEM(sipPy, i);
int state;
QLocale *t = reinterpret_cast<QLocale *>(sipConvertToType(itm, sipType_QLocale, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
Py_DECREF(itm);
if (*sipIsErr)
{
sipReleaseType(t, sipType_QLocale, state);
delete ql;
return 0;
}
ql->append(*t);
sipReleaseType(t, sipType_QLocale, state);
}
*sipCppPtr = ql;
return sipGetState(sipTransferObj);
#line 123 "/home/vikky/Desktop/DVCS/stuff/scrapy/soft/PyQt-x11-gpl-4.11.4/QtCore/sipQtCoreQList0100QLocale.cpp"
}
开发者ID:annelida,项目名称:stuff,代码行数:56,代码来源:sipQtCoreQList0100QLocale.cpp
示例4: convertTo_QList_0100QSize
static int convertTo_QList_0100QSize(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QList<QSize> **sipCppPtr = reinterpret_cast<QList<QSize> **>(sipCppPtrV);
#line 69 "/home/tsheasha/GUC/Bachelors/android-python27/python-build/PyQt-x11-gpl-4.8/sip/QtCore/qlist.sip"
SIP_SSIZE_T len;
// Check the type if that is all that is required.
if (sipIsErr == NULL)
{
if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
return 0;
for (SIP_SSIZE_T i = 0; i < len; ++i)
{
PyObject *itm = PySequence_ITEM(sipPy, i);
bool ok = (itm && sipCanConvertToType(itm, sipType_QSize, SIP_NOT_NONE));
Py_XDECREF(itm);
if (!ok)
return 0;
}
return 1;
}
QList<QSize> *ql = new QList<QSize>;
len = PySequence_Size(sipPy);
for (SIP_SSIZE_T i = 0; i < len; ++i)
{
PyObject *itm = PySequence_ITEM(sipPy, i);
int state;
QSize *t = reinterpret_cast<QSize *>(sipConvertToType(itm, sipType_QSize, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
Py_DECREF(itm);
if (*sipIsErr)
{
sipReleaseType(t, sipType_QSize, state);
delete ql;
return 0;
}
ql->append(*t);
sipReleaseType(t, sipType_QSize, state);
}
*sipCppPtr = ql;
return sipGetState(sipTransferObj);
#line 133 "sipQtGuiQList0100QSize.cpp"
}
开发者ID:ClydeMojura,项目名称:android-python27,代码行数:56,代码来源:sipQtGuiQList0100QSize.cpp
示例5: convertTo_QList_0100QFileInfo
static int convertTo_QList_0100QFileInfo(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QList< ::QFileInfo> **sipCppPtr = reinterpret_cast<QList< ::QFileInfo> **>(sipCppPtrV);
#line 59 "/home/thais/Faculdade/TCC/NEW/PyQt4_gpl_x11-4.12/sip/QtCore/qlist.sip"
SIP_SSIZE_T len;
// Check the type if that is all that is required.
if (sipIsErr == NULL)
{
if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
return 0;
for (SIP_SSIZE_T i = 0; i < len; ++i)
{
PyObject *itm = PySequence_ITEM(sipPy, i);
bool ok = (itm && sipCanConvertToType(itm, sipType_QFileInfo, SIP_NOT_NONE));
Py_XDECREF(itm);
if (!ok)
return 0;
}
return 1;
}
QList<QFileInfo> *ql = new QList<QFileInfo>;
len = PySequence_Size(sipPy);
for (SIP_SSIZE_T i = 0; i < len; ++i)
{
PyObject *itm = PySequence_ITEM(sipPy, i);
int state;
QFileInfo *t = reinterpret_cast<QFileInfo *>(sipConvertToType(itm, sipType_QFileInfo, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
Py_DECREF(itm);
if (*sipIsErr)
{
sipReleaseType(t, sipType_QFileInfo, state);
delete ql;
return 0;
}
ql->append(*t);
sipReleaseType(t, sipType_QFileInfo, state);
}
*sipCppPtr = ql;
return sipGetState(sipTransferObj);
#line 123 "/home/thais/Faculdade/TCC/NEW/PyQt4_gpl_x11-4.12/QtCore/sipQtCoreQList0100QFileInfo.cpp"
}
开发者ID:thaisdb,项目名称:TCC,代码行数:56,代码来源:sipQtCoreQList0100QFileInfo.cpp
示例6: convertTo_QList_0100QsciStyledText
static int convertTo_QList_0100QsciStyledText(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QList<QsciStyledText> **sipCppPtr = reinterpret_cast<QList<QsciStyledText> **>(sipCppPtrV);
#line 64 "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/share/sip/PyQt4/QtCore/qlist.sip"
SIP_SSIZE_T len;
// Check the type if that is all that is required.
if (sipIsErr == NULL)
{
if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
return 0;
for (SIP_SSIZE_T i = 0; i < len; ++i)
{
PyObject *itm = PySequence_ITEM(sipPy, i);
bool ok = (itm && sipCanConvertToType(itm, sipType_QsciStyledText, SIP_NOT_NONE));
Py_XDECREF(itm);
if (!ok)
return 0;
}
return 1;
}
QList<QsciStyledText> *ql = new QList<QsciStyledText>;
len = PySequence_Size(sipPy);
for (SIP_SSIZE_T i = 0; i < len; ++i)
{
PyObject *itm = PySequence_ITEM(sipPy, i);
int state;
QsciStyledText *t = reinterpret_cast<QsciStyledText *>(sipConvertToType(itm, sipType_QsciStyledText, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
Py_DECREF(itm);
if (*sipIsErr)
{
sipReleaseType(t, sipType_QsciStyledText, state);
delete ql;
return 0;
}
ql->append(*t);
sipReleaseType(t, sipType_QsciStyledText, state);
}
*sipCppPtr = ql;
return sipGetState(sipTransferObj);
#line 126 "./sipQsciQList0100QsciStyledText.cpp"
}
开发者ID:kunwijik,项目名称:Spectroscopy_paper,代码行数:56,代码来源:sipQsciQList0100QsciStyledText.cpp
示例7: sipTypeAsPyTypeObject
// This is a factory for the wrapped QDeclarativeListProperty<PyDelegate>.
static PyObject *QPyDeclarativeListProperty_call(PyObject *, PyObject *args,
PyObject *)
{
PyTypeObject *qobject_type = sipTypeAsPyTypeObject(sipType_QObject);
PyObject *qobj_obj, *list_obj;
if (!PyArg_ParseTuple(args,
#if PY_VERSION_HEX >= 0x02050000
"O!O!:QPyDeclarativeListProperty",
#else
const_cast<char *>("O!O!:QPyDeclarativeListProperty"),
#endif
qobject_type, &qobj_obj, &PyList_Type, &list_obj, &PyType_Type))
return 0;
// Get the C++ QObject.
int iserr = 0;
QObject *qobj = reinterpret_cast<QObject *>(sipConvertToType(qobj_obj, sipType_QObject, 0, SIP_NOT_NONE|SIP_NO_CONVERTORS, 0, &iserr));
if (iserr)
return 0;
// Get a list wrapper with the C++ QObject as its parent.
ListWrapper *list_wrapper = ListWrapper::wrapper(list_obj, qobj);
if (!list_wrapper)
return 0;
// Create the C++ QDeclarativeListProperty<QObject> with the list as the
// data.
QDeclarativeListProperty<QObject> *prop = new QDeclarativeListProperty<QObject>(qobj, &list_wrapper->qobject_list, list_append, list_count, list_at, list_clear);
// Convert it to a Python object.
static const sipTypeDef *mapped_type = 0;
if (!mapped_type)
mapped_type = sipFindType("QDeclarativeListProperty<QObject>");
Q_ASSERT(mapped_type);
// Make sure ownership is with Python.
PyObject *prop_obj = sipConvertFromNewType(prop, mapped_type, qobj_obj);
if (!prop_obj)
{
delete prop;
return 0;
}
return prop_obj;
}
开发者ID:thaisdb,项目名称:TCC,代码行数:52,代码来源:qpydeclarativelistproperty.cpp
示例8: convertTo_QList_0101QAction
static int convertTo_QList_0101QAction(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QList< ::QAction*> **sipCppPtr = reinterpret_cast<QList< ::QAction*> **>(sipCppPtrV);
#line 145 "sip/QtCore/qlist.sip"
SIP_SSIZE_T len;
// Check the type if that is all that is required.
if (sipIsErr == NULL)
{
if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
return 0;
for (SIP_SSIZE_T i = 0; i < len; ++i)
{
PyObject *itm = PySequence_ITEM(sipPy, i);
bool ok = (itm && sipCanConvertToType(itm, sipType_QAction, 0));
Py_XDECREF(itm);
if (!ok)
return 0;
}
return 1;
}
QList<QAction *> *ql = new QList<QAction *>;
len = PySequence_Size(sipPy);
for (SIP_SSIZE_T i = 0; i < len; ++i)
{
PyObject *itm = PySequence_ITEM(sipPy, i);
QAction *t = reinterpret_cast<QAction *>(sipConvertToType(itm, sipType_QAction, sipTransferObj, 0, 0, sipIsErr));
Py_DECREF(itm);
if (*sipIsErr)
{
delete ql;
return 0;
}
ql->append(t);
}
*sipCppPtr = ql;
return sipGetState(sipTransferObj);
#line 118 "/home/thais/Faculdade/TCC/NEW/PyQt4_gpl_x11-4.12/QtGui/sipQtGuiQList0101QAction.cpp"
}
开发者ID:thaisdb,项目名称:TCC,代码行数:51,代码来源:sipQtGuiQList0101QAction.cpp
示例9: convertTo_QList_0101QTableWidgetItem
static int convertTo_QList_0101QTableWidgetItem(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QList<QTableWidgetItem*> **sipCppPtr = reinterpret_cast<QList<QTableWidgetItem*> **>(sipCppPtrV);
#line 145 "sip/QtCore/qlist.sip"
SIP_SSIZE_T len;
// Check the type if that is all that is required.
if (sipIsErr == NULL)
{
if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
return 0;
for (SIP_SSIZE_T i = 0; i < len; ++i)
{
PyObject *itm = PySequence_ITEM(sipPy, i);
bool ok = (itm && sipCanConvertToType(itm, sipType_QTableWidgetItem, 0));
Py_XDECREF(itm);
if (!ok)
return 0;
}
return 1;
}
QList<QTableWidgetItem *> *ql = new QList<QTableWidgetItem *>;
len = PySequence_Size(sipPy);
for (SIP_SSIZE_T i = 0; i < len; ++i)
{
PyObject *itm = PySequence_ITEM(sipPy, i);
QTableWidgetItem *t = reinterpret_cast<QTableWidgetItem *>(sipConvertToType(itm, sipType_QTableWidgetItem, sipTransferObj, 0, 0, sipIsErr));
Py_DECREF(itm);
if (*sipIsErr)
{
delete ql;
return 0;
}
ql->append(t);
}
*sipCppPtr = ql;
return sipGetState(sipTransferObj);
#line 118 "/home/vikky/Desktop/DVCS/stuff/scrapy/soft/PyQt-x11-gpl-4.11.4/QtGui/sipQtGuiQList0101QTableWidgetItem.cpp"
}
开发者ID:annelida,项目名称:stuff,代码行数:51,代码来源:sipQtGuiQList0101QTableWidgetItem.cpp
示例10: convertTo_QList_0101QAction
static int convertTo_QList_0101QAction(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QList<QAction*> **sipCppPtr = reinterpret_cast<QList<QAction*> **>(sipCppPtrV);
#line 150 "/Users/Kunwiji/Dropbox/Spectroscopy_paper/PyQt-mac-gpl-4.11.2/sip/QtCore/qlist.sip"
SIP_SSIZE_T len;
// Check the type if that is all that is required.
if (sipIsErr == NULL)
{
if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
return 0;
for (SIP_SSIZE_T i = 0; i < len; ++i)
{
PyObject *itm = PySequence_ITEM(sipPy, i);
bool ok = (itm && sipCanConvertToType(itm, sipType_QAction, 0));
Py_XDECREF(itm);
if (!ok)
return 0;
}
return 1;
}
QList<QAction *> *ql = new QList<QAction *>;
len = PySequence_Size(sipPy);
for (SIP_SSIZE_T i = 0; i < len; ++i)
{
PyObject *itm = PySequence_ITEM(sipPy, i);
QAction *t = reinterpret_cast<QAction *>(sipConvertToType(itm, sipType_QAction, sipTransferObj, 0, 0, sipIsErr));
Py_DECREF(itm);
if (*sipIsErr)
{
delete ql;
return 0;
}
ql->append(t);
}
*sipCppPtr = ql;
return sipGetState(sipTransferObj);
#line 123 "/Users/Kunwiji/Dropbox/Spectroscopy_paper/PyQt-mac-gpl-4.11.2/QtGui/sipQtGuiQList0101QAction.cpp"
}
开发者ID:kunwijik,项目名称:Spectroscopy_paper,代码行数:51,代码来源:sipQtGuiQList0101QAction.cpp
示例11: convertTo_std_map_2200_0100tlp_Color
static int convertTo_std_map_2200_0100tlp_Color(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
std::map<float,tlp::Color> **sipCppPtr = reinterpret_cast<std::map<float,tlp::Color> **>(sipCppPtrV);
#line 219 "/home/kdbanman/browseRDF/tulip-3.8.0-src/library/tulip-python/tulip/../stl/map.sip"
PyObject *key = NULL;
PyObject *val = NULL;
Py_ssize_t pos = 0;
if (sipIsErr == NULL) {
if (!PyDict_Check(sipPy)) {
return 0;
}
while (PyDict_Next(sipPy, &pos, &key, &val)) {
bool ok = PyFloat_Check(key);
ok = ok && sipCanConvertToType(val, sipType_tlp_Color, SIP_NOT_NONE);
if (!ok) {
return 0;
}
}
return 1;
}
std::map <float, tlp::Color> *map = new std::map<float, tlp::Color>();
while (PyDict_Next(sipPy, &pos, &key, &val)) {
int t2State = 0;
float t1 = PyFloat_AsDouble(key);
tlp::Color *t2 = reinterpret_cast<tlp::Color *>(sipConvertToType(val, sipType_tlp_Color, sipTransferObj, SIP_NOT_NONE, &t2State, sipIsErr));
if (*sipIsErr) {
delete map;
sipReleaseType(t2, sipType_tlp_Color, t2State);
return 0;
}
(*map)[t1] = *t2;
sipReleaseType(t2, sipType_tlp_Color, t2State);
}
*sipCppPtr = map;
return sipGetState(sipTransferObj);
#line 96 "/home/kdbanman/browseRDF/tulip-3.8.0-src/build/library/tulip-python/tulip/siptulipstdmap22000100tlpColor.cpp"
}
开发者ID:kdbanman,项目名称:browseRDF,代码行数:48,代码来源:siptulipstdmap22000100tlpColor.cpp
示例12: convertTo_QHash_1800_0100QByteArray
static int convertTo_QHash_1800_0100QByteArray(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QHash<int, ::QByteArray> **sipCppPtr = reinterpret_cast<QHash<int, ::QByteArray> **>(sipCppPtrV);
#line 190 "/home/thais/Faculdade/TCC/NEW/PyQt4_gpl_x11-4.12/sip/QtCore/qhash.sip"
PyObject *kobj, *tobj;
SIP_SSIZE_T i = 0;
// Check the type if that is all that is required.
if (sipIsErr == NULL)
{
if (!PyDict_Check(sipPy))
return 0;
while (PyDict_Next(sipPy, &i, &kobj, &tobj))
if (!sipCanConvertToType(tobj, sipType_QByteArray, SIP_NOT_NONE))
return 0;
return 1;
}
QHash<int, QByteArray> *qm = new QHash<int, QByteArray>;
while (PyDict_Next(sipPy, &i, &kobj, &tobj))
{
int state, k = SIPLong_AsLong(kobj);
QByteArray *t = reinterpret_cast<QByteArray *>(sipConvertToType(tobj, sipType_QByteArray, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
if (*sipIsErr)
{
sipReleaseType(t, sipType_QByteArray, state);
delete qm;
return 0;
}
qm->insert(k, *t);
sipReleaseType(t, sipType_QByteArray, state);
}
*sipCppPtr = qm;
return sipGetState(sipTransferObj);
#line 113 "/home/thais/Faculdade/TCC/NEW/PyQt4_gpl_x11-4.12/QtCore/sipQtCoreQHash18000100QByteArray.cpp"
}
开发者ID:thaisdb,项目名称:TCC,代码行数:46,代码来源:sipQtCoreQHash18000100QByteArray.cpp
示例13: convertTo_QMap_1800_0100QVariant
static int convertTo_QMap_1800_0100QVariant(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QMap<int,QVariant> **sipCppPtr = reinterpret_cast<QMap<int,QVariant> **>(sipCppPtrV);
#line 200 "/home/tsheasha/GUC/Bachelors/android-python27/python-build/PyQt-x11-gpl-4.8/sip/QtCore/qmap.sip"
PyObject *kobj, *tobj;
SIP_SSIZE_T i = 0;
// Check the type if that is all that is required.
if (sipIsErr == NULL)
{
if (!PyDict_Check(sipPy))
return 0;
while (PyDict_Next(sipPy, &i, &kobj, &tobj))
if (!sipCanConvertToType(tobj, sipType_QVariant, SIP_NOT_NONE))
return 0;
return 1;
}
QMap<int, QVariant> *qm = new QMap<int, QVariant>;
while (PyDict_Next(sipPy, &i, &kobj, &tobj))
{
int state, k = SIPLong_AsLong(kobj);
QVariant *t = reinterpret_cast<QVariant *>(sipConvertToType(tobj, sipType_QVariant, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
if (*sipIsErr)
{
sipReleaseType(t, sipType_QVariant, state);
delete qm;
return 0;
}
qm->insert(k, *t);
sipReleaseType(t, sipType_QVariant, state);
}
*sipCppPtr = qm;
return sipGetState(sipTransferObj);
#line 126 "sipQtCoreQMap18000100QVariant.cpp"
}
开发者ID:ClydeMojura,项目名称:android-python27,代码行数:46,代码来源:sipQtCoreQMap18000100QVariant.cpp
示例14: convertTo_QVector_0100QTextFormat
static int convertTo_QVector_0100QTextFormat(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QVector<QTextFormat> **sipCppPtr = reinterpret_cast<QVector<QTextFormat> **>(sipCppPtrV);
#line 69 "/home/tsheasha/GUC/Bachelors/android-python27/python-build/PyQt-x11-gpl-4.8/sip/QtCore/qvector.sip"
// Check the type if that is all that is required.
if (sipIsErr == NULL)
{
if (!PyList_Check(sipPy))
return 0;
for (SIP_SSIZE_T i = 0; i < PyList_GET_SIZE(sipPy); ++i)
if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_QTextFormat, SIP_NOT_NONE))
return 0;
return 1;
}
QVector<QTextFormat> *qv = new QVector<QTextFormat>;
for (SIP_SSIZE_T i = 0; i < PyList_GET_SIZE(sipPy); ++i)
{
int state;
QTextFormat *t = reinterpret_cast<QTextFormat *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_QTextFormat, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
if (*sipIsErr)
{
sipReleaseType(t, sipType_QTextFormat, state);
delete qv;
return 0;
}
qv->append(*t);
sipReleaseType(t, sipType_QTextFormat, state);
}
*sipCppPtr = qv;
return sipGetState(sipTransferObj);
#line 120 "sipQtGuiQVector0100QTextFormat.cpp"
}
开发者ID:ClydeMojura,项目名称:android-python27,代码行数:43,代码来源:sipQtGuiQVector0100QTextFormat.cpp
示例15: convertTo_QVector_0100QRectF
static int convertTo_QVector_0100QRectF(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QVector<QRectF> **sipCppPtr = reinterpret_cast<QVector<QRectF> **>(sipCppPtrV);
#line 64 "sip/QtCore/qvector.sip"
// Check the type if that is all that is required.
if (sipIsErr == NULL)
{
if (!PyList_Check(sipPy))
return 0;
for (SIP_SSIZE_T i = 0; i < PyList_GET_SIZE(sipPy); ++i)
if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_QRectF, SIP_NOT_NONE))
return 0;
return 1;
}
QVector<QRectF> *qv = new QVector<QRectF>;
for (SIP_SSIZE_T i = 0; i < PyList_GET_SIZE(sipPy); ++i)
{
int state;
QRectF *t = reinterpret_cast<QRectF *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_QRectF, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
if (*sipIsErr)
{
sipReleaseType(t, sipType_QRectF, state);
delete qv;
return 0;
}
qv->append(*t);
sipReleaseType(t, sipType_QRectF, state);
}
*sipCppPtr = qv;
return sipGetState(sipTransferObj);
#line 115 "/Users/ktaylora/PLJV/tillage_likelihood_model/gui/PyQt4/QtGui/sipQtGuiQVector0100QRectF.cpp"
}
开发者ID:PLJV,项目名称:commodity_crop_dev_suitability_model,代码行数:43,代码来源:sipQtGuiQVector0100QRectF.cpp
示例16: convertTo_QVector_0100QTextLayout_FormatRange
static int convertTo_QVector_0100QTextLayout_FormatRange(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QVector<QTextLayout::FormatRange> **sipCppPtr = reinterpret_cast<QVector<QTextLayout::FormatRange> **>(sipCppPtrV);
#line 64 "/Users/Kunwiji/Dropbox/Spectroscopy_paper/PyQt-mac-gpl-4.11.2/sip/QtCore/qvector.sip"
// Check the type if that is all that is required.
if (sipIsErr == NULL)
{
if (!PyList_Check(sipPy))
return 0;
for (SIP_SSIZE_T i = 0; i < PyList_GET_SIZE(sipPy); ++i)
if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_QTextLayout_FormatRange, SIP_NOT_NONE))
return 0;
return 1;
}
QVector<QTextLayout::FormatRange> *qv = new QVector<QTextLayout::FormatRange>;
for (SIP_SSIZE_T i = 0; i < PyList_GET_SIZE(sipPy); ++i)
{
int state;
QTextLayout::FormatRange *t = reinterpret_cast<QTextLayout::FormatRange *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_QTextLayout_FormatRange, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
if (*sipIsErr)
{
sipReleaseType(t, sipType_QTextLayout_FormatRange, state);
delete qv;
return 0;
}
qv->append(*t);
sipReleaseType(t, sipType_QTextLayout_FormatRange, state);
}
*sipCppPtr = qv;
return sipGetState(sipTransferObj);
#line 117 "/Users/Kunwiji/Dropbox/Spectroscopy_paper/PyQt-mac-gpl-4.11.2/QtGui/sipQtGuiQVector0100QTextLayoutFormatRange.cpp"
}
开发者ID:kunwijik,项目名称:Spectroscopy_paper,代码行数:43,代码来源:sipQtGuiQVector0100QTextLayoutFormatRange.cpp
示例17: convertTo_QVector_0100QPoint
static int convertTo_QVector_0100QPoint(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QVector<QPoint> **sipCppPtr = reinterpret_cast<QVector<QPoint> **>(sipCppPtrV);
#line 59 "sip/QtCore/qvector.sip"
// Check the type if that is all that is required.
if (sipIsErr == NULL)
{
if (!PyList_Check(sipPy))
return 0;
for (SIP_SSIZE_T i = 0; i < PyList_GET_SIZE(sipPy); ++i)
if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_QPoint, SIP_NOT_NONE))
return 0;
return 1;
}
QVector<QPoint> *qv = new QVector<QPoint>;
for (SIP_SSIZE_T i = 0; i < PyList_GET_SIZE(sipPy); ++i)
{
int state;
QPoint *t = reinterpret_cast<QPoint *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_QPoint, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
if (*sipIsErr)
{
sipReleaseType(t, sipType_QPoint, state);
delete qv;
return 0;
}
qv->append(*t);
sipReleaseType(t, sipType_QPoint, state);
}
*sipCppPtr = qv;
return sipGetState(sipTransferObj);
#line 110 "/home/vikky/Desktop/DVCS/stuff/scrapy/soft/PyQt-x11-gpl-4.11.4/QtGui/sipQtGuiQVector0100QPoint.cpp"
}
开发者ID:annelida,项目名称:stuff,代码行数:43,代码来源:sipQtGuiQVector0100QPoint.cpp
示例18: convertTo_std_vector_0100std_vector_1900
static int convertTo_std_vector_0100std_vector_1900(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
std::vector<std_vector_1900> **sipCppPtr = reinterpret_cast<std::vector<std_vector_1900> **>(sipCppPtrV);
#line 71 "/home/kdbanman/browseRDF/tulip-3.8.0-src/library/tulip-python/tulip/../stl/vector.sip"
// Check if type is compatible
if (sipIsErr == NULL) {
if (!PyList_Check(sipPy)) {
return 0;
}
for (SIP_SSIZE_T i = 0; i < PyList_GET_SIZE(sipPy); ++i) {
PyObject *item = PyList_GET_ITEM(sipPy, i);
if (!sipCanConvertToType(item, sipType_std_vector_1900, SIP_NOT_NONE)) {
printErrorMessage("TypeError : object in list of type " + std::string(item->ob_type->tp_name) + " can not be converted to std_vector_1900");
return 0;
}
}
return 1;
}
// Convert Python list of std_vector_1900 to std::vector<std_vector_1900>
std::vector<std_vector_1900> *v = new std::vector<std_vector_1900>();
v->reserve(PyList_GET_SIZE(sipPy));
for (SIP_SSIZE_T i = 0; i < PyList_GET_SIZE(sipPy); ++i) {
int state;
std_vector_1900* p = reinterpret_cast<std_vector_1900*>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_std_vector_1900, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
if (*sipIsErr) {
sipReleaseType(p, sipType_std_vector_1900, state);
delete v;
return 0;
}
v->push_back(*p);
sipReleaseType(p, sipType_std_vector_1900, state);
}
*sipCppPtr = v;
return sipGetState(sipTransferObj);
#line 91 "/home/kdbanman/browseRDF/tulip-3.8.0-src/build/library/tulip-python/tulip/siptulipstdvector0100std_vector_1900.cpp"
}
开发者ID:kdbanman,项目名称:browseRDF,代码行数:43,代码来源:siptulipstdvector0100std_vector_1900.cpp
示例19: convertTo_QWebEnginePage_FindFlags
static int convertTo_QWebEnginePage_FindFlags(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QWebEnginePage::FindFlags **sipCppPtr = reinterpret_cast<QWebEnginePage::FindFlags **>(sipCppPtrV);
#line 124 "sip/QtCore/qglobal.sip"
// Allow an instance of the base enum whenever a QWebEnginePage::FindFlags is expected.
if (sipIsErr == NULL)
return (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_QWebEnginePage_FindFlag)) ||
sipCanConvertToType(sipPy, sipType_QWebEnginePage_FindFlags, SIP_NO_CONVERTORS));
if (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_QWebEnginePage_FindFlag)))
{
*sipCppPtr = new QWebEnginePage::FindFlags(int(SIPLong_AsLong(sipPy)));
return sipGetState(sipTransferObj);
}
*sipCppPtr = reinterpret_cast<QWebEnginePage::FindFlags *>(sipConvertToType(sipPy, sipType_QWebEnginePage_FindFlags, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr));
return 0;
#line 547 "C:\\Users\\marcus\\Downloads\\PyQt-gpl-5.4\\PyQt-gpl-5.4\\QtWebEngineWidgets/sipQtWebEngineWidgetsQWebEnginePageFindFlags.cpp"
}
开发者ID:rff255,项目名称:python-qt5,代码行数:23,代码来源:sipQtWebEngineWidgetsQWebEnginePageFindFlags.cpp
示例20: convertTo_QTextEdit_AutoFormatting
static int convertTo_QTextEdit_AutoFormatting(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QTextEdit::AutoFormatting **sipCppPtr = reinterpret_cast<QTextEdit::AutoFormatting **>(sipCppPtrV);
#line 124 "sip/QtCore/qglobal.sip"
// Allow an instance of the base enum whenever a QTextEdit::AutoFormatting is expected.
if (sipIsErr == NULL)
return (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_QTextEdit_AutoFormattingFlag)) ||
sipCanConvertToType(sipPy, sipType_QTextEdit_AutoFormatting, SIP_NO_CONVERTORS));
if (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_QTextEdit_AutoFormattingFlag)))
{
*sipCppPtr = new QTextEdit::AutoFormatting(int(SIPLong_AsLong(sipPy)));
return sipGetState(sipTransferObj);
}
*sipCppPtr = reinterpret_cast<QTextEdit::AutoFormatting *>(sipConvertToType(sipPy, sipType_QTextEdit_AutoFormatting, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr));
return 0;
#line 547 "C:\\Users\\marcus\\Downloads\\PyQt-gpl-5.4\\PyQt-gpl-5.4\\QtWidgets/sipQtWidgetsQTextEditAutoFormatting.cpp"
}
开发者ID:rff255,项目名称:python-qt5,代码行数:23,代码来源:sipQtWidgetsQTextEditAutoFormatting.cpp
注:本文中的sipConvertToType函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论