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