PythonQtWrapper_QMimeData.cpp
321 lines
| 10.8 KiB
| text/x-c
|
CppLexer
|
r13 | #include "PythonQtWrapper_QMimeData.h" | ||
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
|
r13 | #include <QStringList> | ||
#include <QUrl> | ||||
#include <QVariant> | ||||
#include <qbytearray.h> | ||||
#include <qcoreevent.h> | ||||
#include <qlist.h> | ||||
#include <qmimedata.h> | ||||
#include <qobject.h> | ||||
#include <qstringlist.h> | ||||
#include <qurl.h> | ||||
|
r24 | void PythonQtShell_QMimeData::childEvent(QChildEvent* arg__1) | ||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "childEvent"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
|
r73 | static const char* argumentList[] ={"" , "QChildEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
|
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; | ||||
} | ||||
} | ||||
QMimeData::childEvent(arg__1); | ||||
} | ||||
void PythonQtShell_QMimeData::customEvent(QEvent* arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "customEvent"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
|
r73 | static const char* argumentList[] ={"" , "QEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
|
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; | ||||
} | ||||
} | ||||
QMimeData::customEvent(arg__1); | ||||
} | ||||
bool PythonQtShell_QMimeData::event(QEvent* arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "event"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
|
r73 | static const char* argumentList[] ={"bool" , "QEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
bool returnValue; | ||||
|
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) { | ||||
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("event", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QMimeData::event(arg__1); | ||||
} | ||||
bool PythonQtShell_QMimeData::eventFilter(QObject* arg__1, QEvent* arg__2) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "eventFilter"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
|
r73 | static const char* argumentList[] ={"bool" , "QObject*" , "QEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(3, argumentList); | ||||
bool returnValue; | ||||
|
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) { | ||||
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("eventFilter", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QMimeData::eventFilter(arg__1, arg__2); | ||||
} | ||||
QStringList PythonQtShell_QMimeData::formats() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "formats"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
|
r73 | static const char* argumentList[] ={"QStringList"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
QStringList returnValue; | ||||
|
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) { | ||||
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("formats", methodInfo, result); | ||||
} else { | ||||
returnValue = *((QStringList*)args[0]); | ||||
} | ||||
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QMimeData::formats(); | ||||
} | ||||
bool PythonQtShell_QMimeData::hasFormat(const QString& mimetype) const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "hasFormat"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
|
r73 | static const char* argumentList[] ={"bool" , "const QString&"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
bool returnValue; | ||||
|
r24 | void* args[2] = {NULL, (void*)&mimetype}; | ||
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) { | ||||
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("hasFormat", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QMimeData::hasFormat(mimetype); | ||||
} | ||||
QVariant PythonQtShell_QMimeData::retrieveData(const QString& mimetype, QVariant::Type preferredType) const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "retrieveData"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
|
r73 | static const char* argumentList[] ={"QVariant" , "const QString&" , "QVariant::Type"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(3, argumentList); | ||||
QVariant returnValue; | ||||
|
r24 | void* args[3] = {NULL, (void*)&mimetype, (void*)&preferredType}; | ||
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) { | ||||
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("retrieveData", methodInfo, result); | ||||
} else { | ||||
returnValue = *((QVariant*)args[0]); | ||||
} | ||||
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QMimeData::retrieveData(mimetype, preferredType); | ||||
} | ||||
void PythonQtShell_QMimeData::timerEvent(QTimerEvent* arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "timerEvent"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
|
r73 | static const char* argumentList[] ={"" , "QTimerEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
|
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; | ||||
} | ||||
} | ||||
QMimeData::timerEvent(arg__1); | ||||
} | ||||
|
r13 | QMimeData* PythonQtWrapper_QMimeData::new_QMimeData() | ||
{ | ||||
|
r24 | return new PythonQtShell_QMimeData(); } | ||
|
r13 | |||
|
r73 | void PythonQtWrapper_QMimeData::setColorData(QMimeData* theWrappedObject, const QVariant& color) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->setColorData(color)); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QMimeData::hasImage(QMimeData* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->hasImage()); | ||
|
r13 | } | ||
|
r73 | QString PythonQtWrapper_QMimeData::text(QMimeData* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->text()); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QMimeData::setData(QMimeData* theWrappedObject, const QString& mimetype, const QByteArray& data) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->setData(mimetype, data)); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QMimeData::removeFormat(QMimeData* theWrappedObject, const QString& mimetype) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->removeFormat(mimetype)); | ||
|
r13 | } | ||
|
r73 | QVariant PythonQtWrapper_QMimeData::colorData(QMimeData* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->colorData()); | ||
|
r13 | } | ||
|
r73 | bool PythonQtWrapper_QMimeData::hasColor(QMimeData* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->hasColor()); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QMimeData::setImageData(QMimeData* theWrappedObject, const QVariant& image) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->setImageData(image)); | ||
|
r13 | } | ||
|
r73 | QStringList PythonQtWrapper_QMimeData::formats(QMimeData* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( ((PythonQtPublicPromoter_QMimeData*)theWrappedObject)->promoted_formats()); | ||
|
r13 | } | ||
|
r73 | bool PythonQtWrapper_QMimeData::hasText(QMimeData* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->hasText()); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QMimeData::setText(QMimeData* theWrappedObject, const QString& text) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->setText(text)); | ||
|
r13 | } | ||
|
r73 | QList<QUrl > PythonQtWrapper_QMimeData::urls(QMimeData* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->urls()); | ||
|
r13 | } | ||
|
r73 | QByteArray PythonQtWrapper_QMimeData::data(QMimeData* theWrappedObject, const QString& mimetype) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->data(mimetype)); | ||
|
r13 | } | ||
|
r73 | bool PythonQtWrapper_QMimeData::hasHtml(QMimeData* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->hasHtml()); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QMimeData::clear(QMimeData* theWrappedObject) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->clear()); | ||
|
r13 | } | ||
|
r73 | bool PythonQtWrapper_QMimeData::hasFormat(QMimeData* theWrappedObject, const QString& mimetype) const | ||
|
r13 | { | ||
|
r73 | return ( ((PythonQtPublicPromoter_QMimeData*)theWrappedObject)->promoted_hasFormat(mimetype)); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QMimeData::hasUrls(QMimeData* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->hasUrls()); | ||
|
r13 | } | ||
|
r73 | QVariant PythonQtWrapper_QMimeData::imageData(QMimeData* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->imageData()); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QMimeData::setHtml(QMimeData* theWrappedObject, const QString& html) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->setHtml(html)); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QMimeData::setUrls(QMimeData* theWrappedObject, const QList<QUrl >& urls) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->setUrls(urls)); | ||
|
r13 | } | ||
|
r73 | QVariant PythonQtWrapper_QMimeData::retrieveData(QMimeData* theWrappedObject, const QString& mimetype, QVariant::Type preferredType) const | ||
|
r24 | { | ||
|
r73 | return ( ((PythonQtPublicPromoter_QMimeData*)theWrappedObject)->promoted_retrieveData(mimetype, preferredType)); | ||
|
r24 | } | ||
|
r73 | QString PythonQtWrapper_QMimeData::html(QMimeData* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->html()); | ||
|
r13 | } | ||