PythonQtWrapper_QFile.cpp
735 lines
| 24.2 KiB
| text/x-c
|
CppLexer
|
r13 | #include "PythonQtWrapper_QFile.h" | ||
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
|
r13 | #include <QVariant> | ||
#include <qbytearray.h> | ||||
#include <qcoreevent.h> | ||||
#include <qfile.h> | ||||
#include <qlist.h> | ||||
#include <qobject.h> | ||||
|
r24 | bool PythonQtShell_QFile::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_QFile::staticMetaObject, | ||||
"atEnd(QFile*)"); | ||||
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 QFile::atEnd(); | ||||
} | ||||
qint64 PythonQtShell_QFile::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_QFile::staticMetaObject, | ||||
"bytesAvailable(QFile*)"); | ||||
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 QFile::bytesAvailable(); | ||||
} | ||||
qint64 PythonQtShell_QFile::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_QFile::staticMetaObject, | ||||
"bytesToWrite(QFile*)"); | ||||
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 QFile::bytesToWrite(); | ||||
} | ||||
bool PythonQtShell_QFile::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_QFile::staticMetaObject, | ||||
"canReadLine(QFile*)"); | ||||
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 QFile::canReadLine(); | ||||
} | ||||
void PythonQtShell_QFile::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_QFile::staticMetaObject, | ||||
"childEvent(QFile*,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; | ||||
} | ||||
} | ||||
QFile::childEvent(arg__1); | ||||
} | ||||
void PythonQtShell_QFile::close() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "close"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QFile::staticMetaObject, | ||||
"close(QFile*)"); | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QFile::close(); | ||||
} | ||||
void PythonQtShell_QFile::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_QFile::staticMetaObject, | ||||
"customEvent(QFile*,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; | ||||
} | ||||
} | ||||
QFile::customEvent(arg__1); | ||||
} | ||||
bool PythonQtShell_QFile::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_QFile::staticMetaObject, | ||||
"event(QFile*,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 QFile::event(arg__1); | ||||
} | ||||
bool PythonQtShell_QFile::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_QFile::staticMetaObject, | ||||
"eventFilter(QFile*,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 QFile::eventFilter(arg__1, arg__2); | ||||
} | ||||
QAbstractFileEngine* PythonQtShell_QFile::fileEngine() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "fileEngine"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QFile::staticMetaObject, | ||||
"fileEngine(QFile*)"); | ||||
QAbstractFileEngine* 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 = *((QAbstractFileEngine* *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QFile::fileEngine(); | ||||
} | ||||
bool PythonQtShell_QFile::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_QFile::staticMetaObject, | ||||
"isSequential(QFile*)"); | ||||
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 QFile::isSequential(); | ||||
} | ||||
bool PythonQtShell_QFile::open(QIODevice::OpenMode flags) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "open"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QFile::staticMetaObject, | ||||
"open(QFile*,QIODevice::OpenMode )"); | ||||
bool returnValue; | ||||
void* args[2] = {NULL, (void*)&flags}; | ||||
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 QFile::open(flags); | ||||
} | ||||
qint64 PythonQtShell_QFile::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_QFile::staticMetaObject, | ||||
"pos(QFile*)"); | ||||
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 QFile::pos(); | ||||
} | ||||
qint64 PythonQtShell_QFile::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_QFile::staticMetaObject, | ||||
"readData(QFile*,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 QFile::readData(data, maxlen); | ||||
} | ||||
qint64 PythonQtShell_QFile::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_QFile::staticMetaObject, | ||||
"readLineData(QFile*,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 QFile::readLineData(data, maxlen); | ||||
} | ||||
bool PythonQtShell_QFile::reset() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "reset"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QFile::staticMetaObject, | ||||
"reset(QFile*)"); | ||||
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 QFile::reset(); | ||||
} | ||||
bool PythonQtShell_QFile::seek(qint64 offset) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "seek"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QFile::staticMetaObject, | ||||
"seek(QFile*,qint64 )"); | ||||
bool returnValue; | ||||
void* args[2] = {NULL, (void*)&offset}; | ||||
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 QFile::seek(offset); | ||||
} | ||||
qint64 PythonQtShell_QFile::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_QFile::staticMetaObject, | ||||
"size(QFile*)"); | ||||
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 QFile::size(); | ||||
} | ||||
void PythonQtShell_QFile::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_QFile::staticMetaObject, | ||||
"timerEvent(QFile*,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; | ||||
} | ||||
} | ||||
QFile::timerEvent(arg__1); | ||||
} | ||||
bool PythonQtShell_QFile::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_QFile::staticMetaObject, | ||||
"waitForBytesWritten(QFile*,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 QFile::waitForBytesWritten(msecs); | ||||
} | ||||
bool PythonQtShell_QFile::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_QFile::staticMetaObject, | ||||
"waitForReadyRead(QFile*,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 QFile::waitForReadyRead(msecs); | ||||
} | ||||
qint64 PythonQtShell_QFile::writeData(const char* data, qint64 len) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "writeData"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QFile::staticMetaObject, | ||||
"writeData(QFile*,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; | ||||
} | ||||
} | ||||
return QFile::writeData(data, len); | ||||
} | ||||
|
r13 | QFile* PythonQtWrapper_QFile::new_QFile() | ||
{ | ||||
|
r24 | return new PythonQtShell_QFile(); } | ||
|
r13 | |||
QFile* PythonQtWrapper_QFile::new_QFile(QObject* parent) | ||||
{ | ||||
|
r24 | return new PythonQtShell_QFile(parent); } | ||
|
r13 | |||
QFile* PythonQtWrapper_QFile::new_QFile(const QString& name) | ||||
{ | ||||
|
r24 | return new PythonQtShell_QFile(name); } | ||
|
r13 | |||
QFile* PythonQtWrapper_QFile::new_QFile(const QString& name, QObject* parent) | ||||
{ | ||||
|
r24 | return new PythonQtShell_QFile(name, parent); } | ||
|
r13 | |||
|
r28 | bool PythonQtWrapper_QFile::static_QFile_link(const QString& oldname, const QString& newName) | ||
|
r13 | { | ||
|
r28 | return QFile::link(oldname, newName); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QFile::resize(QFile* theWrappedObject, qint64 sz) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->resize(sz); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QFile::setPermissions(QFile* theWrappedObject, QFile::Permissions permissionSpec) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->setPermissions(permissionSpec); | ||
|
r13 | } | ||
|
r28 | QString PythonQtWrapper_QFile::fileName(QFile* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->fileName(); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QFile::static_QFile_rename(const QString& oldName, const QString& newName) | ||
|
r13 | { | ||
|
r28 | return QFile::rename(oldName, newName); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QFile::static_QFile_resize(const QString& filename, qint64 sz) | ||
|
r13 | { | ||
|
r28 | return QFile::resize(filename, sz); | ||
|
r13 | } | ||
|
r28 | qint64 PythonQtWrapper_QFile::readLineData(QFile* theWrappedObject, char* data, qint64 maxlen) | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QFile*)theWrappedObject)->promoted_readLineData(data, maxlen); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QFile::unsetError(QFile* theWrappedObject) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->unsetError(); | ||
|
r13 | } | ||
|
r28 | QString PythonQtWrapper_QFile::static_QFile_decodeName(const QByteArray& localFileName) | ||
|
r13 | { | ||
|
r28 | return QFile::decodeName(localFileName); | ||
|
r24 | } | ||
|
r28 | bool PythonQtWrapper_QFile::isSequential(QFile* theWrappedObject) const | ||
|
r24 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QFile*)theWrappedObject)->promoted_isSequential(); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QFile::handle(QFile* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->handle(); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QFile::seek(QFile* theWrappedObject, qint64 offset) | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QFile*)theWrappedObject)->promoted_seek(offset); | ||
|
r13 | } | ||
|
r28 | QFile::Permissions PythonQtWrapper_QFile::static_QFile_permissions(const QString& filename) | ||
|
r13 | { | ||
|
r28 | return QFile::permissions(filename); | ||
|
r13 | } | ||
|
r28 | QByteArray PythonQtWrapper_QFile::static_QFile_encodeName(const QString& fileName) | ||
|
r13 | { | ||
|
r28 | return QFile::encodeName(fileName); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QFile::close(QFile* theWrappedObject) | ||
|
r13 | { | ||
|
r28 | ((PythonQtPublicPromoter_QFile*)theWrappedObject)->promoted_close(); | ||
|
r13 | } | ||
|
r28 | QString PythonQtWrapper_QFile::static_QFile_symLinkTarget(const QString& fileName) | ||
|
r13 | { | ||
|
r28 | return QFile::symLinkTarget(fileName); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QFile::copy(QFile* theWrappedObject, const QString& newName) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->copy(newName); | ||
|
r13 | } | ||
|
r28 | QFile::Permissions PythonQtWrapper_QFile::permissions(QFile* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->permissions(); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QFile::atEnd(QFile* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QFile*)theWrappedObject)->promoted_atEnd(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QFile::setFileName(QFile* theWrappedObject, const QString& name) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setFileName(name); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QFile::static_QFile_setPermissions(const QString& filename, QFile::Permissions permissionSpec) | ||
|
r13 | { | ||
|
r28 | return QFile::setPermissions(filename, permissionSpec); | ||
|
r13 | } | ||
|
r28 | qint64 PythonQtWrapper_QFile::size(QFile* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QFile*)theWrappedObject)->promoted_size(); | ||
|
r13 | } | ||
|
r28 | QFile::FileError PythonQtWrapper_QFile::error(QFile* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->error(); | ||
|
r13 | } | ||
|
r28 | QAbstractFileEngine* PythonQtWrapper_QFile::fileEngine(QFile* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QFile*)theWrappedObject)->promoted_fileEngine(); | ||
|
r13 | } | ||
|
r28 | qint64 PythonQtWrapper_QFile::pos(QFile* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QFile*)theWrappedObject)->promoted_pos(); | ||
|
r13 | } | ||
|
r28 | QString PythonQtWrapper_QFile::symLinkTarget(QFile* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->symLinkTarget(); | ||
|
r13 | } | ||
|
r28 | qint64 PythonQtWrapper_QFile::writeData(QFile* theWrappedObject, const char* data, qint64 len) | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QFile*)theWrappedObject)->promoted_writeData(data, len); | ||
|
r13 | } | ||
|
r28 | qint64 PythonQtWrapper_QFile::readData(QFile* theWrappedObject, char* data, qint64 maxlen) | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QFile*)theWrappedObject)->promoted_readData(data, maxlen); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QFile::static_QFile_remove(const QString& fileName) | ||
|
r13 | { | ||
|
r28 | return QFile::remove(fileName); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QFile::static_QFile_copy(const QString& fileName, const QString& newName) | ||
|
r13 | { | ||
|
r28 | return QFile::copy(fileName, newName); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QFile::static_QFile_exists(const QString& fileName) | ||
|
r13 | { | ||
|
r28 | return QFile::exists(fileName); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QFile::flush(QFile* theWrappedObject) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->flush(); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QFile::link(QFile* theWrappedObject, const QString& newName) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->link(newName); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QFile::rename(QFile* theWrappedObject, const QString& newName) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->rename(newName); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QFile::remove(QFile* theWrappedObject) | ||
|
r24 | { | ||
|
r28 | return theWrappedObject->remove(); | ||
|
r24 | } | ||
|
r28 | bool PythonQtWrapper_QFile::exists(QFile* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->exists(); | ||
|
r24 | } | ||
|
r28 | bool PythonQtWrapper_QFile::open(QFile* theWrappedObject, QIODevice::OpenMode flags) | ||
|
r24 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QFile*)theWrappedObject)->promoted_open(flags); | ||
|
r13 | } | ||