PythonQtWrapper_QWebPluginFactory.cpp
227 lines
| 8.7 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include "PythonQtWrapper_QWebPluginFactory.h" | ||
florianlink
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
florianlink
|
r13 | #include <QVariant> | ||
#include <qbytearray.h> | ||||
#include <qcoreevent.h> | ||||
#include <qlist.h> | ||||
#include <qobject.h> | ||||
#include <qstringlist.h> | ||||
#include <qurl.h> | ||||
#include <qwebpluginfactory.h> | ||||
florianlink
|
r24 | void PythonQtShell_QWebPluginFactory::childEvent(QChildEvent* arg__1) | ||
florianlink
|
r13 | { | ||
florianlink
|
r24 | if (_wrapper) { | ||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "childEvent"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QWebPluginFactory::staticMetaObject, | ||||
"childEvent(QWebPluginFactory*,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; | ||||
} | ||||
florianlink
|
r13 | } | ||
florianlink
|
r24 | QWebPluginFactory::childEvent(arg__1); | ||
} | ||||
QObject* PythonQtShell_QWebPluginFactory::create(const QString& mimeType, const QUrl& url, const QStringList& argumentNames, const QStringList& argumentValues) const | ||||
florianlink
|
r13 | { | ||
florianlink
|
r24 | if (_wrapper) { | ||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "create"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QWebPluginFactory::staticMetaObject, | ||||
"create(QWebPluginFactory*,const QString& ,const QUrl& ,const QStringList& ,const QStringList& )"); | ||||
QObject* returnValue; | ||||
void* args[5] = {NULL, (void*)&mimeType, (void*)&url, (void*)&argumentNames, (void*)&argumentValues}; | ||||
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 = *((QObject* *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
florianlink
|
r13 | } | ||
florianlink
|
r24 | QObject* result; | ||
return result; | ||||
} | ||||
void PythonQtShell_QWebPluginFactory::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_QWebPluginFactory::staticMetaObject, | ||||
"customEvent(QWebPluginFactory*,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; | ||||
} | ||||
} | ||||
QWebPluginFactory::customEvent(arg__1); | ||||
} | ||||
bool PythonQtShell_QWebPluginFactory::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_QWebPluginFactory::staticMetaObject, | ||||
"event(QWebPluginFactory*,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 QWebPluginFactory::event(arg__1); | ||||
} | ||||
bool PythonQtShell_QWebPluginFactory::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_QWebPluginFactory::staticMetaObject, | ||||
"eventFilter(QWebPluginFactory*,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 QWebPluginFactory::eventFilter(arg__1, arg__2); | ||||
} | ||||
QList<QWebPluginFactory::Plugin > PythonQtShell_QWebPluginFactory::plugins() const | ||||
florianlink
|
r13 | { | ||
florianlink
|
r24 | if (_wrapper) { | ||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "plugins"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QWebPluginFactory::staticMetaObject, | ||||
"plugins(QWebPluginFactory*)"); | ||||
QList<QWebPluginFactory::Plugin > 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 = *((QList<QWebPluginFactory::Plugin > *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
florianlink
|
r13 | } | ||
florianlink
|
r24 | QList<QWebPluginFactory::Plugin > result; | ||
return result; | ||||
} | ||||
void PythonQtShell_QWebPluginFactory::refreshPlugins() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "refreshPlugins"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QWebPluginFactory::staticMetaObject, | ||||
"refreshPlugins(QWebPluginFactory*)"); | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QWebPluginFactory::refreshPlugins(); | ||||
} | ||||
bool PythonQtShell_QWebPluginFactory::supportsExtension(QWebPluginFactory::Extension extension) const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "supportsExtension"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QWebPluginFactory::staticMetaObject, | ||||
"supportsExtension(QWebPluginFactory*,QWebPluginFactory::Extension )"); | ||||
bool returnValue; | ||||
void* args[2] = {NULL, (void*)&extension}; | ||||
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 QWebPluginFactory::supportsExtension(extension); | ||||
} | ||||
void PythonQtShell_QWebPluginFactory::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_QWebPluginFactory::staticMetaObject, | ||||
"timerEvent(QWebPluginFactory*,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; | ||||
} | ||||
} | ||||
QWebPluginFactory::timerEvent(arg__1); | ||||
} | ||||
QWebPluginFactory* PythonQtWrapper_QWebPluginFactory::new_QWebPluginFactory(QObject* parent) | ||||
{ | ||||
return new PythonQtShell_QWebPluginFactory(parent); } | ||||
florianlink
|
r13 | |||
bool PythonQtWrapper_QWebPluginFactory::supportsExtension(QWebPluginFactory* theWrappedObject, QWebPluginFactory::Extension extension) const | ||||
{ | ||||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QWebPluginFactory*)theWrappedObject)->promoted_supportsExtension(extension); | ||
florianlink
|
r24 | } | ||
void PythonQtWrapper_QWebPluginFactory::refreshPlugins(QWebPluginFactory* theWrappedObject) | ||||
{ | ||||
florianlink
|
r28 | ((PythonQtPublicPromoter_QWebPluginFactory*)theWrappedObject)->promoted_refreshPlugins(); | ||
florianlink
|
r13 | } | ||