PythonQtWrapper_QGraphicsLayoutItem.cpp
260 lines
| 9.2 KiB
| text/x-c
|
CppLexer
|
r13 | #include "PythonQtWrapper_QGraphicsLayoutItem.h" | ||
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
|
r13 | #include <QVariant> | ||
#include <qgraphicslayoutitem.h> | ||||
#include <qrect.h> | ||||
#include <qsize.h> | ||||
#include <qsizepolicy.h> | ||||
|
r24 | void PythonQtShell_QGraphicsLayoutItem::getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const | ||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "getContentsMargins"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QGraphicsLayoutItem::staticMetaObject, | ||||
"getContentsMargins(QGraphicsLayoutItem*,qreal* ,qreal* ,qreal* ,qreal* )"); | ||||
void* args[5] = {NULL, (void*)&left, (void*)&top, (void*)&right, (void*)&bottom}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QGraphicsLayoutItem::getContentsMargins(left, top, right, bottom); | ||||
} | ||||
void PythonQtShell_QGraphicsLayoutItem::setGeometry(const QRectF& rect) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "setGeometry"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QGraphicsLayoutItem::staticMetaObject, | ||||
"setGeometry(QGraphicsLayoutItem*,const QRectF& )"); | ||||
void* args[2] = {NULL, (void*)&rect}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QGraphicsLayoutItem::setGeometry(rect); | ||||
} | ||||
QSizeF PythonQtShell_QGraphicsLayoutItem::sizeHint(Qt::SizeHint which, const QSizeF& constraint) const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "sizeHint"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QGraphicsLayoutItem::staticMetaObject, | ||||
"sizeHint(QGraphicsLayoutItem*,Qt::SizeHint ,const QSizeF& )"); | ||||
QSizeF returnValue; | ||||
void* args[3] = {NULL, (void*)&which, (void*)&constraint}; | ||||
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 = *((QSizeF *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
QSizeF result; | ||||
return result; | ||||
} | ||||
void PythonQtShell_QGraphicsLayoutItem::updateGeometry() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "updateGeometry"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QGraphicsLayoutItem::staticMetaObject, | ||||
"updateGeometry(QGraphicsLayoutItem*)"); | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QGraphicsLayoutItem::updateGeometry(); | ||||
} | ||||
QGraphicsLayoutItem* PythonQtWrapper_QGraphicsLayoutItem::new_QGraphicsLayoutItem(QGraphicsLayoutItem* parent, bool isLayout) | ||||
{ | ||||
return new PythonQtShell_QGraphicsLayoutItem(parent, isLayout); } | ||||
|
r28 | bool PythonQtWrapper_QGraphicsLayoutItem::isLayout(QGraphicsLayoutItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->isLayout(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QGraphicsLayoutItem::setPreferredWidth(QGraphicsLayoutItem* theWrappedObject, qreal width) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setPreferredWidth(width); | ||
|
r13 | } | ||
|
r24 | qreal PythonQtWrapper_QGraphicsLayoutItem::minimumHeight(QGraphicsLayoutItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->minimumHeight(); | ||
|
r13 | } | ||
|
r28 | QRectF PythonQtWrapper_QGraphicsLayoutItem::contentsRect(QGraphicsLayoutItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->contentsRect(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QGraphicsLayoutItem::setMaximumWidth(QGraphicsLayoutItem* theWrappedObject, qreal width) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setMaximumWidth(width); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QGraphicsLayoutItem::setMinimumHeight(QGraphicsLayoutItem* theWrappedObject, qreal height) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setMinimumHeight(height); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QGraphicsLayoutItem::setSizePolicy(QGraphicsLayoutItem* theWrappedObject, QSizePolicy::Policy hPolicy, QSizePolicy::Policy vPolicy, QSizePolicy::ControlType controlType) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setSizePolicy(hPolicy, vPolicy, controlType); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QGraphicsLayoutItem::setPreferredSize(QGraphicsLayoutItem* theWrappedObject, qreal w, qreal h) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setPreferredSize(w, h); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QGraphicsLayoutItem::setSizePolicy(QGraphicsLayoutItem* theWrappedObject, const QSizePolicy& policy) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setSizePolicy(policy); | ||
|
r13 | } | ||
|
r28 | QSizeF PythonQtWrapper_QGraphicsLayoutItem::minimumSize(QGraphicsLayoutItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->minimumSize(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QGraphicsLayoutItem::setMaximumSize(QGraphicsLayoutItem* theWrappedObject, const QSizeF& size) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setMaximumSize(size); | ||
|
r13 | } | ||
|
r28 | QRectF PythonQtWrapper_QGraphicsLayoutItem::geometry(QGraphicsLayoutItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->geometry(); | ||
|
r13 | } | ||
|
r28 | QSizeF PythonQtWrapper_QGraphicsLayoutItem::preferredSize(QGraphicsLayoutItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->preferredSize(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QGraphicsLayoutItem::setMinimumSize(QGraphicsLayoutItem* theWrappedObject, const QSizeF& size) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setMinimumSize(size); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QGraphicsLayoutItem::setPreferredHeight(QGraphicsLayoutItem* theWrappedObject, qreal height) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setPreferredHeight(height); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QGraphicsLayoutItem::setGeometry(QGraphicsLayoutItem* theWrappedObject, const QRectF& rect) | ||
|
r13 | { | ||
|
r28 | ((PythonQtPublicPromoter_QGraphicsLayoutItem*)theWrappedObject)->promoted_setGeometry(rect); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QGraphicsLayoutItem::setMaximumHeight(QGraphicsLayoutItem* theWrappedObject, qreal height) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setMaximumHeight(height); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QGraphicsLayoutItem::setMinimumSize(QGraphicsLayoutItem* theWrappedObject, qreal w, qreal h) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setMinimumSize(w, h); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QGraphicsLayoutItem::getContentsMargins(QGraphicsLayoutItem* theWrappedObject, qreal* left, qreal* top, qreal* right, qreal* bottom) const | ||
|
r13 | { | ||
|
r28 | ((PythonQtPublicPromoter_QGraphicsLayoutItem*)theWrappedObject)->promoted_getContentsMargins(left, top, right, bottom); | ||
|
r13 | } | ||
|
r28 | qreal PythonQtWrapper_QGraphicsLayoutItem::maximumHeight(QGraphicsLayoutItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->maximumHeight(); | ||
|
r13 | } | ||
|
r28 | qreal PythonQtWrapper_QGraphicsLayoutItem::preferredHeight(QGraphicsLayoutItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->preferredHeight(); | ||
|
r13 | } | ||
|
r28 | QSizeF PythonQtWrapper_QGraphicsLayoutItem::maximumSize(QGraphicsLayoutItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->maximumSize(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QGraphicsLayoutItem::setPreferredSize(QGraphicsLayoutItem* theWrappedObject, const QSizeF& size) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setPreferredSize(size); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QGraphicsLayoutItem::setMaximumSize(QGraphicsLayoutItem* theWrappedObject, qreal w, qreal h) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setMaximumSize(w, h); | ||
|
r13 | } | ||
|
r28 | qreal PythonQtWrapper_QGraphicsLayoutItem::preferredWidth(QGraphicsLayoutItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->preferredWidth(); | ||
|
r13 | } | ||
|
r28 | QSizePolicy PythonQtWrapper_QGraphicsLayoutItem::sizePolicy(QGraphicsLayoutItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->sizePolicy(); | ||
|
r13 | } | ||
|
r28 | qreal PythonQtWrapper_QGraphicsLayoutItem::maximumWidth(QGraphicsLayoutItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->maximumWidth(); | ||
|
r13 | } | ||
|
r28 | QGraphicsLayoutItem* PythonQtWrapper_QGraphicsLayoutItem::parentLayoutItem(QGraphicsLayoutItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->parentLayoutItem(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QGraphicsLayoutItem::setParentLayoutItem(QGraphicsLayoutItem* theWrappedObject, QGraphicsLayoutItem* parent) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setParentLayoutItem(parent); | ||
|
r13 | } | ||
|
r28 | QSizeF PythonQtWrapper_QGraphicsLayoutItem::effectiveSizeHint(QGraphicsLayoutItem* theWrappedObject, Qt::SizeHint which, const QSizeF& constraint) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->effectiveSizeHint(which, constraint); | ||
|
r13 | } | ||
|
r24 | qreal PythonQtWrapper_QGraphicsLayoutItem::minimumWidth(QGraphicsLayoutItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->minimumWidth(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QGraphicsLayoutItem::setMinimumWidth(QGraphicsLayoutItem* theWrappedObject, qreal width) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setMinimumWidth(width); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QGraphicsLayoutItem::updateGeometry(QGraphicsLayoutItem* theWrappedObject) | ||
|
r13 | { | ||
|
r28 | ((PythonQtPublicPromoter_QGraphicsLayoutItem*)theWrappedObject)->promoted_updateGeometry(); | ||
|
r13 | } | ||