PythonQtWrapper_QGraphicsLayout.cpp
233 lines
| 8.5 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include "PythonQtWrapper_QGraphicsLayout.h" | ||
florianlink
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
florianlink
|
r13 | #include <QVariant> | ||
#include <qcoreevent.h> | ||||
#include <qgraphicslayout.h> | ||||
#include <qgraphicslayoutitem.h> | ||||
#include <qrect.h> | ||||
#include <qsize.h> | ||||
#include <qsizepolicy.h> | ||||
florianlink
|
r24 | int PythonQtShell_QGraphicsLayout::count() const | ||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "count"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QGraphicsLayout::staticMetaObject, | ||||
"count(QGraphicsLayout*)"); | ||||
int 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 = *((int *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
int result; | ||||
return result; | ||||
} | ||||
void PythonQtShell_QGraphicsLayout::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_QGraphicsLayout::staticMetaObject, | ||||
"getContentsMargins(QGraphicsLayout*,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; | ||||
} | ||||
} | ||||
QGraphicsLayout::getContentsMargins(left, top, right, bottom); | ||||
} | ||||
void PythonQtShell_QGraphicsLayout::invalidate() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "invalidate"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QGraphicsLayout::staticMetaObject, | ||||
"invalidate(QGraphicsLayout*)"); | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QGraphicsLayout::invalidate(); | ||||
} | ||||
QGraphicsLayoutItem* PythonQtShell_QGraphicsLayout::itemAt(int i) const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "itemAt"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QGraphicsLayout::staticMetaObject, | ||||
"itemAt(QGraphicsLayout*,int )"); | ||||
QGraphicsLayoutItem* returnValue; | ||||
void* args[2] = {NULL, (void*)&i}; | ||||
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 = *((QGraphicsLayoutItem* *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
QGraphicsLayoutItem* result; | ||||
return result; | ||||
} | ||||
void PythonQtShell_QGraphicsLayout::removeAt(int index) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "removeAt"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QGraphicsLayout::staticMetaObject, | ||||
"removeAt(QGraphicsLayout*,int )"); | ||||
void* args[2] = {NULL, (void*)&index}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
} | ||||
void PythonQtShell_QGraphicsLayout::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_QGraphicsLayout::staticMetaObject, | ||||
"setGeometry(QGraphicsLayout*,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; | ||||
} | ||||
} | ||||
QGraphicsLayout::setGeometry(rect); | ||||
} | ||||
QSizeF PythonQtShell_QGraphicsLayout::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_QGraphicsLayout::staticMetaObject, | ||||
"sizeHint(QGraphicsLayout*,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_QGraphicsLayout::updateGeometry() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "updateGeometry"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QGraphicsLayout::staticMetaObject, | ||||
"updateGeometry(QGraphicsLayout*)"); | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QGraphicsLayout::updateGeometry(); | ||||
} | ||||
void PythonQtShell_QGraphicsLayout::widgetEvent(QEvent* e) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "widgetEvent"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QGraphicsLayout::staticMetaObject, | ||||
"widgetEvent(QGraphicsLayout*,QEvent* )"); | ||||
void* args[2] = {NULL, (void*)&e}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QGraphicsLayout::widgetEvent(e); | ||||
} | ||||
QGraphicsLayout* PythonQtWrapper_QGraphicsLayout::new_QGraphicsLayout(QGraphicsLayoutItem* parent) | ||||
{ | ||||
return new PythonQtShell_QGraphicsLayout(parent); } | ||||
florianlink
|
r13 | |||
bool PythonQtWrapper_QGraphicsLayout::isActivated(QGraphicsLayout* theWrappedObject) const | ||||
{ | ||||
florianlink
|
r28 | return theWrappedObject->isActivated(); | ||
florianlink
|
r13 | } | ||
void PythonQtWrapper_QGraphicsLayout::setContentsMargins(QGraphicsLayout* theWrappedObject, qreal left, qreal top, qreal right, qreal bottom) | ||||
{ | ||||
florianlink
|
r28 | theWrappedObject->setContentsMargins(left, top, right, bottom); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | void PythonQtWrapper_QGraphicsLayout::invalidate(QGraphicsLayout* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | ((PythonQtPublicPromoter_QGraphicsLayout*)theWrappedObject)->promoted_invalidate(); | ||
} | ||||
void PythonQtWrapper_QGraphicsLayout::activate(QGraphicsLayout* theWrappedObject) | ||||
{ | ||||
theWrappedObject->activate(); | ||||
florianlink
|
r13 | } | ||
florianlink
|
r24 | void PythonQtWrapper_QGraphicsLayout::getContentsMargins(QGraphicsLayout* theWrappedObject, qreal* left, qreal* top, qreal* right, qreal* bottom) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | ((PythonQtPublicPromoter_QGraphicsLayout*)theWrappedObject)->promoted_getContentsMargins(left, top, right, bottom); | ||
florianlink
|
r13 | } | ||
void PythonQtWrapper_QGraphicsLayout::widgetEvent(QGraphicsLayout* theWrappedObject, QEvent* e) | ||||
{ | ||||
florianlink
|
r28 | ((PythonQtPublicPromoter_QGraphicsLayout*)theWrappedObject)->promoted_widgetEvent(e); | ||
florianlink
|
r13 | } | ||