PythonQtWrapper_QLayoutItem.cpp
408 lines
| 14.1 KiB
| text/x-c
|
CppLexer
|
r13 | #include "PythonQtWrapper_QLayoutItem.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_QLayoutItem::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_QLayoutItem::staticMetaObject, | ||||
"expandingDirections(QLayoutItem*)"); | ||||
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 | Qt::Orientations result; | ||
return result; | ||||
} | ||||
QRect PythonQtShell_QLayoutItem::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_QLayoutItem::staticMetaObject, | ||||
"geometry(QLayoutItem*)"); | ||||
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 | QRect result; | ||
return result; | ||||
} | ||||
bool PythonQtShell_QLayoutItem::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_QLayoutItem::staticMetaObject, | ||||
"hasHeightForWidth(QLayoutItem*)"); | ||||
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 QLayoutItem::hasHeightForWidth(); | ||
} | ||||
int PythonQtShell_QLayoutItem::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_QLayoutItem::staticMetaObject, | ||||
"heightForWidth(QLayoutItem*,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 QLayoutItem::heightForWidth(arg__1); | ||
} | ||||
void PythonQtShell_QLayoutItem::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_QLayoutItem::staticMetaObject, | ||||
"invalidate(QLayoutItem*)"); | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
|
r13 | } | ||
|
r24 | QLayoutItem::invalidate(); | ||
} | ||||
bool PythonQtShell_QLayoutItem::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_QLayoutItem::staticMetaObject, | ||||
"isEmpty(QLayoutItem*)"); | ||||
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 | bool result; | ||
return result; | ||||
} | ||||
QLayout* PythonQtShell_QLayoutItem::layout() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "layout"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QLayoutItem::staticMetaObject, | ||||
"layout(QLayoutItem*)"); | ||||
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 QLayoutItem::layout(); | ||||
} | ||||
QSize PythonQtShell_QLayoutItem::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_QLayoutItem::staticMetaObject, | ||||
"maximumSize(QLayoutItem*)"); | ||||
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; | ||||
} | ||||
} | ||||
QSize result; | ||||
return result; | ||||
} | ||||
int PythonQtShell_QLayoutItem::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_QLayoutItem::staticMetaObject, | ||||
"minimumHeightForWidth(QLayoutItem*,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 QLayoutItem::minimumHeightForWidth(arg__1); | ||||
} | ||||
QSize PythonQtShell_QLayoutItem::minimumSize() const | ||||
|
r13 | { | ||
|
r24 | if (_wrapper) { | ||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "minimumSize"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QLayoutItem::staticMetaObject, | ||||
"minimumSize(QLayoutItem*)"); | ||||
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; | ||||
} | ||||
|
r13 | } | ||
|
r24 | QSize result; | ||
return result; | ||||
} | ||||
void PythonQtShell_QLayoutItem::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_QLayoutItem::staticMetaObject, | ||||
"setGeometry(QLayoutItem*,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; | ||||
} | ||||
} | ||||
} | ||||
QSize PythonQtShell_QLayoutItem::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_QLayoutItem::staticMetaObject, | ||||
"sizeHint(QLayoutItem*)"); | ||||
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; | ||||
} | ||||
} | ||||
QSize result; | ||||
return result; | ||||
} | ||||
QSpacerItem* PythonQtShell_QLayoutItem::spacerItem() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "spacerItem"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QLayoutItem::staticMetaObject, | ||||
"spacerItem(QLayoutItem*)"); | ||||
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 QLayoutItem::spacerItem(); | ||||
} | ||||
QWidget* PythonQtShell_QLayoutItem::widget() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "widget"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QLayoutItem::staticMetaObject, | ||||
"widget(QLayoutItem*)"); | ||||
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 QLayoutItem::widget(); | ||||
} | ||||
QLayoutItem* PythonQtWrapper_QLayoutItem::new_QLayoutItem(Qt::Alignment alignment) | ||||
{ | ||||
return new PythonQtShell_QLayoutItem(alignment); } | ||||
|
r13 | |||
|
r28 | Qt::Alignment PythonQtWrapper_QLayoutItem::alignment(QLayoutItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->alignment(); | ||
|
r13 | } | ||
|
r28 | QSpacerItem* PythonQtWrapper_QLayoutItem::spacerItem(QLayoutItem* theWrappedObject) | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QLayoutItem*)theWrappedObject)->promoted_spacerItem(); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QLayoutItem::heightForWidth(QLayoutItem* theWrappedObject, int arg__1) const | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QLayoutItem*)theWrappedObject)->promoted_heightForWidth(arg__1); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QLayoutItem::hasHeightForWidth(QLayoutItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QLayoutItem*)theWrappedObject)->promoted_hasHeightForWidth(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QLayoutItem::setAlignment(QLayoutItem* theWrappedObject, Qt::Alignment a) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setAlignment(a); | ||
|
r13 | } | ||
|
r28 | QWidget* PythonQtWrapper_QLayoutItem::widget(QLayoutItem* theWrappedObject) | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QLayoutItem*)theWrappedObject)->promoted_widget(); | ||
|
r13 | } | ||
|
r28 | QSizePolicy::ControlTypes PythonQtWrapper_QLayoutItem::controlTypes(QLayoutItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->controlTypes(); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QLayoutItem::minimumHeightForWidth(QLayoutItem* theWrappedObject, int arg__1) const | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QLayoutItem*)theWrappedObject)->promoted_minimumHeightForWidth(arg__1); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QLayoutItem::invalidate(QLayoutItem* theWrappedObject) | ||
|
r13 | { | ||
|
r28 | ((PythonQtPublicPromoter_QLayoutItem*)theWrappedObject)->promoted_invalidate(); | ||
|
r13 | } | ||
|
r28 | QLayout* PythonQtWrapper_QLayoutItem::layout(QLayoutItem* theWrappedObject) | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QLayoutItem*)theWrappedObject)->promoted_layout(); | ||
|
r13 | } | ||