本文整理汇总了C++中sipConvertToType函数的典型用法代码示例。如果您正苦于以下问题:C++ sipConvertToType函数的具体用法?C++ sipConvertToType怎么用?C++ sipConvertToType使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sipConvertToType函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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"
}
示例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"
}
示例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"
}
示例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"
}
示例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"
}
示例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"
}
示例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;
}
示例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"
}
示例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"
}
示例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"
}
示例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"
}
示例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"
}
示例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"
}
示例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"
}
示例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"
}