本文整理汇总了C++中sipCanConvertToType函数的典型用法代码示例。如果您正苦于以下问题:C++ sipCanConvertToType函数的具体用法?C++ sipCanConvertToType怎么用?C++ sipCanConvertToType使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sipCanConvertToType函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: qpyqml_canConvertTo_QJSValue
// See if a Python object can be converted to a QJSValue.
int qpyqml_canConvertTo_QJSValue(PyObject *py)
{
// Note that these checks are done in the same order as the QJSValue ctors.
if (PyObject_TypeCheck(py, sipTypeAsPyTypeObject(sipType_QJSValue_SpecialValue)))
return 1;
if (PyBool_Check(py))
return 1;
#if PY_MAJOR_VERSION >= 3
if (PyLong_Check(py))
return 1;
#else
if (PyInt_Check(py))
return 1;
#endif
if (PyFloat_Check(py))
return 1;
if (sipCanConvertToType(py, sipType_QString, 0))
return 1;
return sipCanConvertToType(py, sipType_QJSValue, SIP_NO_CONVERTORS);
}
示例2: convertTo_QEasingCurve
static int convertTo_QEasingCurve(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QEasingCurve **sipCppPtr = reinterpret_cast<QEasingCurve **>(sipCppPtrV);
#line 139 "C:\\Users\\marcus\\Downloads\\PyQt-gpl-5.4\\PyQt-gpl-5.4\\sip/QtCore/qeasingcurve.sip"
// Allow a QEasingCurve::Type whenever a QEasingCurve is expected.
if (sipIsErr == NULL)
{
if (sipCanConvertToType(sipPy, sipType_QEasingCurve, SIP_NO_CONVERTORS))
return 1;
if (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_QEasingCurve_Type)))
return 1;
return 0;
}
if (sipCanConvertToType(sipPy, sipType_QEasingCurve, SIP_NO_CONVERTORS))
{
*sipCppPtr = reinterpret_cast<QEasingCurve *>(sipConvertToType(sipPy, sipType_QEasingCurve, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr));
return 0;
}
*sipCppPtr = new QEasingCurve((QEasingCurve::Type)SIPLong_AsLong(sipPy));
return sipGetState(sipTransferObj);
#line 803 "C:\\Users\\marcus\\Downloads\\PyQt-gpl-5.4\\PyQt-gpl-5.4\\QtCore/sipQtCoreQEasingCurve.cpp"
}
示例3: convertTo_QHash_0100QString_0100QVariant
static int convertTo_QHash_0100QString_0100QVariant(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QHash<QString,QVariant> **sipCppPtr = reinterpret_cast<QHash<QString,QVariant> **>(sipCppPtrV);
#line 84 "/home/vikky/Desktop/DVCS/stuff/scrapy/soft/PyQt-x11-gpl-4.11.4/sip/QtCore/qhash.sip"
PyObject *t1obj, *t2obj;
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, &t1obj, &t2obj))
{
if (!sipCanConvertToType(t1obj, sipType_QString, SIP_NOT_NONE))
return 0;
if (!sipCanConvertToType(t2obj, sipType_QVariant, SIP_NOT_NONE))
return 0;
}
return 1;
}
QHash<QString, QVariant> *qm = new QHash<QString, QVariant>;
while (PyDict_Next(sipPy, &i, &t1obj, &t2obj))
{
int state1, state2;
QString *t1 = reinterpret_cast<QString *>(sipConvertToType(t1obj, sipType_QString, sipTransferObj, SIP_NOT_NONE, &state1, sipIsErr));
QVariant *t2 = reinterpret_cast<QVariant *>(sipConvertToType(t2obj, sipType_QVariant, sipTransferObj, SIP_NOT_NONE, &state2, sipIsErr));
if (*sipIsErr)
{
sipReleaseType(t1, sipType_QString, state1);
sipReleaseType(t2, sipType_QVariant, state2);
delete qm;
return 0;
}
qm->insert(*t1, *t2);
sipReleaseType(t1, sipType_QString, state1);
sipReleaseType(t2, sipType_QVariant, state2);
}
*sipCppPtr = qm;
return sipGetState(sipTransferObj);
#line 131 "/home/vikky/Desktop/DVCS/stuff/scrapy/soft/PyQt-x11-gpl-4.11.4/QtCore/sipQtCoreQHash0100QString0100QVariant.cpp"
}
示例4: convertTo_QMap_0100QDate_0100QTextCharFormat
static int convertTo_QMap_0100QDate_0100QTextCharFormat(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QMap<QDate,QTextCharFormat> **sipCppPtr = reinterpret_cast<QMap<QDate,QTextCharFormat> **>(sipCppPtrV);
#line 84 "sip/QtCore/qmap.sip"
PyObject *t1obj, *t2obj;
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, &t1obj, &t2obj))
{
if (!sipCanConvertToType(t1obj, sipType_QDate, SIP_NOT_NONE))
return 0;
if (!sipCanConvertToType(t2obj, sipType_QTextCharFormat, SIP_NOT_NONE))
return 0;
}
return 1;
}
QMap<QDate, QTextCharFormat> *qm = new QMap<QDate, QTextCharFormat>;
while (PyDict_Next(sipPy, &i, &t1obj, &t2obj))
{
int state1, state2;
QDate *t1 = reinterpret_cast<QDate *>(sipConvertToType(t1obj, sipType_QDate, sipTransferObj, SIP_NOT_NONE, &state1, sipIsErr));
QTextCharFormat *t2 = reinterpret_cast<QTextCharFormat *>(sipConvertToType(t2obj, sipType_QTextCharFormat, sipTransferObj, SIP_NOT_NONE, &state2, sipIsErr));
if (*sipIsErr)
{
sipReleaseType(t1, sipType_QDate, state1);
sipReleaseType(t2, sipType_QTextCharFormat, state2);
delete qm;
return 0;
}
qm->insert(*t1, *t2);
sipReleaseType(t1, sipType_QDate, state1);
sipReleaseType(t2, sipType_QTextCharFormat, state2);
}
*sipCppPtr = qm;
return sipGetState(sipTransferObj);
#line 125 "/home/vikky/Desktop/DVCS/stuff/scrapy/soft/PyQt-x11-gpl-4.11.4/QtGui/sipQtGuiQMap0100QDate0100QTextCharFormat.cpp"
}
示例5: convertTo_std_pair_0100tlp_Coord_0100tlp_Coord
static int convertTo_std_pair_0100tlp_Coord_0100tlp_Coord(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
std::pair<tlp::Coord,tlp::Coord> **sipCppPtr = reinterpret_cast<std::pair<tlp::Coord,tlp::Coord> **>(sipCppPtrV);
#line 33 "/home/kdbanman/browseRDF/tulip-3.8.0-src/library/tulip-python/tulip/../stl/pair.sip"
PyObject *itm1 = NULL;
PyObject *itm2 = NULL;
if (sipIsErr == NULL) {
if (!(PyTuple_Check(sipPy) && PyTuple_Size(sipPy) == 2))
return 0;
itm1 = PyTuple_GetItem(sipPy, 0);
itm2 = PyTuple_GetItem(sipPy, 1);
bool ok = sipCanConvertToType(itm1, sipType_tlp_Coord, SIP_NOT_NONE);
ok = ok && sipCanConvertToType(itm2, sipType_tlp_Coord, SIP_NOT_NONE);
if (!ok) {
return 0;
}
return 1;
}
itm1 = PyTuple_GetItem(sipPy, 0);
itm2 = PyTuple_GetItem(sipPy, 1);
int t1State = 0;
int t2State = 0;
tlp::Coord *t1 = reinterpret_cast<tlp::Coord *>(sipConvertToType(itm1, sipType_tlp_Coord, sipTransferObj, SIP_NOT_NONE, &t1State, sipIsErr));
tlp::Coord *t2 = reinterpret_cast<tlp::Coord *>(sipConvertToType(itm2, sipType_tlp_Coord, sipTransferObj, SIP_NOT_NONE, &t2State, sipIsErr));
if (*sipIsErr) {
sipReleaseType(t1, sipType_tlp_Coord, t1State);
sipReleaseType(t2, sipType_tlp_Coord, t2State);
return 0;
}
std::pair<tlp::Coord, tlp::Coord> *p = new std::pair<tlp::Coord, tlp::Coord>(*t1, *t2);
sipReleaseType(t1, sipType_tlp_Coord, t1State);
sipReleaseType(t2, sipType_tlp_Coord, t2State);
*sipCppPtr = p;
return sipGetState(sipTransferObj);
#line 97 "/home/kdbanman/browseRDF/tulip-3.8.0-src/build/library/tulip-python/tulip/siptulipstdpair0100tlpCoord0100tlpCoord.cpp"
}
示例6: convertTo_QDate
static int convertTo_QDate(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QDate **sipCppPtr = reinterpret_cast<QDate **>(sipCppPtrV);
#line 39 "C:\\Users\\marcus\\Downloads\\PyQt-gpl-5.4\\PyQt-gpl-5.4\\sip/QtCore/qdatetime.sip"
if (!PyDateTimeAPI)
PyDateTime_IMPORT;
// Allow a Python date object whenever a QDate is expected.
if (sipIsErr == NULL)
return (PyDate_Check(sipPy) ||
sipCanConvertToType(sipPy, sipType_QDate, SIP_NO_CONVERTORS));
if (PyDate_Check(sipPy))
{
*sipCppPtr = new QDate(PyDateTime_GET_YEAR(sipPy),
PyDateTime_GET_MONTH(sipPy),
PyDateTime_GET_DAY(sipPy));
return sipGetState(sipTransferObj);
}
*sipCppPtr = reinterpret_cast<QDate *>(sipConvertToType(sipPy, sipType_QDate, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr));
return 0;
#line 1308 "C:\\Users\\marcus\\Downloads\\PyQt-gpl-5.4\\PyQt-gpl-5.4\\QtCore/sipQtCoreQDate.cpp"
}
示例7: convertTo_QUrl_FormattingOptions
static int convertTo_QUrl_FormattingOptions(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QUrl::FormattingOptions **sipCppPtr = reinterpret_cast<QUrl::FormattingOptions **>(sipCppPtrV);
#line 77 "/home/vikky/Desktop/DVCS/stuff/scrapy/soft/PyQt-x11-gpl-4.11.4/sip/QtCore/qurl.sip"
// Allow an instance of the base enums whenever a QUrl::FormattingOptions is expected.
if (sipIsErr == NULL)
return (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_QUrl_UrlFormattingOption)) ||
PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_QUrl_ComponentFormattingOption)) ||
sipCanConvertToType(sipPy, sipType_QUrl_FormattingOptions, SIP_NO_CONVERTORS));
if (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_QUrl_UrlFormattingOption)) ||
PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_QUrl_ComponentFormattingOption)))
{
*sipCppPtr = new QUrl::FormattingOptions(int(SIPLong_AsLong(sipPy)));
return sipGetState(sipTransferObj);
}
*sipCppPtr = reinterpret_cast<QUrl::FormattingOptions *>(sipConvertToType(sipPy, sipType_QUrl_FormattingOptions, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr));
return 0;
#line 459 "/home/vikky/Desktop/DVCS/stuff/scrapy/soft/PyQt-x11-gpl-4.11.4/QtCore/sipQtCoreQUrlFormattingOptions.cpp"
}
示例8: convertTo_QVector_0600QPair_2400_0100QVariant
static int convertTo_QVector_0600QPair_2400_0100QVariant(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QVector<QPair<qreal,QVariant> > **sipCppPtr = reinterpret_cast<QVector<QPair<qreal,QVariant> > **>(sipCppPtrV);
#line 285 "/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)
{
PyObject *tup = PyList_GET_ITEM(sipPy, i);
if (PyTuple_Size(tup) != 2)
return 0;
if (!sipCanConvertToType(PyTuple_GET_ITEM(tup, 1), sipType_QVariant, SIP_NOT_NONE))
return 0;
}
return 1;
}
QVector<QPair<qreal, QVariant> > *qv = new QVector<QPair<qreal, QVariant> >;
for (SIP_SSIZE_T i = 0; i < PyList_GET_SIZE(sipPy); ++i)
{
PyObject *tup = PyList_GET_ITEM(sipPy, i);
int state;
QVariant *s;
QPair<qreal, QVariant> p;
p.first = PyFloat_AsDouble(PyTuple_GET_ITEM(tup, 0));
s = reinterpret_cast<QVariant *>(sipConvertToType(PyTuple_GET_ITEM(tup, 1), sipType_QVariant, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
if (*sipIsErr)
{
sipReleaseType(s, sipType_QVariant, state);
delete qv;
return 0;
}
p.second = *s;
qv->append(p);
sipReleaseType(s, sipType_QVariant, state);
}
*sipCppPtr = qv;
return sipGetState(sipTransferObj);
#line 131 "/Users/Kunwiji/Dropbox/Spectroscopy_paper/PyQt-mac-gpl-4.11.2/QtCore/sipQtCoreQVector0600QPair24000100QVariant.cpp"
}
示例9: convertTo_QList_0100QModelIndex
static int convertTo_QList_0100QModelIndex(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
QList<QModelIndex> **sipCppPtr = reinterpret_cast<QList<QModelIndex> **>(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_QModelIndex, SIP_NOT_NONE));
Py_XDECREF(itm);
if (!ok)
return 0;
}
return 1;
}
QList<QModelIndex> *ql = new QList<QModelIndex>;
len = PySequence_Size(sipPy);
for (SIP_SSIZE_T i = 0; i < len; ++i)
{
PyObject *itm = PySequence_ITEM(sipPy, i);
int state;
QModelIndex *t = reinterpret_cast<QModelIndex *>(sipConvertToType(itm, sipType_QModelIndex, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
Py_DECREF(itm);
if (*sipIsErr)
{
sipReleaseType(t, sipType_QModelIndex, state);
delete ql;
return 0;
}
ql->append(*t);
sipReleaseType(t, sipType_QModelIndex, state);
}
*sipCppPtr = ql;
return sipGetState(sipTransferObj);
#line 123 "/home/vikky/Desktop/DVCS/stuff/scrapy/soft/PyQt-x11-gpl-4.11.4/QtCore/sipQtCoreQList0100QModelIndex.cpp"
}
示例10: 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"
}
示例11: 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"
}
示例12: 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/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_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/thais/Faculdade/TCC/NEW/PyQt4_gpl_x11-4.12/QtCore/sipQtCoreQList0100QLocale.cpp"
}
示例13: 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"
}
示例14: 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"
}
示例15: 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"
}