PythonQtWrapper_QFtp.cpp
252 lines
| 7.5 KiB
| text/x-c
|
CppLexer
|
r13 | #include "PythonQtWrapper_QFtp.h" | ||
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
|
r13 | #include <QVariant> | ||
#include <qbytearray.h> | ||||
#include <qcoreevent.h> | ||||
#include <qftp.h> | ||||
#include <qiodevice.h> | ||||
#include <qlist.h> | ||||
#include <qobject.h> | ||||
#include <qurlinfo.h> | ||||
|
r24 | void PythonQtShell_QFtp::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_QFtp::staticMetaObject, | ||||
"childEvent(QFtp*,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; | ||||
} | ||||
} | ||||
QFtp::childEvent(arg__1); | ||||
} | ||||
void PythonQtShell_QFtp::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_QFtp::staticMetaObject, | ||||
"customEvent(QFtp*,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; | ||||
} | ||||
} | ||||
QFtp::customEvent(arg__1); | ||||
} | ||||
bool PythonQtShell_QFtp::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_QFtp::staticMetaObject, | ||||
"event(QFtp*,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 QFtp::event(arg__1); | ||||
} | ||||
bool PythonQtShell_QFtp::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_QFtp::staticMetaObject, | ||||
"eventFilter(QFtp*,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 QFtp::eventFilter(arg__1, arg__2); | ||||
} | ||||
void PythonQtShell_QFtp::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_QFtp::staticMetaObject, | ||||
"timerEvent(QFtp*,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; | ||||
} | ||||
} | ||||
QFtp::timerEvent(arg__1); | ||||
} | ||||
|
r13 | QFtp* PythonQtWrapper_QFtp::new_QFtp(QObject* parent) | ||
{ | ||||
|
r24 | return new PythonQtShell_QFtp(parent); } | ||
|
r13 | |||
|
r28 | int PythonQtWrapper_QFtp::remove(QFtp* theWrappedObject, const QString& file) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->remove(file); | ||
|
r13 | } | ||
|
r28 | QFtp::Command PythonQtWrapper_QFtp::currentCommand(QFtp* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->currentCommand(); | ||
|
r13 | } | ||
|
r28 | QIODevice* PythonQtWrapper_QFtp::currentDevice(QFtp* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->currentDevice(); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QFtp::list(QFtp* theWrappedObject, const QString& dir) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->list(dir); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QFtp::put(QFtp* theWrappedObject, const QByteArray& data, const QString& file, QFtp::TransferType type) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->put(data, file, type); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QFtp::cd(QFtp* theWrappedObject, const QString& dir) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->cd(dir); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QFtp::connectToHost(QFtp* theWrappedObject, const QString& host, unsigned short port) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->connectToHost(host, port); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QFtp::hasPendingCommands(QFtp* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->hasPendingCommands(); | ||
|
r13 | } | ||
|
r28 | qint64 PythonQtWrapper_QFtp::read(QFtp* theWrappedObject, char* data, qint64 maxlen) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->read(data, maxlen); | ||
|
r13 | } | ||
|
r28 | qint64 PythonQtWrapper_QFtp::bytesAvailable(QFtp* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->bytesAvailable(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QFtp::clearPendingCommands(QFtp* theWrappedObject) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->clearPendingCommands(); | ||
|
r13 | } | ||
|
r28 | QFtp::State PythonQtWrapper_QFtp::state(QFtp* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->state(); | ||
|
r13 | } | ||
|
r28 | QByteArray PythonQtWrapper_QFtp::readAll(QFtp* theWrappedObject) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->readAll(); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QFtp::setProxy(QFtp* theWrappedObject, const QString& host, unsigned short port) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->setProxy(host, port); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QFtp::get(QFtp* theWrappedObject, const QString& file, QIODevice* dev, QFtp::TransferType type) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->get(file, dev, type); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QFtp::rawCommand(QFtp* theWrappedObject, const QString& command) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->rawCommand(command); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QFtp::currentId(QFtp* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->currentId(); | ||
|
r13 | } | ||
|
r28 | QFtp::Error PythonQtWrapper_QFtp::error(QFtp* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->error(); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QFtp::rename(QFtp* theWrappedObject, const QString& oldname, const QString& newname) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->rename(oldname, newname); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QFtp::mkdir(QFtp* theWrappedObject, const QString& dir) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->mkdir(dir); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QFtp::put(QFtp* theWrappedObject, QIODevice* dev, const QString& file, QFtp::TransferType type) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->put(dev, file, type); | ||
|
r13 | } | ||
|
r28 | QString PythonQtWrapper_QFtp::errorString(QFtp* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->errorString(); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QFtp::rmdir(QFtp* theWrappedObject, const QString& dir) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->rmdir(dir); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QFtp::close(QFtp* theWrappedObject) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->close(); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QFtp::setTransferMode(QFtp* theWrappedObject, QFtp::TransferMode mode) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->setTransferMode(mode); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QFtp::login(QFtp* theWrappedObject, const QString& user, const QString& password) | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->login(user, password); | ||
|
r13 | } | ||