PythonQtWrapper_QGraphicsLinearLayout.cpp
249 lines
| 9.3 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include "PythonQtWrapper_QGraphicsLinearLayout.h" | ||
florianlink
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
florianlink
|
r13 | #include <QVariant> | ||
#include <qcoreevent.h> | ||||
#include <qgraphicslayoutitem.h> | ||||
#include <qgraphicslinearlayout.h> | ||||
#include <qrect.h> | ||||
#include <qsize.h> | ||||
florianlink
|
r24 | int PythonQtShell_QGraphicsLinearLayout::count() const | ||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "count"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"int"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
int returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("count", methodInfo, result); | ||||
} else { | ||||
returnValue = *((int*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QGraphicsLinearLayout::count(); | ||||
} | ||||
void PythonQtShell_QGraphicsLinearLayout::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; | ||||
} | ||||
} | ||||
QGraphicsLinearLayout::getContentsMargins(left, top, right, bottom); | ||||
} | ||||
void PythonQtShell_QGraphicsLinearLayout::invalidate() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "invalidate"); | ||||
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; | ||||
} | ||||
} | ||||
QGraphicsLinearLayout::invalidate(); | ||||
} | ||||
QGraphicsLayoutItem* PythonQtShell_QGraphicsLinearLayout::itemAt(int index) const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "itemAt"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"QGraphicsLayoutItem*" , "int"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
QGraphicsLayoutItem* returnValue; | ||||
florianlink
|
r24 | void* args[2] = {NULL, (void*)&index}; | ||
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("itemAt", methodInfo, result); | ||||
} else { | ||||
returnValue = *((QGraphicsLayoutItem**)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QGraphicsLinearLayout::itemAt(index); | ||||
} | ||||
void PythonQtShell_QGraphicsLinearLayout::removeAt(int index) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "removeAt"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"" , "int"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
florianlink
|
r24 | void* args[2] = {NULL, (void*)&index}; | ||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QGraphicsLinearLayout::removeAt(index); | ||||
} | ||||
void PythonQtShell_QGraphicsLinearLayout::widgetEvent(QEvent* e) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "widgetEvent"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"" , "QEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
florianlink
|
r24 | void* args[2] = {NULL, (void*)&e}; | ||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QGraphicsLinearLayout::widgetEvent(e); | ||||
} | ||||
florianlink
|
r13 | QGraphicsLinearLayout* PythonQtWrapper_QGraphicsLinearLayout::new_QGraphicsLinearLayout(QGraphicsLayoutItem* parent) | ||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QGraphicsLinearLayout(parent); } | ||
florianlink
|
r13 | |||
QGraphicsLinearLayout* PythonQtWrapper_QGraphicsLinearLayout::new_QGraphicsLinearLayout(Qt::Orientation orientation, QGraphicsLayoutItem* parent) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QGraphicsLinearLayout(orientation, parent); } | ||
florianlink
|
r13 | |||
florianlink
|
r73 | void PythonQtWrapper_QGraphicsLinearLayout::setItemSpacing(QGraphicsLinearLayout* theWrappedObject, int index, qreal spacing) | ||
{ | ||||
( theWrappedObject->setItemSpacing(index, spacing)); | ||||
} | ||||
int PythonQtWrapper_QGraphicsLinearLayout::count(QGraphicsLinearLayout* theWrappedObject) const | ||||
{ | ||||
return ( ((PythonQtPublicPromoter_QGraphicsLinearLayout*)theWrappedObject)->promoted_count()); | ||||
} | ||||
florianlink
|
r28 | qreal PythonQtWrapper_QGraphicsLinearLayout::itemSpacing(QGraphicsLinearLayout* theWrappedObject, int index) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->itemSpacing(index)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QGraphicsLinearLayout::setSpacing(QGraphicsLinearLayout* theWrappedObject, qreal spacing) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setSpacing(spacing)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | void PythonQtWrapper_QGraphicsLinearLayout::setOrientation(QGraphicsLinearLayout* theWrappedObject, Qt::Orientation orientation) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setOrientation(orientation)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QGraphicsLinearLayout::invalidate(QGraphicsLinearLayout* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( ((PythonQtPublicPromoter_QGraphicsLinearLayout*)theWrappedObject)->promoted_invalidate()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QSizeF PythonQtWrapper_QGraphicsLinearLayout::sizeHint(QGraphicsLinearLayout* theWrappedObject, Qt::SizeHint which, const QSizeF& constraint) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->sizeHint(which, constraint)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | int PythonQtWrapper_QGraphicsLinearLayout::stretchFactor(QGraphicsLinearLayout* theWrappedObject, QGraphicsLayoutItem* item) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->stretchFactor(item)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | QGraphicsLayoutItem* PythonQtWrapper_QGraphicsLinearLayout::itemAt(QGraphicsLinearLayout* theWrappedObject, int index) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QGraphicsLinearLayout*)theWrappedObject)->promoted_itemAt(index)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | void PythonQtWrapper_QGraphicsLinearLayout::setStretchFactor(QGraphicsLinearLayout* theWrappedObject, QGraphicsLayoutItem* item, int stretch) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setStretchFactor(item, stretch)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | void PythonQtWrapper_QGraphicsLinearLayout::removeItem(QGraphicsLinearLayout* theWrappedObject, QGraphicsLayoutItem* item) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->removeItem(item)); | ||
florianlink
|
r13 | } | ||
void PythonQtWrapper_QGraphicsLinearLayout::setGeometry(QGraphicsLinearLayout* theWrappedObject, const QRectF& rect) | ||||
{ | ||||
florianlink
|
r73 | ( theWrappedObject->setGeometry(rect)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QGraphicsLinearLayout::addItem(QGraphicsLinearLayout* theWrappedObject, QGraphicsLayoutItem* item) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->addItem(item)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | qreal PythonQtWrapper_QGraphicsLinearLayout::spacing(QGraphicsLinearLayout* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->spacing()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | void PythonQtWrapper_QGraphicsLinearLayout::insertStretch(QGraphicsLinearLayout* theWrappedObject, int index, int stretch) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->insertStretch(index, stretch)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | void PythonQtWrapper_QGraphicsLinearLayout::insertItem(QGraphicsLinearLayout* theWrappedObject, int index, QGraphicsLayoutItem* item) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->insertItem(index, item)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | void PythonQtWrapper_QGraphicsLinearLayout::addStretch(QGraphicsLinearLayout* theWrappedObject, int stretch) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->addStretch(stretch)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | void PythonQtWrapper_QGraphicsLinearLayout::setAlignment(QGraphicsLinearLayout* theWrappedObject, QGraphicsLayoutItem* item, Qt::Alignment alignment) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setAlignment(item, alignment)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | Qt::Alignment PythonQtWrapper_QGraphicsLinearLayout::alignment(QGraphicsLinearLayout* theWrappedObject, QGraphicsLayoutItem* item) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->alignment(item)); | ||
florianlink
|
r28 | } | ||
Qt::Orientation PythonQtWrapper_QGraphicsLinearLayout::orientation(QGraphicsLinearLayout* theWrappedObject) const | ||||
{ | ||||
florianlink
|
r73 | return ( theWrappedObject->orientation()); | ||
florianlink
|
r28 | } | ||
void PythonQtWrapper_QGraphicsLinearLayout::removeAt(QGraphicsLinearLayout* theWrappedObject, int index) | ||||
{ | ||||
florianlink
|
r73 | ( ((PythonQtPublicPromoter_QGraphicsLinearLayout*)theWrappedObject)->promoted_removeAt(index)); | ||
florianlink
|
r13 | } | ||