|
|
#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 PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QItemEditorCreatorBase::staticMetaObject,
|
|
|
"createWidget(QItemEditorCreatorBase*,QWidget* )");
|
|
|
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) {
|
|
|
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 PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QItemEditorCreatorBase::staticMetaObject,
|
|
|
"valuePropertyName(QItemEditorCreatorBase*)");
|
|
|
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) {
|
|
|
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(); }
|
|
|
|
|
|
|