##// END OF EJS Templates
added methods to qt namespace...
added methods to qt namespace git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@71 ea8d5007-eb21-0410-b261-ccb3ea6e24a9

File last commit:

r28:cf202027b50b
r35:b8dce620ba5c
Show More
PythonQtWrapper_QSignalMapper.cpp
155 lines | 5.4 KiB | text/x-c | CppLexer
#include "PythonQtWrapper_QSignalMapper.h"
#include <PythonQtSignalReceiver.h>
#include <PythonQtMethodInfo.h>
#include <PythonQtConversion.h>
#include <QVariant>
#include <qbytearray.h>
#include <qcoreevent.h>
#include <qlist.h>
#include <qobject.h>
#include <qsignalmapper.h>
void PythonQtShell_QSignalMapper::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_QSignalMapper::staticMetaObject,
"childEvent(QSignalMapper*,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;
}
}
QSignalMapper::childEvent(arg__1);
}
void PythonQtShell_QSignalMapper::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_QSignalMapper::staticMetaObject,
"customEvent(QSignalMapper*,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;
}
}
QSignalMapper::customEvent(arg__1);
}
bool PythonQtShell_QSignalMapper::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_QSignalMapper::staticMetaObject,
"event(QSignalMapper*,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 QSignalMapper::event(arg__1);
}
bool PythonQtShell_QSignalMapper::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_QSignalMapper::staticMetaObject,
"eventFilter(QSignalMapper*,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 QSignalMapper::eventFilter(arg__1, arg__2);
}
void PythonQtShell_QSignalMapper::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_QSignalMapper::staticMetaObject,
"timerEvent(QSignalMapper*,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;
}
}
QSignalMapper::timerEvent(arg__1);
}
QSignalMapper* PythonQtWrapper_QSignalMapper::new_QSignalMapper(QObject* parent)
{
return new PythonQtShell_QSignalMapper(parent); }
QObject* PythonQtWrapper_QSignalMapper::mapping(QSignalMapper* theWrappedObject, int id) const
{
return theWrappedObject->mapping(id);
}
QObject* PythonQtWrapper_QSignalMapper::mapping(QSignalMapper* theWrappedObject, const QString& text) const
{
return theWrappedObject->mapping(text);
}
void PythonQtWrapper_QSignalMapper::setMapping(QSignalMapper* theWrappedObject, QObject* sender, int id)
{
theWrappedObject->setMapping(sender, id);
}
void PythonQtWrapper_QSignalMapper::removeMappings(QSignalMapper* theWrappedObject, QObject* sender)
{
theWrappedObject->removeMappings(sender);
}
void PythonQtWrapper_QSignalMapper::setMapping(QSignalMapper* theWrappedObject, QObject* sender, QObject* object)
{
theWrappedObject->setMapping(sender, object);
}
void PythonQtWrapper_QSignalMapper::setMapping(QSignalMapper* theWrappedObject, QObject* sender, const QString& text)
{
theWrappedObject->setMapping(sender, text);
}
QObject* PythonQtWrapper_QSignalMapper::mapping(QSignalMapper* theWrappedObject, QObject* object) const
{
return theWrappedObject->mapping(object);
}