PythonQtWrapper_QGraphicsPathItem.cpp
126 lines
| 4.4 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include "PythonQtWrapper_QGraphicsPathItem.h" | ||
florianlink
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
florianlink
|
r13 | #include <QVariant> | ||
#include <qbrush.h> | ||||
#include <qgraphicsitem.h> | ||||
#include <qgraphicsscene.h> | ||||
#include <qpainter.h> | ||||
#include <qpainterpath.h> | ||||
#include <qpen.h> | ||||
#include <qpoint.h> | ||||
#include <qrect.h> | ||||
#include <qstyleoption.h> | ||||
#include <qwidget.h> | ||||
florianlink
|
r24 | bool PythonQtShell_QGraphicsPathItem::isObscuredBy(const QGraphicsItem* item) const | ||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "isObscuredBy"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"bool" , "const QGraphicsItem*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
bool returnValue; | ||||
florianlink
|
r24 | void* args[2] = {NULL, (void*)&item}; | ||
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("isObscuredBy", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QGraphicsPathItem::isObscuredBy(item); | ||||
} | ||||
QPainterPath PythonQtShell_QGraphicsPathItem::opaqueArea() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "opaqueArea"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"QPainterPath"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
QPainterPath 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("opaqueArea", methodInfo, result); | ||||
} else { | ||||
returnValue = *((QPainterPath*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QGraphicsPathItem::opaqueArea(); | ||||
} | ||||
florianlink
|
r13 | QGraphicsPathItem* PythonQtWrapper_QGraphicsPathItem::new_QGraphicsPathItem(QGraphicsItem* parent, QGraphicsScene* scene) | ||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QGraphicsPathItem(parent, scene); } | ||
florianlink
|
r13 | |||
QGraphicsPathItem* PythonQtWrapper_QGraphicsPathItem::new_QGraphicsPathItem(const QPainterPath& path, QGraphicsItem* parent, QGraphicsScene* scene) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QGraphicsPathItem(path, parent, scene); } | ||
florianlink
|
r13 | |||
florianlink
|
r28 | QPainterPath PythonQtWrapper_QGraphicsPathItem::opaqueArea(QGraphicsPathItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QGraphicsPathItem*)theWrappedObject)->promoted_opaqueArea()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QGraphicsPathItem::paint(QGraphicsPathItem* theWrappedObject, QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->paint(painter, option, widget)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QPainterPath PythonQtWrapper_QGraphicsPathItem::path(QGraphicsPathItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->path()); | ||
} | ||||
QPainterPath PythonQtWrapper_QGraphicsPathItem::shape(QGraphicsPathItem* theWrappedObject) const | ||||
{ | ||||
return ( theWrappedObject->shape()); | ||||
florianlink
|
r13 | } | ||
florianlink
|
r28 | int PythonQtWrapper_QGraphicsPathItem::type(QGraphicsPathItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->type()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QRectF PythonQtWrapper_QGraphicsPathItem::boundingRect(QGraphicsPathItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->boundingRect()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QGraphicsPathItem::isObscuredBy(QGraphicsPathItem* theWrappedObject, const QGraphicsItem* item) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QGraphicsPathItem*)theWrappedObject)->promoted_isObscuredBy(item)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QGraphicsPathItem::setPath(QGraphicsPathItem* theWrappedObject, const QPainterPath& path) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setPath(path)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QGraphicsPathItem::contains(QGraphicsPathItem* theWrappedObject, const QPointF& point) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->contains(point)); | ||
florianlink
|
r13 | } | ||