##// 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_QItemEditorCreatorBase.cpp
71 lines | 2.5 KiB | text/x-c | CppLexer
/ generated_cpp / com_trolltech_qt_gui / PythonQtWrapper_QItemEditorCreatorBase.cpp
#include "PythonQtWrapper_QItemEditorCreatorBase.h"
#include <PythonQtSignalReceiver.h>
#include <PythonQtMethodInfo.h>
#include <PythonQtConversion.h>
#include <QVariant>
#include <qbytearray.h>
#include <qwidget.h>
QWidget* PythonQtShell_QItemEditorCreatorBase::createWidget(QWidget* parent) const
{
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;
}
}
QWidget* result;
return result;
}
QByteArray PythonQtShell_QItemEditorCreatorBase::valuePropertyName() const
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "valuePropertyName");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const char* argumentList[] ={"QByteArray"};
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList);
QByteArray 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) {
if (args[0]==NULL) {
PythonQt::priv()->handleVirtualOverloadReturnError("valuePropertyName", methodInfo, result);
} else {
returnValue = *((QByteArray*)args[0]);
}
}
}
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return returnValue;
}
}
QByteArray result;
return result;
}
QItemEditorCreatorBase* PythonQtWrapper_QItemEditorCreatorBase::new_QItemEditorCreatorBase()
{
return new PythonQtShell_QItemEditorCreatorBase(); }