##// 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_QTranslator.cpp
190 lines | 7.1 KiB | text/x-c | CppLexer
#include "PythonQtWrapper_QTranslator.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 <qtranslator.h>
void PythonQtShell_QTranslator::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_QTranslator::staticMetaObject,
"childEvent(QTranslator*,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;
}
}
QTranslator::childEvent(arg__1);
}
void PythonQtShell_QTranslator::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_QTranslator::staticMetaObject,
"customEvent(QTranslator*,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;
}
}
QTranslator::customEvent(arg__1);
}
bool PythonQtShell_QTranslator::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_QTranslator::staticMetaObject,
"event(QTranslator*,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 QTranslator::event(arg__1);
}
bool PythonQtShell_QTranslator::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_QTranslator::staticMetaObject,
"eventFilter(QTranslator*,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 QTranslator::eventFilter(arg__1, arg__2);
}
bool PythonQtShell_QTranslator::isEmpty() const
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "isEmpty");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QTranslator::staticMetaObject,
"isEmpty(QTranslator*)");
bool 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 = *((bool *)args[0]);
}
}
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return returnValue;
}
}
return QTranslator::isEmpty();
}
void PythonQtShell_QTranslator::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_QTranslator::staticMetaObject,
"timerEvent(QTranslator*,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;
}
}
QTranslator::timerEvent(arg__1);
}
QString PythonQtShell_QTranslator::translate(const char* context, const char* sourceText, const char* comment) const
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "translate");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QTranslator::staticMetaObject,
"translate(QTranslator*,const char* ,const char* ,const char* )");
QString returnValue;
void* args[4] = {NULL, (void*)&context, (void*)&sourceText, (void*)&comment};
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 = *((QString *)args[0]);
}
}
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return returnValue;
}
}
return QTranslator::translate(context, sourceText, comment);
}
QTranslator* PythonQtWrapper_QTranslator::new_QTranslator(QObject* parent)
{
return new PythonQtShell_QTranslator(parent); }
bool PythonQtWrapper_QTranslator::load(QTranslator* theWrappedObject, const uchar* data, int len)
{
return theWrappedObject->load(data, len);
}
bool PythonQtWrapper_QTranslator::isEmpty(QTranslator* theWrappedObject) const
{
return ((PythonQtPublicPromoter_QTranslator*)theWrappedObject)->promoted_isEmpty();
}
QString PythonQtWrapper_QTranslator::translate(QTranslator* theWrappedObject, const char* context, const char* sourceText, const char* comment) const
{
return ((PythonQtPublicPromoter_QTranslator*)theWrappedObject)->promoted_translate(context, sourceText, comment);
}
bool PythonQtWrapper_QTranslator::load(QTranslator* theWrappedObject, const QString& filename, const QString& directory, const QString& search_delimiters, const QString& suffix)
{
return theWrappedObject->load(filename, directory, search_delimiters, suffix);
}