PythonQtWrapper_QIODevice.cpp
664 lines
| 22.6 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include "PythonQtWrapper_QIODevice.h" | ||
florianlink
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
florianlink
|
r13 | #include <QVariant> | ||
#include <qbytearray.h> | ||||
#include <qcoreevent.h> | ||||
#include <qiodevice.h> | ||||
#include <qlist.h> | ||||
#include <qobject.h> | ||||
florianlink
|
r24 | bool PythonQtShell_QIODevice::atEnd() const | ||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "atEnd"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QIODevice::staticMetaObject, | ||||
"atEnd(QIODevice*)"); | ||||
bool returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QIODevice::atEnd(); | ||||
} | ||||
qint64 PythonQtShell_QIODevice::bytesAvailable() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "bytesAvailable"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QIODevice::staticMetaObject, | ||||
"bytesAvailable(QIODevice*)"); | ||||
qint64 returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((qint64 *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QIODevice::bytesAvailable(); | ||||
} | ||||
qint64 PythonQtShell_QIODevice::bytesToWrite() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "bytesToWrite"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QIODevice::staticMetaObject, | ||||
"bytesToWrite(QIODevice*)"); | ||||
qint64 returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((qint64 *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QIODevice::bytesToWrite(); | ||||
} | ||||
bool PythonQtShell_QIODevice::canReadLine() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "canReadLine"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QIODevice::staticMetaObject, | ||||
"canReadLine(QIODevice*)"); | ||||
bool returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QIODevice::canReadLine(); | ||||
} | ||||
void PythonQtShell_QIODevice::childEvent(QChildEvent* arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "childEvent"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QIODevice::staticMetaObject, | ||||
"childEvent(QIODevice*,QChildEvent* )"); | ||||
void* args[2] = {NULL, (void*)&arg__1}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QIODevice::childEvent(arg__1); | ||||
} | ||||
void PythonQtShell_QIODevice::close() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "close"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QIODevice::staticMetaObject, | ||||
"close(QIODevice*)"); | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QIODevice::close(); | ||||
} | ||||
void PythonQtShell_QIODevice::customEvent(QEvent* arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "customEvent"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QIODevice::staticMetaObject, | ||||
"customEvent(QIODevice*,QEvent* )"); | ||||
void* args[2] = {NULL, (void*)&arg__1}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QIODevice::customEvent(arg__1); | ||||
} | ||||
bool PythonQtShell_QIODevice::event(QEvent* arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "event"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QIODevice::staticMetaObject, | ||||
"event(QIODevice*,QEvent* )"); | ||||
bool returnValue; | ||||
void* args[2] = {NULL, (void*)&arg__1}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QIODevice::event(arg__1); | ||||
} | ||||
bool PythonQtShell_QIODevice::eventFilter(QObject* arg__1, QEvent* arg__2) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "eventFilter"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QIODevice::staticMetaObject, | ||||
"eventFilter(QIODevice*,QObject* ,QEvent* )"); | ||||
bool returnValue; | ||||
void* args[3] = {NULL, (void*)&arg__1, (void*)&arg__2}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QIODevice::eventFilter(arg__1, arg__2); | ||||
} | ||||
bool PythonQtShell_QIODevice::isSequential() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "isSequential"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QIODevice::staticMetaObject, | ||||
"isSequential(QIODevice*)"); | ||||
bool returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QIODevice::isSequential(); | ||||
} | ||||
bool PythonQtShell_QIODevice::open(QIODevice::OpenMode mode) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "open"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QIODevice::staticMetaObject, | ||||
"open(QIODevice*,QIODevice::OpenMode )"); | ||||
bool returnValue; | ||||
void* args[2] = {NULL, (void*)&mode}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QIODevice::open(mode); | ||||
} | ||||
qint64 PythonQtShell_QIODevice::pos() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "pos"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QIODevice::staticMetaObject, | ||||
"pos(QIODevice*)"); | ||||
qint64 returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((qint64 *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QIODevice::pos(); | ||||
} | ||||
qint64 PythonQtShell_QIODevice::readData(char* data, qint64 maxlen) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "readData"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QIODevice::staticMetaObject, | ||||
"readData(QIODevice*,char* ,qint64 )"); | ||||
qint64 returnValue; | ||||
void* args[3] = {NULL, (void*)&data, (void*)&maxlen}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((qint64 *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
qint64 result; | ||||
return result; | ||||
} | ||||
qint64 PythonQtShell_QIODevice::readLineData(char* data, qint64 maxlen) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "readLineData"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QIODevice::staticMetaObject, | ||||
"readLineData(QIODevice*,char* ,qint64 )"); | ||||
qint64 returnValue; | ||||
void* args[3] = {NULL, (void*)&data, (void*)&maxlen}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((qint64 *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QIODevice::readLineData(data, maxlen); | ||||
} | ||||
bool PythonQtShell_QIODevice::reset() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "reset"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QIODevice::staticMetaObject, | ||||
"reset(QIODevice*)"); | ||||
bool returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QIODevice::reset(); | ||||
} | ||||
bool PythonQtShell_QIODevice::seek(qint64 pos) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "seek"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QIODevice::staticMetaObject, | ||||
"seek(QIODevice*,qint64 )"); | ||||
bool returnValue; | ||||
void* args[2] = {NULL, (void*)&pos}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QIODevice::seek(pos); | ||||
} | ||||
qint64 PythonQtShell_QIODevice::size() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "size"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QIODevice::staticMetaObject, | ||||
"size(QIODevice*)"); | ||||
qint64 returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((qint64 *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QIODevice::size(); | ||||
} | ||||
void PythonQtShell_QIODevice::timerEvent(QTimerEvent* arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "timerEvent"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QIODevice::staticMetaObject, | ||||
"timerEvent(QIODevice*,QTimerEvent* )"); | ||||
void* args[2] = {NULL, (void*)&arg__1}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QIODevice::timerEvent(arg__1); | ||||
} | ||||
bool PythonQtShell_QIODevice::waitForBytesWritten(int msecs) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "waitForBytesWritten"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QIODevice::staticMetaObject, | ||||
"waitForBytesWritten(QIODevice*,int )"); | ||||
bool returnValue; | ||||
void* args[2] = {NULL, (void*)&msecs}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QIODevice::waitForBytesWritten(msecs); | ||||
} | ||||
bool PythonQtShell_QIODevice::waitForReadyRead(int msecs) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "waitForReadyRead"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QIODevice::staticMetaObject, | ||||
"waitForReadyRead(QIODevice*,int )"); | ||||
bool returnValue; | ||||
void* args[2] = {NULL, (void*)&msecs}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QIODevice::waitForReadyRead(msecs); | ||||
} | ||||
qint64 PythonQtShell_QIODevice::writeData(const char* data, qint64 len) | ||||
florianlink
|
r13 | { | ||
florianlink
|
r24 | if (_wrapper) { | ||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "writeData"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QIODevice::staticMetaObject, | ||||
"writeData(QIODevice*,const char* ,qint64 )"); | ||||
qint64 returnValue; | ||||
void* args[3] = {NULL, (void*)&data, (void*)&len}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((qint64 *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
florianlink
|
r13 | } | ||
florianlink
|
r24 | qint64 result; | ||
return result; | ||||
} | ||||
QIODevice* PythonQtWrapper_QIODevice::new_QIODevice() | ||||
{ | ||||
return new PythonQtShell_QIODevice(); } | ||||
florianlink
|
r13 | |||
florianlink
|
r24 | QIODevice* PythonQtWrapper_QIODevice::new_QIODevice(QObject* parent) | ||
{ | ||||
return new PythonQtShell_QIODevice(parent); } | ||||
florianlink
|
r28 | QByteArray PythonQtWrapper_QIODevice::peek(QIODevice* theWrappedObject, qint64 maxlen) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->peek(maxlen); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QIODevice::open(QIODevice* theWrappedObject, QIODevice::OpenMode mode) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QIODevice*)theWrappedObject)->promoted_open(mode); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | qint64 PythonQtWrapper_QIODevice::size(QIODevice* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QIODevice*)theWrappedObject)->promoted_size(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | qint64 PythonQtWrapper_QIODevice::readLineData(QIODevice* theWrappedObject, char* data, qint64 maxlen) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QIODevice*)theWrappedObject)->promoted_readLineData(data, maxlen); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QIODevice::isOpen(QIODevice* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->isOpen(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QIODevice::close(QIODevice* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | ((PythonQtPublicPromoter_QIODevice*)theWrappedObject)->promoted_close(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | qint64 PythonQtWrapper_QIODevice::bytesAvailable(QIODevice* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QIODevice*)theWrappedObject)->promoted_bytesAvailable(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QIODevice::OpenMode PythonQtWrapper_QIODevice::openMode(QIODevice* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->openMode(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QByteArray PythonQtWrapper_QIODevice::read(QIODevice* theWrappedObject, qint64 maxlen) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->read(maxlen); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QIODevice::isTextModeEnabled(QIODevice* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->isTextModeEnabled(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QIODevice::isReadable(QIODevice* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->isReadable(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QIODevice::isSequential(QIODevice* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QIODevice*)theWrappedObject)->promoted_isSequential(); | ||
florianlink
|
r24 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QIODevice::atEnd(QIODevice* theWrappedObject) const | ||
florianlink
|
r24 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QIODevice*)theWrappedObject)->promoted_atEnd(); | ||
florianlink
|
r24 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QIODevice::seek(QIODevice* theWrappedObject, qint64 pos) | ||
florianlink
|
r24 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QIODevice*)theWrappedObject)->promoted_seek(pos); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QIODevice::getChar(QIODevice* theWrappedObject, char* c) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->getChar(c); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QByteArray PythonQtWrapper_QIODevice::readLine(QIODevice* theWrappedObject, qint64 maxlen) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->readLine(maxlen); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QIODevice::canReadLine(QIODevice* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QIODevice*)theWrappedObject)->promoted_canReadLine(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | qint64 PythonQtWrapper_QIODevice::write(QIODevice* theWrappedObject, const QByteArray& data) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->write(data); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QIODevice::reset(QIODevice* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QIODevice*)theWrappedObject)->promoted_reset(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QIODevice::setTextModeEnabled(QIODevice* theWrappedObject, bool enabled) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setTextModeEnabled(enabled); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QIODevice::ungetChar(QIODevice* theWrappedObject, char c) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->ungetChar(c); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QIODevice::waitForReadyRead(QIODevice* theWrappedObject, int msecs) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QIODevice*)theWrappedObject)->promoted_waitForReadyRead(msecs); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | qint64 PythonQtWrapper_QIODevice::bytesToWrite(QIODevice* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QIODevice*)theWrappedObject)->promoted_bytesToWrite(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QIODevice::isWritable(QIODevice* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->isWritable(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | qint64 PythonQtWrapper_QIODevice::pos(QIODevice* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QIODevice*)theWrappedObject)->promoted_pos(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QIODevice::putChar(QIODevice* theWrappedObject, char c) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->putChar(c); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QIODevice::waitForBytesWritten(QIODevice* theWrappedObject, int msecs) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QIODevice*)theWrappedObject)->promoted_waitForBytesWritten(msecs); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QString PythonQtWrapper_QIODevice::errorString(QIODevice* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->errorString(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QByteArray PythonQtWrapper_QIODevice::readAll(QIODevice* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->readAll(); | ||
florianlink
|
r13 | } | ||