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