PythonQtWrapper_QWidgetItem.cpp
402 lines
| 14.2 KiB
| text/x-c
|
CppLexer
|
r13 | #include "PythonQtWrapper_QWidgetItem.h" | ||
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
|
r13 | #include <QVariant> | ||
#include <qlayout.h> | ||||
#include <qlayoutitem.h> | ||||
#include <qrect.h> | ||||
#include <qsize.h> | ||||
#include <qwidget.h> | ||||
|
r24 | Qt::Orientations PythonQtShell_QWidgetItem::expandingDirections() const | ||
|
r13 | { | ||
|
r24 | if (_wrapper) { | ||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "expandingDirections"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QWidgetItem::staticMetaObject, | ||||
"expandingDirections(QWidgetItem*)"); | ||||
Qt::Orientations 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 = *((Qt::Orientations *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
|
r13 | } | ||
|
r24 | return QWidgetItem::expandingDirections(); | ||
} | ||||
QRect PythonQtShell_QWidgetItem::geometry() const | ||||
|
r13 | { | ||
|
r24 | if (_wrapper) { | ||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "geometry"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QWidgetItem::staticMetaObject, | ||||
"geometry(QWidgetItem*)"); | ||||
QRect 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 = *((QRect *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
|
r13 | } | ||
|
r24 | return QWidgetItem::geometry(); | ||
} | ||||
bool PythonQtShell_QWidgetItem::hasHeightForWidth() const | ||||
|
r13 | { | ||
|
r24 | if (_wrapper) { | ||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "hasHeightForWidth"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QWidgetItem::staticMetaObject, | ||||
"hasHeightForWidth(QWidgetItem*)"); | ||||
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; | ||||
} | ||||
|
r13 | } | ||
|
r24 | return QWidgetItem::hasHeightForWidth(); | ||
} | ||||
int PythonQtShell_QWidgetItem::heightForWidth(int arg__1) const | ||||
|
r13 | { | ||
|
r24 | if (_wrapper) { | ||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "heightForWidth"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QWidgetItem::staticMetaObject, | ||||
"heightForWidth(QWidgetItem*,int )"); | ||||
int 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 = *((int *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
|
r13 | } | ||
|
r24 | return QWidgetItem::heightForWidth(arg__1); | ||
} | ||||
void PythonQtShell_QWidgetItem::invalidate() | ||||
|
r13 | { | ||
|
r24 | if (_wrapper) { | ||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "invalidate"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QWidgetItem::staticMetaObject, | ||||
"invalidate(QWidgetItem*)"); | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
|
r13 | } | ||
|
r24 | QWidgetItem::invalidate(); | ||
} | ||||
bool PythonQtShell_QWidgetItem::isEmpty() const | ||||
|
r13 | { | ||
|
r24 | if (_wrapper) { | ||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "isEmpty"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QWidgetItem::staticMetaObject, | ||||
"isEmpty(QWidgetItem*)"); | ||||
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; | ||||
} | ||||
|
r13 | } | ||
|
r24 | return QWidgetItem::isEmpty(); | ||
} | ||||
QLayout* PythonQtShell_QWidgetItem::layout() | ||||
|
r13 | { | ||
|
r24 | if (_wrapper) { | ||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "layout"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QWidgetItem::staticMetaObject, | ||||
"layout(QWidgetItem*)"); | ||||
QLayout* 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 = *((QLayout* *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QWidgetItem::layout(); | ||||
} | ||||
QSize PythonQtShell_QWidgetItem::maximumSize() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "maximumSize"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QWidgetItem::staticMetaObject, | ||||
"maximumSize(QWidgetItem*)"); | ||||
QSize 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 = *((QSize *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QWidgetItem::maximumSize(); | ||||
|
r13 | } | ||
|
r24 | int PythonQtShell_QWidgetItem::minimumHeightForWidth(int arg__1) const | ||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "minimumHeightForWidth"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QWidgetItem::staticMetaObject, | ||||
"minimumHeightForWidth(QWidgetItem*,int )"); | ||||
int 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 = *((int *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QWidgetItem::minimumHeightForWidth(arg__1); | ||||
} | ||||
QSize PythonQtShell_QWidgetItem::minimumSize() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "minimumSize"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QWidgetItem::staticMetaObject, | ||||
"minimumSize(QWidgetItem*)"); | ||||
QSize 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 = *((QSize *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QWidgetItem::minimumSize(); | ||||
} | ||||
void PythonQtShell_QWidgetItem::setGeometry(const QRect& arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "setGeometry"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QWidgetItem::staticMetaObject, | ||||
"setGeometry(QWidgetItem*,const QRect& )"); | ||||
void* args[2] = {NULL, (void*)&arg__1}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QWidgetItem::setGeometry(arg__1); | ||||
} | ||||
QSize PythonQtShell_QWidgetItem::sizeHint() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "sizeHint"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QWidgetItem::staticMetaObject, | ||||
"sizeHint(QWidgetItem*)"); | ||||
QSize 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 = *((QSize *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QWidgetItem::sizeHint(); | ||||
} | ||||
QSpacerItem* PythonQtShell_QWidgetItem::spacerItem() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "spacerItem"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QWidgetItem::staticMetaObject, | ||||
"spacerItem(QWidgetItem*)"); | ||||
QSpacerItem* 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 = *((QSpacerItem* *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QWidgetItem::spacerItem(); | ||||
} | ||||
QWidget* PythonQtShell_QWidgetItem::widget() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "widget"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QWidgetItem::staticMetaObject, | ||||
"widget(QWidgetItem*)"); | ||||
QWidget* 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 = *((QWidget* *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QWidgetItem::widget(); | ||||
} | ||||
QWidgetItem* PythonQtWrapper_QWidgetItem::new_QWidgetItem(QWidget* w) | ||||
{ | ||||
return new PythonQtShell_QWidgetItem(w); } | ||||
|
r13 | |||
|
r28 | QSize PythonQtWrapper_QWidgetItem::maximumSize(QWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QWidgetItem*)theWrappedObject)->promoted_maximumSize(); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QWidgetItem::isEmpty(QWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QWidgetItem*)theWrappedObject)->promoted_isEmpty(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QWidgetItem::setGeometry(QWidgetItem* theWrappedObject, const QRect& arg__1) | ||
|
r13 | { | ||
|
r28 | ((PythonQtPublicPromoter_QWidgetItem*)theWrappedObject)->promoted_setGeometry(arg__1); | ||
|
r13 | } | ||
|
r28 | Qt::Orientations PythonQtWrapper_QWidgetItem::expandingDirections(QWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QWidgetItem*)theWrappedObject)->promoted_expandingDirections(); | ||
|
r13 | } | ||
|
r28 | QSize PythonQtWrapper_QWidgetItem::sizeHint(QWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QWidgetItem*)theWrappedObject)->promoted_sizeHint(); | ||
|
r13 | } | ||
|
r28 | QRect PythonQtWrapper_QWidgetItem::geometry(QWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QWidgetItem*)theWrappedObject)->promoted_geometry(); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QWidgetItem::hasHeightForWidth(QWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QWidgetItem*)theWrappedObject)->promoted_hasHeightForWidth(); | ||
|
r13 | } | ||
|
r28 | QWidget* PythonQtWrapper_QWidgetItem::widget(QWidgetItem* theWrappedObject) | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QWidgetItem*)theWrappedObject)->promoted_widget(); | ||
|
r13 | } | ||
|
r28 | QSize PythonQtWrapper_QWidgetItem::minimumSize(QWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QWidgetItem*)theWrappedObject)->promoted_minimumSize(); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QWidgetItem::heightForWidth(QWidgetItem* theWrappedObject, int arg__1) const | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QWidgetItem*)theWrappedObject)->promoted_heightForWidth(arg__1); | ||
|
r13 | } | ||