##// END OF EJS Templates
added builtin support for variants etc., this will replace the direct includes in PythonQt...
added builtin support for variants etc., this will replace the direct includes in PythonQt git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@129 ea8d5007-eb21-0410-b261-ccb3ea6e24a9

File last commit:

r73:40dc86970256
r93:7b53f64eae84
Show More
PythonQtWrapper_QWidgetAction.cpp
214 lines | 7.7 KiB | text/x-c | CppLexer
#include "PythonQtWrapper_QWidgetAction.h"
#include <PythonQtSignalReceiver.h>
#include <PythonQtMethodInfo.h>
#include <PythonQtConversion.h>
#include <QVariant>
#include <qactiongroup.h>
#include <qbytearray.h>
#include <qcoreevent.h>
#include <qfont.h>
#include <qicon.h>
#include <qkeysequence.h>
#include <qlist.h>
#include <qmenu.h>
#include <qobject.h>
#include <qwidget.h>
#include <qwidgetaction.h>
void PythonQtShell_QWidgetAction::childEvent(QChildEvent* arg__1)
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "childEvent");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const char* argumentList[] ={"" , "QChildEvent*"};
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
void* args[2] = {NULL, (void*)&arg__1};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return;
}
}
QWidgetAction::childEvent(arg__1);
}
QWidget* PythonQtShell_QWidgetAction::createWidget(QWidget* parent)
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "createWidget");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const char* argumentList[] ={"QWidget*" , "QWidget*"};
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
QWidget* returnValue;
void* args[2] = {NULL, (void*)&parent};
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) {
if (args[0]==NULL) {
PythonQt::priv()->handleVirtualOverloadReturnError("createWidget", methodInfo, result);
} else {
returnValue = *((QWidget**)args[0]);
}
}
}
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return returnValue;
}
}
return QWidgetAction::createWidget(parent);
}
void PythonQtShell_QWidgetAction::customEvent(QEvent* arg__1)
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "customEvent");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const char* argumentList[] ={"" , "QEvent*"};
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
void* args[2] = {NULL, (void*)&arg__1};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return;
}
}
QWidgetAction::customEvent(arg__1);
}
void PythonQtShell_QWidgetAction::deleteWidget(QWidget* widget)
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "deleteWidget");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const char* argumentList[] ={"" , "QWidget*"};
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
void* args[2] = {NULL, (void*)&widget};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return;
}
}
QWidgetAction::deleteWidget(widget);
}
bool PythonQtShell_QWidgetAction::event(QEvent* arg__1)
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "event");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const char* argumentList[] ={"bool" , "QEvent*"};
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
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) {
if (args[0]==NULL) {
PythonQt::priv()->handleVirtualOverloadReturnError("event", methodInfo, result);
} else {
returnValue = *((bool*)args[0]);
}
}
}
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return returnValue;
}
}
return QWidgetAction::event(arg__1);
}
bool PythonQtShell_QWidgetAction::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 char* argumentList[] ={"bool" , "QObject*" , "QEvent*"};
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(3, argumentList);
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) {
if (args[0]==NULL) {
PythonQt::priv()->handleVirtualOverloadReturnError("eventFilter", methodInfo, result);
} else {
returnValue = *((bool*)args[0]);
}
}
}
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return returnValue;
}
}
return QWidgetAction::eventFilter(arg__1, arg__2);
}
void PythonQtShell_QWidgetAction::timerEvent(QTimerEvent* arg__1)
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "timerEvent");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const char* argumentList[] ={"" , "QTimerEvent*"};
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
void* args[2] = {NULL, (void*)&arg__1};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return;
}
}
QWidgetAction::timerEvent(arg__1);
}
QWidgetAction* PythonQtWrapper_QWidgetAction::new_QWidgetAction(QObject* parent)
{
return new PythonQtShell_QWidgetAction(parent); }
bool PythonQtWrapper_QWidgetAction::event(QWidgetAction* theWrappedObject, QEvent* arg__1)
{
return ( ((PythonQtPublicPromoter_QWidgetAction*)theWrappedObject)->promoted_event(arg__1));
}
QWidget* PythonQtWrapper_QWidgetAction::requestWidget(QWidgetAction* theWrappedObject, QWidget* parent)
{
return ( theWrappedObject->requestWidget(parent));
}
void PythonQtWrapper_QWidgetAction::deleteWidget(QWidgetAction* theWrappedObject, QWidget* widget)
{
( ((PythonQtPublicPromoter_QWidgetAction*)theWrappedObject)->promoted_deleteWidget(widget));
}
void PythonQtWrapper_QWidgetAction::releaseWidget(QWidgetAction* theWrappedObject, QWidget* widget)
{
( theWrappedObject->releaseWidget(widget));
}
QWidget* PythonQtWrapper_QWidgetAction::defaultWidget(QWidgetAction* theWrappedObject) const
{
return ( theWrappedObject->defaultWidget());
}
void PythonQtWrapper_QWidgetAction::setDefaultWidget(QWidgetAction* theWrappedObject, QWidget* w)
{
( theWrappedObject->setDefaultWidget(w));
}
QWidget* PythonQtWrapper_QWidgetAction::createWidget(QWidgetAction* theWrappedObject, QWidget* parent)
{
return ( ((PythonQtPublicPromoter_QWidgetAction*)theWrappedObject)->promoted_createWidget(parent));
}
bool PythonQtWrapper_QWidgetAction::eventFilter(QWidgetAction* theWrappedObject, QObject* arg__1, QEvent* arg__2)
{
return ( ((PythonQtPublicPromoter_QWidgetAction*)theWrappedObject)->promoted_eventFilter(arg__1, arg__2));
}